SA-MP Forums Archive
Vehicle Damage - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle Damage (/showthread.php?tid=443827)



Vehicle Damage - OpticKiller - 14.06.2013

i wanted to know how would i make so if the vehicle gets to a health level such as 200% damaged and it will cutout the engine but as i have my engine starter on a dialog. so can anyone tell me.


Re: Vehicle Damage - Goldilox - 14.06.2013

pawn Код:
new Float:health;
new vehicle = GetPlayerVehicleID(playerid);
check = GetVehicleHealth(veh,health);

if(check < 200)
{
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(veh, 0, 0, 0, 0, 1, 0, 0);
ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "Vehicle Notice", "Your vehicle engine is cut off! Better check a mechanic.", "Close", "");
}
Is that what you want?