06.08.2013, 15:44
pawn Код:
new minuteTimer[MAX_PLAYERS];
new minutes[MAX_PLAYERS] = {0, ...};
public OnPlayerConnect(playerid)
{
minuteTimer[playerid] = SetTimerEx("UpdateMinutes", 60 * 1000, true, "i", playerid);
return 1;
}
forward UpdateMinutes(playerid);
public UpdateMinutes(playerid)
{
minutes[playerid]++;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
KillTimer(minuteTimer[playerid]);
return 1;
}