-stolka- Posted October 25, 2013 Posted October 25, 2013 why when i enter the maverick it starts flying id i cant control it? addEventHandler( "onResourceStart", getRootElement( ), function ( ) theVeh = createVehicle( 497,-1337.6632080078,-109.28009033203,14.1484375 ) setElementAlpha(theVeh, 0) setElementCollisionsEnabled (theVeh, false) setElementFrozen(theVeh, true) setElementData(theVeh, "veng", "veng") local room = createObject( 16665, 0,0,0) setElementDoubleSided(room, true) attachElements( room, theVeh,0,-2,0,0,0,-90 ) local chiar = createObject( 1671, 0,0,0) attachElements( chiar, theVeh,-0.35,1.6,-0.3,0,0,180 ) local radar = createObject( 16782, 0,0,0) attachElements( radar, theVeh,0,11,1.15,0,0,-90 ) local computer = createObject( 9819, 0,0,0) setElementDoubleSided(computer, true) attachElements( computer, theVeh,0,7,0,0,0,90 ) theVeh1 = createVehicle( 594,0,0,0 ) setElementAlpha(theVeh1, 0) attachElements( theVeh1, theVeh,-1.5,5.5,-0.3,0,0,0 ) local chiar1 = createObject( 1671, 0,0,0) attachElements( chiar1, theVeh1,0,0,0,0,0,180 ) theVeh2 = createVehicle( 594,0,0,0 ) setElementAlpha(theVeh2, 0) attachElements( theVeh2, theVeh,1,5.5,-0.3,0,0,0 ) local chiar2 = createObject( 1671, 0,0,0) attachElements( chiar2, theVeh2,0,0,0,0,0,180 ) end ) function warpto(source) setElementPosition(source,-1337.6632080078,-109.28009033203,15.1484375) end addCommandHandler("warpto", warpto) function enterVengeance(theVeh) dataVeng = getElementData(theVeh, "veng") if dataVeng then setElementFrozen(theVeh, false) end end addEventHandler("onPlayerVehicleEnter",root,enterVengeance)
-stolka- Posted October 26, 2013 Author Posted October 26, 2013 when i set the collision false it start flyig even if there's no one inside
Moderators IIYAMA Posted October 26, 2013 Moderators Posted October 26, 2013 Correct some kind of flying bug cause of this function: setElementCollisionsEnabled Remove the collision of the attached elements instead of the vehicle. Or use this function instead at clientside: setElementCollidableWith
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