Anti Cleo fixcar - 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: Anti Cleo fixcar (
/showthread.php?tid=639658)
Anti Cleo fixcar -
skiplovebra - 21.08.2017
https://www.youtube.com/watch?v=PJ4XsJhKV9w
Help me please
Re: Anti Cleo fixcar -
10MIN - 21.08.2017
The cheat works from a CLEO function that sets the vehicle health. Simplest way is to script an anticheat and then test it with the cheat. (make sure you remove the cheat when you have done the work). (This is how things work in this cheat vs anticheat war)
Re: Anti Cleo fixcar -
thegamer355 - 22.08.2017
You can use the code below to prevent people from fixing their cars:
pawn Код:
new Float:VehicleHealth[MAX_VEHICLES];
stock SetVhealth(vehicleid, Float:health)
{
VehicleHealth[vehicleid] = health;
SetVehicleHealth(vehicleid, health);
return 1;
}
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
GetVehicleHealth(vehicleid, VehicleHealth[vehicleid]);
return 1;
}
// now use this in the anti cheat, i use it in a timer which runs every few seconds.
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vehicleid, vHealth);
if(vHealth > VehicleHealth[vehicleid])
{
return 1; // do the stuff you want to do with the player in here
}
And every time you repair a vehicle use:
pawn Код:
SetVhealth(vehicleid, health); // where health stands for the value of the health you want to set it to
To set the health and change the variable.
I hope this helps you,
-TG