05.01.2011, 19:27
So, this is my code:
And, score keeps at 0, it doesn't save every 15 secs... I added dis to OnPlayerDisconnect:
And, score @ my userfile is always like this:
Any fix?
pawn Код:
public OnFilterScriptInit()
{
SetTimer("SaveStats", 15*1000, 1);
return 1;
}
pawn Код:
public SaveStats()
{
for(new i=0; i<MAX_PLAYERS; i++) if(Acc[i][Logged] == 1)
{
dUserSetINT(S(i)).("Score",GetPlayerScore(i));
}
return 1;
}
pawn Код:
if(Acc[playerid][Logged] == 1)
{
dUserSetINT(S(playerid)).("Score",GetPlayerScore(playerid));
}
Код:
Score=0