18.03.2012, 14:33
Well i don't know how to really use y_INI, but for hours you have to do this.
On top add this
Under your login function, add this
Under OnPlayerDisconnect, add this
Under your script add this
On top add this
pawn Код:
new OnlineTimer[MAX_PLAYERS],Hours[MAX_PLAYERS],Minutes[MAX_PLAYERS]
pawn Код:
OnlineTimer[playerid] = SetTimerEx("OnlineTimeUpdate", 60000, 1, "i", playerid);
pawn Код:
KillTimer(OnlineTimer[playerid]);
pawn Код:
forward OnlineTimeUpdate(playerid);
public OnlineTimeUpdate(playerid)
{
Minutes[playerid] ++;
if(Minutes[playerid] == 60)
{
Hours[playerid] ++;
Minutes[playerid] = 0;
SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
}
return 1;
}