09.03.2013, 23:18
pawn Код:
new Team[MAX_PLAYERS];// add somewhere at the top
/* saving using a variable */
new file[64], playername[32];
GetPlayerName(playerid, playername, sizeof(playername));
format(file, sizeof(file), "%s.ini", playername));
dini_IntSet(file, "Team", Team[playerid]);
/* Loading it */
//need to be called under a function
new file[64], playername[32];
GetPlayerName(playerid, playername, sizeof(playername));
format(file, sizeof(file), "%s.ini", playername));
Team[playerid] = dini_Int(file, "Team");
/*
explaining
now in commands or callbacks or w/e u wanna do all u need is "Team[playerid]" as the variable and it will get/save player team and do all that stuff u need 2 do via playerteam
*/