Big Smoker Posted December 16, 2020 Share Posted December 16, 2020 Bom dia, Pessoal to a 2 dias tentando fazer um sistema que verifica quais coordenada que nao esta salva no XML so que nao ta dando certo. O que eu quero que ele verifique as coordenada, esteja igual no XML e os que nao ta no XML ele completa, tipo tenho 114 carros no mapa so que na tabela eu tenho 144 quero que ele complete esses 30 carros que falta no mapa. OBS: ------------------------------------------------------------- --- TABELA x,y,z = data[2],data[3],data[4] ------------------------------------------------------------- --- NO XML spawnX,spawnY,spawnZ = tonumber(xmlNodeGetAttribute(node,"spawnX")),tonumber(xmlNodeGetAttribute(node,"spawnY")),tonumber(xmlNodeGetAttribute(node,"spawnZ")) addCommandHandler("recu", function (ps,cmd) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(ps)),aclGetGroup("Admin")) then spawnDayZVehicles2() outputChatBox("Vehicles has been spawned!",ps,255,0,0,true) end end) function spawnDayZVehicles2() xml = xmlLoadFile("Backups/Vehicles/XVehicles.xml") for i,data in ipairs(vehSpawns["vehicleSpawns"]) do count = 0 IDVehicles = tonumber(data[2]) for i,node in ipairs(xmlNodeGetChildren(xml)) do spawnX = tonumber(xmlNodeGetAttribute(node,"spawnX")) count = count + 1 if IDVehicles then if spawnX == IDVehicles then outputChatBox("1 - Adicionado carro sem spwan! [#FF0000"..count.."#FFFFFF]",getRootElement(),255,255,255,true) -- else -- count = count + 1 -- outputChatBox("2 - Adicionado carro sem spwan! [#FF0000"..count.."#FFFFFF]",getRootElement(),255,255,255,true) end end end return end xmlUnloadFile(xml) end Link to comment
Other Languages Moderators Lord Henry Posted December 17, 2020 Other Languages Moderators Share Posted December 17, 2020 Faltou mostrar o XML. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now