Jump to content

setElementRotation problem


lcd12321

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...