#4

Код:
new LastPlayerUpdate[MAX_PLAYERS];
#define IsPlayerPaused(%1,%2) GetTickCount() > (LastPlayerUpdate[%1] + (%2 * 1000)) // Returns the paused time in seconds
// Example Usage:
public OnPlayerUpdate(playerid)
{
    LastPlayerUpdate[playerid] = GetTickCount();
    return 1;
}
// In a timer or something
if(IsPlayerPaused(playerid, 300) && GetPlayerState(playerid) != PLAYER_STATE_SPECTATING) // 300 seconds = 5 minutes
{
    Kick(playerid);
}
I don't understand why player is kicking? and what check is here?
Reply


Messages In This Thread
ESC - by audriuxxx - 22.02.2013, 09:29
Re: ESC - by Rock - 22.02.2013, 09:31
Re: ESC - by Dragony92 - 22.02.2013, 09:32
Re: ESC - by audriuxxx - 22.02.2013, 10:58
Re: ESC - by Rock - 22.02.2013, 11:04
Re: ESC - by audriuxxx - 22.02.2013, 13:14
Re: ESC - by mamorunl - 22.02.2013, 13:16
Re: ESC - by audriuxxx - 22.02.2013, 19:45
Re: ESC - by audriuxxx - 23.02.2013, 11:39
Re: ESC - by audriuxxx - 23.02.2013, 21:12

Forum Jump:


Users browsing this thread: 3 Guest(s)