SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 17/05/2019, 03:21 PM   #1
Heress
Huge Clucker
 
Heress's Avatar
 
Join Date: Mar 2018
Location: Lithuania
Posts: 261
Reputation: 7
Default Trailer

Hello,
Did function GetVehicleHealth works on attached trailers?
__________________
==============
Sorry for my bad English









Respect: Kalcor, ******. Thank you for this great game!
Heress is offline   Reply With Quote
Old 17/05/2019, 03:51 PM   #2
Proxus
Big Clucker
 
Proxus's Avatar
 
Join Date: May 2018
Location: United Kingdom
Posts: 145
Reputation: 4
Default Re: Trailer

I've never done this but I'd just assume you'd do something similar to:

new trailerid = GetVehicleTrailer(vehicleid);
GetVehicleHealth(trailerid, health);

(this is pseudo code, you'll have to change them to fit your code needs, e.g. vehicleid may not be the same)
__________________
Developer @ Trucknation
"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity"
Proxus is offline   Reply With Quote
Old 17/05/2019, 04:04 PM   #3
Heress
Huge Clucker
 
Heress's Avatar
 
Join Date: Mar 2018
Location: Lithuania
Posts: 261
Reputation: 7
Default Re: Trailer

I know how function is working, but did attached trailers can get damage? Because it always 100
__________________
==============
Sorry for my bad English









Respect: Kalcor, ******. Thank you for this great game!
Heress is offline   Reply With Quote
Old 17/05/2019, 04:33 PM   #4
Proxus
Big Clucker
 
Proxus's Avatar
 
Join Date: May 2018
Location: United Kingdom
Posts: 145
Reputation: 4
Default Re: Trailer

Ah I see. The thing is, I'm not sure about that. I've wondered about that because my trailer never takes damage. However, I'm pretty sure only vehicles you're driving take damage now (which means that unless you're driving a trailer then I don't think it takes damage).
__________________
Developer @ Trucknation
"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity"
Proxus 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
False trailer health results when detaching trailer Correlli Bug Reports 2 13/02/2016 11:07 AM
The UEV 440 Trailer Yves Everything and Nothing 1 06/05/2014 02:12 PM
After detaching trailer from vehicle sometimes other users see trailer attached to vehicle diclofoss Bug Reports 0 26/03/2014 02:35 PM
trailer get id ombre Scripting Help 1 12/04/2012 04:16 AM
Help with trailer ihatetn931 Help Archive 7 20/01/2010 01:54 AM


All times are GMT. The time now is 07:17 PM.


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