Right Thank you very much so it is spawning but It is not visible I have used getelementmodel to check to see if the object is being created and it is but just cannot see it any idea why i have tried using setelementinterior 0 and setelementdimension 0
function loadObjects()
local nrQuery = dbQuery(sqlConnection, "SELECT * FROM landobjects")
local rQuery = dbPoll( nrQuery, -1 )
if (rQuery) then
if (loaded == 0) then
for _, row in ipairs(rQuery) do
print(row["ox"])
if (not row) then outputChatBox( "no row", getRootElement()) break end
local mid = row["mid"]
if (not mid) then outputChatBox( "No model ID", getRootElement( )) break end
local ox = row["ox"]
local rox = row["rox"]
local oy = row["oy"]
local roy = row["roy"]
local oz = row["oz"]
local roz = row["roz"]
local object = createObject( mid, oz, oy, oz, rox, roy, roz, false)
setElementDimension( object, 0 )
setElementInterior( object, 0)
print(getElementModel( object ))
if (row["ds"] == 1) then
setElementDoubleSided( object, true )
else
setElementDoubleSided( object, false )
end
table.insert(LCobs, object)
triggerClientEvent( "objectStream", getRootElement( ), object, mid )
loaded = 1
end
else
clearLoadedObjects()
loadObjects()
loaded = 0
outputChatBox( "Objects Reloaded" )
end
else
outputChatBox( "No Objects to Load")
loaded = 0
end
end
addCommandHandler( "loadall", loadObjects )