SA-MP Forums Archive
vehicle freeze - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: vehicle freeze (/showthread.php?tid=89337)



vehicle freeze - dafel2 - 01.08.2009

How can i create a script that freezes vehicle when you are in it when the vehicle health is 400 and sends message your engine just broke.and in one minute the car health regenerates? any help?


Re: vehicle freeze - saiberfun - 01.08.2009

create a timer that checks the health
n the toggleplayercontrollable if
GetVehicleHealth(vehicleid,Float:Health)
is under400


Re: vehicle freeze - dafel2 - 01.08.2009

if i put it under onplayerupdate it would lag the server?

and i think it would spam the chat.
or i could create a timer that checks if the message is sent and when i exit vehicle it kills the timer.




Re: vehicle freeze - saiberfun - 01.08.2009

Quote:
Originally Posted by revenngeR
if i put it under onplayerupdate it would lag the server?

and i think it would spam the chat.
or i could create a timer that checks if the message is sent and when i exit vehicle it kills the timer.

what do u mean?