Quantcast
Channel: SA-MP Forums - Filterscripts
Viewing all articles
Browse latest Browse all 595

[Tutorial] Anti Car Shoot - Anti Car Player Crasher (./.cr)

$
0
0
Code:

public OnPlayerStateChange(playerid, newstate, oldstate)
{
          new strings[256],Float:KOR[3];
          if(newstate == PLAYER_STATE_PASSENGER || oldstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_DRIVER)
          {
                new cars = GetPlayerVehicleID(playerid);
                GetVehiclePos(cars,KOR[0],KOR[1],KOR[2]);
                if(GetTickCount()- GetPVarInt(playerid, "anticarshoot") < 500)
                {
                        new name[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, name, sizeof(name));
                        SetVehiclePos(cars,KOR[0],KOR[1],KOR[2]);
                        format(strings,sizeof(strings),"(( * %s Player is kicked from server by anti cheating system. Reason: Anti Car Shoot. ))",name);
                        SendClientMessageToAll(-1,strings);
                        Kick(playerid);
                }
                SetPVarInt(playerid,"anticarshoot",GetTickCount());
          }
          return true;
}


Viewing all articles
Browse latest Browse all 595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>