14.07.2013, 00:28
pawn Код:
#define MAX_TEAMS 3 //change to your desires
enum tInfo
{
TeamName[32], //name of team
TeamScore//the teams current score
}
new Teams[MAX_TEAMS][tInfo] =
{
{"TEAM_COP",0},
{"TEAM_ARMY",0},
{"TEAM_GANG",0}
};
SaveTeamStats() //to save everything in scoreteams.ini
{
new File:fhandle;
new temp[256];
fhandle = fopen("scoreteams.ini",io_append);
format(temp, sizeof(temp), "%s: %d\r\n%s: %d\r\n%s: %d",
Teams[0][TeamName],Teams[0][TeamScore],Teams[1][TeamName],Teams[1][TeamScore],Teams[2][TeamName],Teams[2][TeamScore]);
fwrite(fhandle,temp);
fclose(fhandle);
}