Car Damage
#1

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

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 );
Reply
#3

But this will get vehicle health but i need to check if vehicle health gets down
Reply
#4

A callback like
OnVehicleDamage(vehicleid, Damage)?
Reply
#5

Use timer, savew the first vehicle health into variable and check it on the next time the callback called by timer.
Reply
#6

Quote:
Originally Posted by wouter0100
Посмотреть сообщение
A callback like
OnVehicleDamage(vehicleid, Damage)?
There is no callback like that ;(
Reply
#7

https://sampwiki.blast.hk/wiki/OnVehicleDamageStatusUpdate
Reply
#8

https://sampforum.blast.hk/showthread.php?tid=276059
Reply
#9

Quote:
Originally Posted by Darnell
Посмотреть сообщение
Thanks for your help
Reply
#10

No problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)