Vehicle Break Down
#1

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.
Reply
#2

pawn Код:
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");
}
You'll need a SetTimer to check vehicles's player health.

Note: When life of vehicle is lower than 300, the vehicle starts burning...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)