Mass car spawn - 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)
+--- Thread: Mass car spawn (
/showthread.php?tid=338304)
Mass car spawn -
whiXґ - 29.04.2012
This anti car mass spawn is not banning the player because ?
pawn Код:
#include <a_samp>
/* car mass spawn anti cheat by Gamer_Z */
new PlayerEnterTime[MAX_PLAYERS];
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
PlayerEnterTime[playerid] = GetTickCount();
}
else if(oldstate == PLAYER_STATE_DRIVER)
{
if((GetTickCount()-PlayerEnterTime[playerid]) < 220)//player entered and exited vehicle faster than 220 ms.
{
Ban(playerid);
}
}
return 1;
}