SA-MP Forums Archive
/park command - 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: /park command (/showthread.php?tid=299201)



/park command - Ld Est Ld - 24.11.2011

If i type incar /park the command park and fixes my car.

But I want add that, if my car health is below 90% then you can't park.

Is it possible?


Thank You!


Re: /park command - =WoR=G4M3Ov3r - 24.11.2011

Yes it is.

Post your /park code.


Re: /park command - Kayaque - 24.11.2011

under the park command, add;
pawn Код:
new float:vHealth;
GetVehicleHealth(GetPlayerVehicleID(playerid), vHealth);
if(vHealth < 900) return SendClientMessage(playerid, color, "You cannot park your now.");
then continue the park command.

PS: Remember the health on vehicles are being counted in 1000. Not 100.
Nearly all cars catches on fire and blow up under 200 in HP. So instead of 90 in health, put 900. (which is 90% of 1000)