How to Disable Vehicle (Can't be Driven) [+Rep] - 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: How to Disable Vehicle (Can't be Driven) [+Rep] (
/showthread.php?tid=309543)
How to Disable Vehicle (Can't be Driven) [+Rep] -
Aira - 08.01.2012
Alright, so first of all what i'm trying to do is when the Vehicle's HP is below 240 it gets set to 250 (So that it won't blow up, and its kinda Engine Failure).
Quote:
public OnPlayerUpdate(playerid)
{
new Float:health;
new veh;
veh = GetPlayerVehicleID(playerid);
GetVehicleHealth(veh, health);
if(health <240) return SetVehicleHealth(veh,250);
return 1;
}
|
EDIT: Disregard, Thanks anyway
AW: How to Disable Vehicle (Can't be Driven) [+Rep] -
BigETI - 08.01.2012
Might be usefull:
https://sampwiki.blast.hk/wiki/SetVehicleParamsEx