i tried to scripting to edior mode , select object and create another one .
code :
function start(player)
outputChatBox("welcome to neri tools" )
end
function createandmove(player)
if selectedElement ~= nil then
createObject ( 1337, 5540.6654, 1020.55122, 1240.545, 90, 0, 0 )
newobject = createObject( model, x, y, z , 90, 0, 0 )
end
end
function click(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement)
if ( clickedElement ) then
selectedElement = clickedElement
model = getElementModel(selectedElement)
x , y , z = getElementPosition(selectedElement)
outputChatBox(tostring(x) .. " ".. tostring(y) .. " ".. tostring(z) .. " ".. tostring(model))
else
selectedElement = nil
end
end
addEventHandler( "onClientResourceStart",getRootElement( ) , start )
addCommandHandler("create",createandmove)
addEventHandler ( "onClientClick", getRootElement(), click )
the select object is work , but its not create the object with no errors , please help me with that , and if you have better way to select object go for it. thanks