Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modo = nil
- addEventHandler('onResourceStart',root,function(recurso)
- if recurso == getThisResource() then
- for _,v in ipairs(getResources()) do
- if v.state == 'running' and v:getInfo('type') == 'gamemode' then
- modo = v.name
- triggerClientEvent('actualizarModo',root,modo,InfoModo(modo))
- end
- end
- end
- if recurso:getInfo('type') ~= 'gamemode' then return end
- if recurso.state == 'running' then
- modo = recurso.name
- end
- if modo then
- triggerClientEvent('actualizarModo',root,modo,InfoModo(modo))
- end
- end)
- addEventHandler("onPlayerLogin", root,
- function()
- if modo then
- triggerClientEvent('actualizarModo',source,modo)
- end
- end
- )
- function InfoModo(GM)
- local info = {}
- local xml = XML.load('infogui.xml') --o crear un xml para cada gm y obtener los nodos con GM..'.xml'
- if xml then
- for k,v in pairs(xml.children) do
- end
- xmlUnloadFile(xml)
- else
- outputDebugString('ERROR CRITICO > NO SE ENCONTRĂ“ EL ARCHIVO armas.xml',1,255,0,0)
- end
- return info
- end
Advertisement
Add Comment
Please, Sign In to add comment