counting admin time
#6

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
Reply


Messages In This Thread
counting admin time - by Luca12 - 06.08.2013, 15:33
Re: counting admin time - by [XST]O_x - 06.08.2013, 15:44
Re: counting admin time - by Luca12 - 06.08.2013, 16:00
Re: counting admin time - by Vince - 06.08.2013, 16:08
Re: counting admin time - by Konstantinos - 06.08.2013, 16:13
Re: counting admin time - by Luca12 - 06.08.2013, 16:16
Re: counting admin time - by Konstantinos - 06.08.2013, 16:19
Re: counting admin time - by Luca12 - 06.08.2013, 16:32
Re: counting admin time - by Tanush123 - 06.08.2013, 16:34
Re: counting admin time - by Luca12 - 06.08.2013, 17:02
Re: counting admin time - by Konstantinos - 06.08.2013, 22:30
Re: counting admin time - by Luca12 - 06.08.2013, 22:52
Re: counting admin time - by Konstantinos - 07.08.2013, 09:42

Forum Jump:


Users browsing this thread: 1 Guest(s)