Author Topic: Questions about XML  (Read 4432 times)

ZX_Lost_Soul

  • Newbie
  • *
  • Posts: 25
  • Karma: +1/-1
    • View Profile
Questions about XML
« on: February 22, 2013, 08:22:39 pm »
Hi all! My English very poor, but I need your advice.

How I can run a server command "reload_content" from the script? Or maybe some function to reload content.xml ? I need it for in-game content editor (I'll post it when it was completed).

And there is no info in the wiki about XML functions :( Can anyone, please, write example code, how to REMOVE this line form the content.xml?
Code: [Select]
<vehicle model="112" x="298.360046" y="-7.000920" z="16.286818" angle="212.322281" col1="-1" col2="-1" />
My English is very poor, please try to understand me)

Vortrex

  • Full Member
  • ***
  • Posts: 267
  • Karma: +54/-73
    • View Profile
Re: Questions about XML
« Reply #1 on: February 22, 2013, 08:37:07 pm »
How I can run a server command "reload_content" from the script?
I think you can use this to reload your content.xml
Code: [Select]
SendRconCommand("reload_content");
Can anyone, please, write example code, how to REMOVE this line form the content.xml?
Code: [Select]
<vehicle model="112" x="298.360046" y="-7.000920" z="16.286818" angle="212.322281" col1="-1" col2="-1" />
If you want to remove a line from your content.xml, a text/code editor such as Notepad++ can be useful.

Other than that, I don't know much about XML or LU's abilities for XML manipulation. I'm sure somebody else will answer that question.

Nihau

  • Newbie
  • *
  • Posts: 49
  • Karma: +27/-18
    • View Profile
Re: Questions about XML
« Reply #2 on: February 23, 2013, 02:36:49 pm »
Though xml documentation on the wiki leads to red links,   Location Saver by Force can give you a little example

I want to believe that LU Testers have all required information regarding this question.

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: Questions about XML
« Reply #3 on: February 24, 2013, 12:23:55 pm »
Though xml documentation on the wiki leads to red links,   Location Saver by Force can give you a little example

I want to believe that LU Testers have all required information regarding this question.

It's not just testers, it's people who ask it to the developers. Sure, We testers are sometimes less ignored when it comes to asking. But you're all free to ask if something isn't on the wiki.

SugarD

  • Argonath RPG Dev/Manager
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: Questions about XML
« Reply #4 on: March 01, 2013, 02:55:45 am »
Removing a line from the XML file is simple. Just remove it. The one you showed in the example just spawns a specific vehicle of a specific model, with a specific color at those specific coordinates. The entire line itself is independent of the other vehicle lines of XML code, so you can just delete the whole line and you'll be fine.

 

© Liberty Unleashed Team.