mtasa-blue
mtasa-blue copied to clipboard
onClientTrailerAttach rework
Fixed #2119 and probably #449
Now the onClientTrailerAttach event is not based on vehicle synchronization but on actual interactions with the trailer. The event can be canceled by preventing the trailer/vehicle from being attached.
I also tried the onClientTrailerDetach event to be able to cancel it but I encountered two problems
- Weird vehicle physics bugs (fixable)
- Event flood for trucks with trailers when they are in a position that detaches the trailer (in case with cancelEvent)