16.12.2014, 00:52
Hey guys
I'm trying to make it so when a player repairs their vehicle at Pay N Spray that it sets their vehicle health to 999.0
but it's not setting the players vehicle health, it just repairs it to 1000.0 and stays on it.
the reason for this is because my anticheat detects them as hacking if their vehicle health is 1000.0 so yeah.
here is my code
I'm trying to make it so when a player repairs their vehicle at Pay N Spray that it sets their vehicle health to 999.0
but it's not setting the players vehicle health, it just repairs it to 1000.0 and stays on it.
the reason for this is because my anticheat detects them as hacking if their vehicle health is 1000.0 so yeah.
here is my code
PHP код:
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
new Float:CarHealth;
GetPlayerVehicleID(playerid);
if(GetVehicleHealth(playerid, CarHealth) < 990.1)
{
SetVehicleHealth(playerid, 999.0);
}
return 1;
}