Posts: 349
Threads: 38
Joined: Jul 2015
Reputation:
0
Is it somehow possible to create a function that gets called ONCE right when a player attaches a trailer to their truck without having to set a timer to check if the truck has trailer attached or not? As well as calling it right after they detach it?
Posts: 349
Threads: 38
Joined: Jul 2015
Reputation:
0
Oh well, i knew someone would suggest me to use IsTrailerAttachedToVehicle function, but that's not what i was looking for. I know such function doesn't exist but aren't there any ways i can create it myself?
I've seen a server where the trailer light turns on when you attach a trailer and turns off when detach.
Posts: 826
Threads: 64
Joined: Oct 2013
Reputation:
0
It IS what you are looking for.... There is no any callbacks for it so you need to do what you told not to do...
Create a timer and loop through all players, Check if there is a trailer attached to their car, if yes, get it and set its lights.