Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Loco = xmlLoadFile("accountsDB.xml")
- function startup()
- for k, v in ipairs(xmlNodeGetChildren(Loco)) do
- local pos = split(xmlNodeGetAttribute(v,"pos"),string.byte(","))
- PAS = createMarker(pos[1],pos[2],pos[3]-1,"cylinder",5)
- bl = createBlip(pos[1],pos[2],pos[3]-1,63)
- setBlipVisibleDistance(bl,200)
- addEventHandler("onMarkerHit",PAS,Logic)
- end
- end
- --setTimer(startup,50,1)
- addCommandHandler("rerun",startup)
- addEvent("Zoo.zooLoop1", true)
- addEventHandler("Zoo.zooLoop1", root, startup)
- --[[
- xmlUnloadFile(Loco)
- triggerEvent("Zoo.zooLoop1",root)
- ]]--
- local reloads = false
- function reload ()
- if (not reloads) then
- reloads = true
- xmlUnloadFile(Loco)
- outputChatBox("reload")
- setTimer(reload,50,1)
- else
- reloads = false
- outputChatBox("reload2")
- Loco = xmlLoadFile("accountsDB.xml")
- triggerEvent("Zoo.zooLoop1",root)
- end
- end
- addCommandHandler("flashxml",reload)
- function inject (playerSource)
- local x,y,z = getElementPosition(playerSource)
- local account = getPlayerAccount(playerSource)
- local Name = getAccountName(account)
- local Cash = getPlayerMoney(playerSource)
- local pos = xmlFindChild(Loco,Name,0)
- if not pos then
- outputChatBox("created")
- xmlCreateChild(Loco,Name)
- outputChatBox("True")
- --setTimer(inject,50,1)
- else
- xmlNodeSetAttribute(pos,Name,Name..","..tostring(Cash)..","..x .. "," .. y .. "," .. z)
- xmlSaveFile(Loco)
- outputChatBox(x..","..y..","..z)
- outputChatBox(tostring(Name))
- outputChatBox("True1")
- end
- end
- addCommandHandler("de",inject)
- function LA (playerSource)
- local account = getPlayerAccount(playerSource)
- local Name = getAccountName(account)
- outputChatBox(tostring(Name))
- end
- addCommandHandler("LULZ",LA)
- function DAX (playerSource)
- local account = getPlayerAccount(playerSource)
- local Name = getAccountName(account)
- local LSX = xmlFindChild(Loco,Name,0)
- for k, v in ipairs(xmlNodeGetChildren(Loco)) do
- local Info = split(xmlNodeGetAttribute(v,Name),string.byte(","))
- outputChatBox(tostring(Info))
- --[[
- outputChatBox("Name: "..tostring(Info[1]))
- outputChatBox("Cash: "..Info[2])
- outputChatBox("X: "..Info[3])
- outputChatBox("Y: "..Info[4])
- outputChatBox("Z: "..Info[5])
- setElementPosition(playerSource,Info[3],Info[4],Info[5])
- setPlayerMoney(playerSource,tonumber(Info[2]))
- ]]--
- end
- end
- addCommandHandler("pull",DAX)
- function DOX (playerSource)
- local account = getPlayerAccount(playerSource)
- local Name = getAccountName(account)
- local LSX = xmlFindChild(Loco,Name,0)
- local Find = xmlFindChild(Loco,tostring(Name),0)
- local PULL = xmlNodeGetAttribute(Find,tostring(Name))
- -- outputChatBox(tostring(Name))
- outputChatBox(tostring(PULL))
- end
- addCommandHandler("DOXIN",DOX)
- function XMLLOAD ()
- Loco = xmlLoadFile("accountsDB.xml")
- if Loco then
- outputChatBox(tostring(Loco))
- outputChatBox("True")
- else
- outputChatBox("false")
- return false
- end
- end
- addCommandHandler("xmlload",XMLLOAD)
Advertisement
Add Comment
Please, Sign In to add comment