lcd12321 Posted August 25, 2014 Share Posted August 25, 2014 addCommandHandler ( "chargeacum", function ( thePlayer ) if isPedInVehicle( thePlayer ) then local theVehicle = getPedOccupiedVehicle( thePlayer ) local theDriver = getVehicleController( theVehicle ) if theDriver == thePlayer then local x,y,z = getElementPosition( theVehicle ) outputChatBox( 'x = '..x..' y = '..y..' z = '..z ) local fx,fy,fz = getElementRotation( theVehicle ) outputChatBox( 'fx = '..fx..' fy = '..fy..' fz = '..fz ) local theCuboid = createColCuboid( x, y, z, 5, 1, 1 ) local result = setElementRotation( theCuboid, fx, fy, fz ) outputChatBox( tostring(result) ) end end end ) but result is false. Why? Link to comment
Mr_Moose Posted August 25, 2014 Share Posted August 25, 2014 Anything in /debugscript? Link to comment
Et-win Posted August 25, 2014 Share Posted August 25, 2014 local theCuboid = createColCuboid( x, y, z, 5, 1, 1 ) Did this not return 'false'? Link to comment
lcd12321 Posted August 25, 2014 Author Share Posted August 25, 2014 no. U can check it yourself Link to comment
Et-win Posted August 25, 2014 Share Posted August 25, 2014 Why don't you just do: local theCuboid = createColCuboid( fx, fy, fz, 5, 1, 1 ) ? Link to comment
lcd12321 Posted August 25, 2014 Author Share Posted August 25, 2014 because u offer use degrees for coordinates Link to comment
lcd12321 Posted August 25, 2014 Author Share Posted August 25, 2014 topic can be close https://forum.multitheftauto.com/viewtopic.php?f=91&t=56515 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