Black2 Posted October 31, 2015 Posted October 31, 2015 Hello,I have this script, it adds trailer to the vehicle can see, I wonder how do to disconnect the trailer when the vehicle he comes back doing what ever the trailer is there. Any idea ? Thx. function attachTrailer (theVehicle, seat, jacked ) if ( getElementModel (theVehicle) == 514 ) then local x,y,z = getElementPosition(theVehicle) trailer = createVehicle ( 584, x-11, y, z) setElementRotation (trailer, getElementRotation (theVehicle)) attachTrailerToVehicle (theVehicle, trailer) end end addEventHandler("onPlayerVehicleEnter", getRootElement(), attachTrailer)
DNL291 Posted November 1, 2015 Posted November 1, 2015 Use detachTrailerFromVehicle. I didn't understand when exactly the trailer should be detached. Please do not PM me with scripting related question nor support, use the forums instead.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now