21.08.2017, 03:06
https://www.youtube.com/watch?v=PJ4XsJhKV9w
Help me please
Help me please
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
}
SetVhealth(vehicleid, health); // where health stands for the value of the health you want to set it to