function loadAllElevators(res)
triggerClientEvent("interior:clearElevators", getRootElement())
dbQuery(
function(qh)
local res, rows = dbPoll(qh, 0)
if rows > 0 then
for index, row in ipairs(res) do
loadOneElevator(row.id)
end
end
end,
mysql:getConnection(), "SELECT id FROM elevators")
end
setTimer(loadAllElevators,timerLoadAllElevators, 1)