Check Vehicle's Health
#1

How do I make check the script help, and if it's less than 250, It will make the car engine shutdown and say 'Engine's vehicle is dead'


I'm new to scripting so please help me!
Reply
#2

Bump.. Help please?
Reply
#3

https://sampwiki.blast.hk/wiki/GetVehicleHealth + https://sampwiki.blast.hk/wiki/SetVehicleParamsEx
Reply
#4

pawn Код:
new Float:hp;
GetVehicleHealth(vehicleid, hp);
if(hp < 250)
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
   GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(vehicleid, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective);
    SendClientMessage(playerid,0x00FF00FF,"Engine is dead. Have a nice life.");
}
And you shouldn't bump topics so soon.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)