How to check truck trailer
#1

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! )
Reply
#2

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

Greetings
~ Kevin
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)