Car 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: Car Damage (
/showthread.php?tid=280265)
Car Damage -
lukas567 - 31.08.2011
Hello!
Is there any function that checks if player damaged vehicle? Example: If player damage vehicle to wall or other object, engine will turn off.
Thanks!
Re: Car Damage -
Universal - 31.08.2011
Quote:
Originally Posted by lukas567
Hello!
Is there any function that checks if player damaged vehicle? Example: If player damage vehicle to wall or other object, engine will turn off.
Thanks!
|
There is:
GetVehicleHealth( vehicleid, &Float: health );
Re: Car Damage -
lukas567 - 31.08.2011
But this will get vehicle health but i need to check if vehicle health gets down
Re: Car Damage -
wouter0100 - 31.08.2011
A callback like
OnVehicleDamage(vehicleid, Damage)?
Re: Car Damage -
=WoR=Varth - 31.08.2011
Use timer, savew the first vehicle health into variable and check it on the next time the callback called by timer.
Re: Car Damage -
lukas567 - 31.08.2011
Quote:
Originally Posted by wouter0100
A callback like
OnVehicleDamage(vehicleid, Damage)?
|
There is no callback like that ;(
Re: Car Damage -
CaHbKo - 31.08.2011
https://sampwiki.blast.hk/wiki/OnVehicleDamageStatusUpdate
Re: Car Damage -
Darnell - 31.08.2011
https://sampforum.blast.hk/showthread.php?tid=276059
Re: Car Damage -
lukas567 - 31.08.2011
Quote:
Originally Posted by Darnell
|
Thanks for your help
Re: Car Damage -
Darnell - 31.08.2011
No problem.