Anti afk
#1

hy, how i can make anty afk ? when you a afk on my server 10 min you have kickid by server.. pls help
Reply
#2

help pls
Reply
#3

Search.
Reply
#4

Код:
forward AFK(playerid);
new timer;


public OnPlayerPause(playerid)
{
timer = SetTimerEx("AFK", 600000, 0, "i", playerid);
return 1;
}

public OnPlayerUnPause(playerid)
{
KillTimer(timer);
return 1;
}

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 (10 Minutes)", playername);
SendClientMessageToAll(0xAFAFAFAA, string);
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)