SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 19/02/2015, 06:52 PM   #1
HazardouS
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: http://wiki.sa-mp.com/wiki/AttachTrailerToVehicle
To get and set the health, I used:
- http://wiki.sa-mp.com/wiki/GetVehicleHealth
- http://wiki.sa-mp.com/wiki/SetVehicleHealth

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
Old 19/02/2015, 07:28 PM   #2
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,133
Reputation: 445
Default Re: GetVehicleHealth showing 1000 HP for attached vehicles

Are you using 0.3z-r4? r4 supposedly added some patches / fixes for trailer related hacks, so it is possible something was modified incorrectly pertaining to the trailer's health.
Abagail is offline   Reply With Quote
Old 19/02/2015, 07:39 PM   #3
HazardouS
Huge Clucker
 
HazardouS's Avatar
 
Join Date: Aug 2014
Posts: 255
Reputation: 26
Default Re: GetVehicleHealth showing 1000 HP for attached vehicles

Yes, I am using 0.3z-R4-1000p, linux version.
HazardouS is offline   Reply With Quote
Old 19/02/2015, 08:52 PM   #4
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,133
Reputation: 445
Default Re: GetVehicleHealth showing 1000 HP for attached vehicles

Can you try replicating the issue in the 0.3z-r3(or a version below) server? I am highly sure it has something to do with the new trailer validation checks put in place in r4.
Abagail is offline   Reply With Quote
Old 20/02/2015, 07:20 PM   #5
HazardouS
Huge Clucker
 
HazardouS's Avatar
 
Join Date: Aug 2014
Posts: 255
Reputation: 26
Default Re: GetVehicleHealth showing 1000 HP for attached vehicles

I tested it on another gamemode (smaller, using a lot less callbacks than the first one, so it's cleaner) that is running on 0.3z-R1, the default 0.3z version. The results are the same.
HazardouS is offline   Reply With Quote
Old 01/05/2020, 12:50 PM   #6
FaLLenGirL
Huge Clucker
 
FaLLenGirL's Avatar
 
Join Date: Jan 2016
Posts: 205
Reputation: 34
Default Re: GetVehicleHealth showing 1000 HP for attached vehicles

This problem is still here on 0.3.7 R4.
__________________
FaLLenGirL is offline   Reply With Quote
Old 24/05/2020, 12:40 PM   #7
Gforcez
Gangsta
 
Gforcez's Avatar
 
Join Date: Jul 2010
Location: The Netherlands.
Posts: 767
Reputation: 435
Default Re: GetVehicleHealth showing 1000 HP for attached vehicles

Quote:
Originally Posted by FaLLenGirL View Post
This problem is still here on 0.3.7 R4.
And it will stay, development stopped (as far as we know) so don't expect a bugfix for this.
__________________

Gforcez is offline   Reply With Quote
Reply

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 03:06 AM.


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