16.01.2014, 00:25
I've got this set to shut the vehicle's engine off when the health gets below 60, but it simply doesn't shut the engine off. You keep driving.
pawn Код:
public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
new Float:health;
GetVehicleHealth(vehicleid, health);
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(health < 60)
{
SetVehicleParamsEx(vehicleid, 0, lights, alarm, doors, bonnet, boot, objective);
return 1;
}
return 1;
}