SA-MP Forums

Go Back   SA-MP Forums > SA-MP > Bug Reports

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 19/02/2015, 06:52 PM   #1
Huge Clucker
HazardouS's Avatar
Join Date: Aug 2014
Posts: 255
Reputation: 26
Default GetVehicleHealth showing 1000 HP for attached vehicles

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 Code:
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:
To get and set the health, I used:

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

Last edited by HazardouS; 19/02/2015 at 07:41 PM.
HazardouS is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Object editor (While attached to vehicles) Pizzy Scripting Help 2 12/04/2013 06:37 PM
Setting Vehicles Health More Then 1000 lordturhan Scripting Help 10 12/06/2012 11:26 AM
[BUG] Objects attached to vehicles Kyle_Olsen Scripting Help 0 18/03/2012 11:10 AM
[Tutorial] [FIX] - un-attached objects on vehicles JernejL Tutorials 7 20/11/2011 06:32 PM

All times are GMT. The time now is 05:19 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.