SA-MP Forums Archive
[FilterScript] Anti God of Cars - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Anti God of Cars (/showthread.php?tid=447185)



Anti God of Cars - Seregamil1 - 29.06.2013

Hello!

Many of you know about the cheat God Of Cars,who do not know - see

http://www.youtube.com/watch?feature...&v=YJ8JP_gNMHM

This prototype anti-cheat to protect your server
There are no false signals
The system has been tested on over 1,000 vehicles

PHP код:

    
// This is a comment
    // uncomment the line below if you want to write a filterscript
    //#define FILTERSCRIPT
     
    
public OnPlayerEnterVehicle(playeridvehicleidispassenger){
            
SetPVarInt(playerid,"ac_car_id",vehicleid);
        return 
1;
    }
     
public 
OnPlayerUpdate(playerid){
    if(
IsPlayerInAnyVehicle(playerid)){
        if(
GetPlayerVehicleID(playerid) != GetPVarInt(playerid,"ac_car_id")){
            
SetPVarInt(playerid,"ac_car_id",-1);
            new 
Float:x,Float:y,Float:z;
            
GetPlayerPos(playerid,x,y,z);
            
SetPlayerPos(playerid,x,y,z+1);
            
SendClientMessage(playerid,-1,"Hack");
        }
    }
    return 
1;
}
     
    
putPlayerInVehicle(playerid,vehicle,seat){
            
SetPVarInt(playerid,"ac_car_id",vehicle);
        
PutPlayerInVehicle(playerid,vehicle,seat);
    }
     
    public 
OnPlayerConnect(playerid){
        
SetPVarInt(playerid,"ac_car_id",-1);
            return 
1;
    } 
Thank you for your attention

By Seregamil


Re: Anti God of Cars - Seregamil1 - 29.06.2013

v2.0 - Released


Re: Anti God of Cars - ToFFiK - 30.06.2013

Good, but sometimes (I dont know how often yet) kick normal player


Re: Anti God of Cars - Seregamil1 - 01.07.2013

fixed