Hi, i am very beginner in lua!
function ShowBuilding( )
local sx,sy,x,y,z = getCursorPosition ( )
local object = createObject (3596,x, y, z+299, 90, 0, 0)
ox, oy, oz = getElementPosition(object)
gz = getGroundPosition( ox, oy, oz )
createObject (3596,x, y, gz, 90+90, 0, 0)
destroyElement( object )
end
It creates the object but in wrong x, y coordinates! When i drive around where it's supposed to be created its competely in different location than my cursos was! Please help me!