[Ajuda] Sistema de AFK Com kick
#7

PHP код:
static
    
playerLastUpdate[MAX_PLAYERS];

#define IsPlayerPaused(%0,%1) \
    
(GetTickCount() > (playerLastUpdate[%0] + %1))

public 
OnPlayerConnect(playerid)
{
    
SetTimerEx("Update"1000true"i"playerid);
    return 
1;
}

public 
OnPlayerUpdate(playerid)
{
    
playerLastUpdate[playerid] = GetTickCount();
    return 
1;
}

forward Update(playerid);
public 
Update(playerid)
{
    if (
IsPlayerPaused(playerid300000)) // 5 minutos
    
{
        
Kick(playerid);
    }

Reply


Messages In This Thread
Sistema de AFK Com kick - by TIAGOO - 29.06.2018, 20:34
Re: Sistema de AFK Com kick - by Cauezin - 29.06.2018, 20:45
Re: Sistema de AFK Com kick - by TIAGOO - 29.06.2018, 20:49
Re: Sistema de AFK Com kick - by Cauezin - 29.06.2018, 20:52
Re: Sistema de AFK Com kick - by TIAGOO - 29.06.2018, 20:57
Re: Sistema de AFK Com kick - by Cauezin - 29.06.2018, 21:00
Re: Sistema de AFK Com kick - by 1sbedx - 29.06.2018, 21:10
Re: Sistema de AFK Com kick - by TIAGOO - 29.06.2018, 21:18

Forum Jump:


Users browsing this thread: 1 Guest(s)