09.04.2011, 02:18
How can I make it so that when the Vehicle Health is lower then 15 the car automatically breaks down and the person must call a mechanic? Thanks.
if(GetVehicleHealth(GetPlayerVehicleID(playerid)) < 15)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(GetPlayerVehicleID(playerid),VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
SendClientMessage(playerid, 0xFF0080FF, "Your engine is broken");
}