Liberty Unleashed
Scripting => Scripting Discussion => Topic started by: ZX_Lost_Soul on February 22, 2013, 07: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?
<vehicle model="112" x="298.360046" y="-7.000920" z="16.286818" angle="212.322281" col1="-1" col2="-1" />
-
How I can run a server command "reload_content" from the script?
I think you can use this to reload your content.xml
SendRconCommand("reload_content");
Can anyone, please, write example code, how to REMOVE this line form the content.xml?
<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.
-
Though xml documentation on the wiki leads to red links, Location Saver by Force (http://forum.liberty-unleashed.co.uk/index.php?topic=391.0) can give you a little example
I want to believe that LU Testers have all required information regarding this question.
-
Though xml documentation on the wiki leads to red links, Location Saver by Force ([url]http://forum.liberty-unleashed.co.uk/index.php?topic=391.0[/url]) 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.
-
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.