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?