Quote:
Originally Posted by 0ne
Hmm, a fail code?
pawn Код:
new OnlineTimer[MAX_PLAYERS]; enum pinfo { MinutesPlayed, HoursPlayed } new PInfo[MAX_PLAYERS][pinfo];
onplayerconnect:
OnlineTimer[playerid] = SetTimerEx("OnlineTimeUpdate", 60000, 1, "i", playerid);
forward OnlineTimeUpdate(playerid); public OnlineTimeUpdate(playerid) { PInfo[playerid][MinutesPlayed] ++; if(PInfo[playerid][MinutesPlayed] == 60) { PInfo[playerid][HoursPlayed] ++; SetPlayerScore(playerid,PInfo[playerid][HoursPlayed]); PInfo[playerid][MinutesPlayed] = 0; } }
|
I tried this code, but the score still stays 0 :[