rendered paste bodyiStats()
{
new File:fhandle;
new temp[256], temp2[256], temp3[256];
fhandle = fopen("ClanStats.txt",io_append);
format(temp,sizeof(temp),"ClanWar %s VS %s\r\n",TEAM1,TEAM2);
format(temp2, sizeof(temp2), "Winner: %s\r\n",winner);
format(temp3, sizeof(temp3), "%s: %d || %s: %d\r\n", TEAM1, sCount1, TEAM2, sCount2);
fwrite(fhandle,temp);
fwrite(fhandle,temp2);
fwrite(fhandle,temp3);
fclose(fhandle);
}
sStats()
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
new File:fhandle;
new temp[256];
new Score;
Score = GetPlayerScore(i);
new Float:ratio = Float:Score / Float:DeathCount[i];
fhandle = fopen("ClanStats.txt",io_append);
format(temp,sizeof(temp),"%s Kills: %d Deaths: %d Ratio: %0.2f\r\n",PlayerName(i),Score,DeathCount[i],ratio);
fwrite(fhandle,temp);
fclose(fhandle);
}
}
}