Alt-tabbing System.
#7

Try using something like this

PHP код:
new afk[MAX_PLAYERS];
public 
OnGameModeInit()
{
    
// Don't use these lines if it's a filterscript
    
SetGameModeText("Blank Script");
    
AddPlayerClass(01958.37831343.157215.3746269.1425000000);
    
    
SetTimer("AFKTimer"10001);
    return 
1;
}
forward AFKTimer();
public 
AFKTimer()
{
    for (new 
0MAX_PLAYERSi++)
    {
        if (
IsPlayerConnected(i))
        {
            
afk[i]++;
            if (
afk[i] % 30 == 0)
            {
                new 
msg[60];
                
format(msg59"player %d is afk for %d seconds now!"iafk[i]);
                
SendClientMessageToAll(0xFFFFFF00msg);
            }
        }
    }
}
public 
OnPlayerUpdate(playerid)
{
    
afk[playerid] = 0;
    return 
1;

Reply


Messages In This Thread
Alt-tabbing System. - by Bug. - 22.09.2012, 20:11
Re: Alt-tabbing System. - by Bug. - 22.09.2012, 20:19
Re: Alt-tabbing System. - by SKAzini - 22.09.2012, 20:20
Re: Alt-tabbing System. - by ikbenremco - 22.09.2012, 20:21
Re: Alt-tabbing System. - by Bug. - 22.09.2012, 20:30
Re: Alt-tabbing System. - by mamorunl - 22.09.2012, 20:48
Re: Alt-tabbing System. - by Squirrel - 22.09.2012, 22:27
Re: Alt-tabbing System. - by Bug. - 24.09.2012, 11:11
Re: Alt-tabbing System. - by Rimeau - 24.09.2012, 11:14
Re: Alt-tabbing System. - by mamorunl - 24.09.2012, 13:37

Forum Jump:


Users browsing this thread: 1 Guest(s)