SA-MP Forums Archive
How to check truck trailer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to check truck trailer (/showthread.php?tid=399115)



How to check truck trailer - Stm - 12.12.2012

Ok so im trying to do is when i attach a trailer with my truck i want to check what kind of trailer im pulling and to have different checkpoints on every trailer.Lets just say if im pulling a tanker and type in /load to load only fuel and oil from any location on the map to a gas station, if im pulling an artic trailer to /load only frozen foods and stuff like that.I have made the /load command still have room for improvement . I only can't figure out how to do this just to check what kind of trailer im puking and to give me the missions only for that trailer.



(Sorry for my English! )


AW: How to check truck trailer - Kevin54321 - 13.12.2012

Hello Stm
Read these two functions:
https://sampwiki.blast.hk/wiki/GetPlayerVehicleID
https://sampwiki.blast.hk/wiki/GetVehicleModel

Greetings
~ Kevin


Re: How to check truck trailer - Threshold - 13.12.2012

As well as:
https://sampwiki.blast.hk/wiki/GetVehicleTrailer
https://sampwiki.blast.hk/wiki/IsTrailerAttachedToVehicle
https://sampwiki.blast.hk/wiki/AttachTrailerToVehicle
https://sampwiki.blast.hk/wiki/DetachTrailerFromVehicle

Using all these functions will help you create this, otherwise you can try your luck in the script request thread and hope that someone makes the script for you. If you want to post in the Scripting help section, have a crack at the code first, however do it separately from your script, as you don't want to destroy any of your current code.