thenuke321

Untitled

Feb 10th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.85 KB | None | 0 0
  1.  
  2. function Save (gtx)
  3.     xmlSaveFile(gtx)
  4.     outputChatBox("True")
  5. end
  6. addCommandHandler("savexml",Save)
  7.  
  8. local CLD = {
  9. {x=384.37130737305, y=2532.0554199219, z=16.546672821045, rx=384.37130737305, ry=2532.0554199219, rz=16.546672821045, dim=0},
  10. {x=321.30685424805, y=2539.3508300781, z=16.809648513794, rx=321.30685424805, ry=2539.3508300781, rz=16.809648513794, dim=0},
  11.  
  12.  
  13. }
  14.  
  15. local Num = {
  16.     {id=0},
  17.     --{id=1},
  18.     --{id=2},
  19. }
  20.  
  21. function onDA()
  22. gtx = xmlLoadFile("dclas.xml")
  23.     for a,b in pairs(CLD) do
  24.     for g,v in pairs(Num) do
  25.     troot = xmlFindChild ( gtx, "base", 0 )
  26.     xmlSaveFile(gtx)
  27.         xmlNodeSetAttribute(troot,"pos="..tostring(b["x"])..",".. tostring(b["y"])..","..tostring(b["z"]))
  28.         outputChatBox("True")
  29.         outputChatBox("pos="..tostring(b["x"])..",".. tostring(b["y"])..","..tostring(b["z"]))
  30.         end
  31.     end
  32. end
  33. addCommandHandler("Convert",onDA)
Advertisement
Add Comment
Please, Sign In to add comment