02.01.2011, 10:43
Example:
Done
pawn Код:
forward AFK(playerid);
new AFKtimer;
pawn Код:
public OnPlayerPause(playerid)
{
AFKtimer = SetTimerEx("AFK", 300000, 0, "i", playerid);
return 1;
}
pawn Код:
public OnPlayerUnPause(playerid)
{
KillTimer(AFKtimer);
return 1;
}
pawn Код:
public AFK(playerid)
{
if(IsPlayerPaused(playerid))
{
Kick(playerid);
new string[128], playername[24];
GetPlayerName(playerid, playername, 24);
format(string, sizeof(string), "%s has been kicked for being AFK (away from keyboard) for more than 5 minutes", playername);
SendClientMessageToAll(0xAFAFAFAA, string);
}
return 1;
}