[FilterScript] Anti ESC (it work)
#11

There is an easier way to check for ESC. Under a timer (preferably 1000ms, but you can do whatever you like), set a variable (something like ESC[playerid]) to 1, without a reason. Then, under OnPlayerUpdate, set the variable to 0.

Logic: OnPlayerUpdate isn't called when the player is in escape mode.

--Edit--

Example script:

pawn Код:
new ESC_Check_Timer;
new ESC[MAX_PLAYERS] = 0;
forward ESC_Check();
//OnGameModeInIt:
ESC_Check_Timer = SetTimer("ESC_Check", 1000, true);
//OnGameModeExit:
KillTimer(ESC_Check_Timer);
//OnPlayerUpdate:
ESC[playerid] = 0;
//ESC Timer:
public ESC_Check()
{
for(new i = 0, ii = GetMaxPlayers(); i < ii; i++)
{
if(IsPlayerConnected(i))
{
ESC[i] = 1;
}
}
}
Good luck, this system for AFK when ESC is also included in my AFK system thread.
Reply


Messages In This Thread
Anti ESC (it work) - by DartakousLien - 01.07.2012, 17:43
Respuesta: Anti ESC (it work) - by [DOG]irinel1996 - 01.07.2012, 18:13
Re: Anti ESC (it work) - by DartakousLien - 01.07.2012, 18:23
Re: Anti ESC (it work) - by Michael@Belgium - 02.07.2012, 11:24
Re: Anti ESC (it work) - by $$inSane - 02.07.2012, 12:34
Re: Anti ESC (it work) - by DartakousLien - 02.07.2012, 13:14
Re: Anti ESC (it work) - by Robert West - 02.07.2012, 13:22
Re: Anti ESC (it work) - by DartakousLien - 02.07.2012, 13:23
Re: Anti ESC (it work) - by VIP475 - 02.07.2012, 13:31
Re: Anti ESC (it work) - by DartakousLien - 02.07.2012, 13:38
Re: Anti ESC (it work) - by coole210 - 02.07.2012, 20:54
Re: Anti ESC (it work) - by DartakousLien - 02.07.2012, 22:19
Re: Anti ESC (it work) - by Michael@Belgium - 03.07.2012, 12:42
Re: Anti ESC (it work) - by DartakousLien - 03.07.2012, 19:58

Forum Jump:


Users browsing this thread: 2 Guest(s)