2kristof2 Posted March 13, 2015 Share Posted March 13, 2015 Hello, I wanted to make a bind key but when a trailer is attached to vehicle it doesn't work.. example: local gTick = 0 function DetachTrailer ( key, keyState ) local tick = getTickCount() - gTick if tick >300 then gTick=getTickCount() else return end local vehicle = getPlayerOccupiedVehicle(getLocalPlayer()) if ( keyState == "down" ) then detachTrailerFromVehicle(vehicle) end end bindKey ( "lshift", "down", DetachTrailer ) Link to comment
xXMADEXx Posted March 14, 2015 Share Posted March 14, 2015 Are there any debug errors? (/debugscript 3) Link to comment
2kristof2 Posted March 14, 2015 Author Share Posted March 14, 2015 Nope. I changed "detachTrailerFromVehicle(vehicle)" to setElementVelocity(vehicle,0,0,0.5) and it works only for vehicle without attached trailer.. @Edit I solved the problem Link to comment
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