GetVehicleHealth showing 1000 HP for attached vehicles
#1

When a trailer is attached to a vehicle, its health is continuously updated to 1000.0. GetVehicleHealth will return 1000.0 health, even if /dl shows the correct value. The visible damage (doors etc) is still ... visible.
I have also created a function to set the vehicle health to a specific value, then try to get the health with the native function.
pawn Код:
SetVehicleHealth(vehicleid, 795.2);
GetVehicleHealth(vehicleid, vHP);
The result stored in vHP is 795.2 (and some more decimals, not important right now), so in this case it works fine. The function above was executed while "vehicleid" was attached to the vehicle I was driving.
If you can, please try and reproduce it. I seriously doubt that this issue is caused by my script, since OnUnoccupiedVehicleUpdate and OnTrailerUpdate are not even used.

The trailer was attached with: https://sampwiki.blast.hk/wiki/AttachTrailerToVehicle
To get and set the health, I used:
- https://sampwiki.blast.hk/wiki/GetVehicleHealth
- https://sampwiki.blast.hk/wiki/SetVehicleHealth

EDIT: Forgot to mention, the server is running on 0.3z-R4-1000p.
Reply


Messages In This Thread
GetVehicleHealth showing 1000 HP for attached vehicles - by HazardouS - 19.02.2015, 18:52
Re: GetVehicleHealth showing 1000 HP for attached vehicles - by Abagail - 19.02.2015, 19:28
Re: GetVehicleHealth showing 1000 HP for attached vehicles - by HazardouS - 19.02.2015, 19:39
Re: GetVehicleHealth showing 1000 HP for attached vehicles - by Abagail - 19.02.2015, 20:52
Re: GetVehicleHealth showing 1000 HP for attached vehicles - by HazardouS - 20.02.2015, 19:20

Forum Jump:


Users browsing this thread: 4 Guest(s)