SA-MP Forums Archive
Help with anti AFK :] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with anti AFK :] (/showthread.php?tid=249365)



Help with anti AFK :] - sMog. - 18.04.2011

Hello and first sorry abiut asking too mutch help I have posted many help topics but i am helped noone :S

So again i need help with anit afk.. in my server player gets score when he is in car every minute +1... and i want to add in this that if player is in car and afk he gets kicked and -15 score. And i alse need not pause system that cheks in game ... i found this but players cant talk ...
https://sampforum.blast.hk/showthread.php?tid=161192


I found this in other help topic .. not made by me..
pawn Код:
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;
}
or you can give me other afk script


Re: Help with anti AFK :] - Stigg - 18.04.2011

How are you storing the players afk time ?


Re: Help with anti AFK :] - sMog. - 18.04.2011

what you mean ?

EDIT FOUND THIS TOO http://pastebin.com/f52a23780


SOMEONE ?