06.08.2013, 16:13
No need timers for that! Use GetTickCount instead.
pawn Код:
new
CountMilliseconds[ MAX_PLAYERS ]
;
public OnPlayerConnect(playerid)
{
PlayerInfo[playerid][AdminMinute] = 0;
CountMilliseconds[ playerid ] = GetTickCount( );
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
PlayerInfo[playerid][AdminMinute] = ((GetTickCount( ) - CountMilliseconds[ playerid ]) % (1000*60*60)) / (1000*60);
return 1;
}