/park command
#1

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

Yes it is.

Post your /park code.
Reply
#3

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)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)