Posts: 1,018
Threads: 320
Joined: Jul 2010
Quote:
Originally Posted by Konstantinos
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; }
|
is that counting every minute if a player game admin or gamemaster? example i was on the server 4 minutes and I disconnect and in my file is writen 4