Jump to content

[REL] Simple Script Saving / Starting


[PXG]Blue

Recommended Posts

Posted (edited)

Hello Community!

PUT SUGGESTIONS/BUG REPORTS HERE

Today i want to show you a small but very useful script, its for people that often need to shut down / restart their servers, it makes it easier and faster to get everything started again, basically, how it works:

Once all resources are Started, you type "/getRunningResources" in chat, it will save it to the XML file, if the server crashes, just start my Resource and type "/loadResources"

Requirements:

The Resource NEEDS permissions OR and accepted ACLRequest to start Resources

I will of course check the topic, but I will use github more often

I Suggest shutting down my script after starting the resources, as these commands can be used to slow down the server extremely!

Commands / Arguments:

"/getRunningResources true " = save to xml and save for mtaserver.conf, you can find the code to put into the mtaserver.conf in a file called 'mtaserver.txt', copy the content out of it and paste it into your mtaserver.conf file!

"/getRunningResources" only save to xml

"/loadResources" Load Resources ( if saved to xml before )

CODE IS NOW ON GITHUB

Have Fun!

Edited by Guest
Posted
mtaserver.conf do that too but good job

I know it works nearly the same, but i had problems adding over 50 scripts to it and adding every single one to it, my script does collect all scripts automaticly.

Posted

I know it works nearly the same, but i had problems adding over 50 scripts to it and adding every single one to it, my script does collect all scripts automaticly.

Yes, it stay a great idea

  • MTA Team
Posted

Great idea, maybe add a function to output the same but for the mtaserver.conf format would be great! So then if we wish to directly add them to the mtaserver.conf we wouldn't waste that much time ;)

Keep it up!

Posted
maybe add a function to output the same but for the mtaserver.conf format would be great! So then if we wish to directly add them to the mtaserver.conf we wouldn't waste that much time ;)

This idea is also good, to add them directly to the mtaserver.conf but if im not wrong i don't think its possible

Posted
maybe add a function to output the same but for the mtaserver.conf format would be great! So then if we wish to directly add them to the mtaserver.conf we wouldn't waste that much time ;)

This idea is also good, to add them directly to the mtaserver.conf but if im not wrong i don't think its possible

Its not possible to add it to MTAserver.conf

But i made a version that saves it in mtaserver.conf format in an TXT file, copy and paste :D

Posted
Hmm. Can you try this
../../mtaserver.conf 

Assuming this path:

resources/mtaserverconfigurator/server.lua 

Tried it, seems the mtaserver.conf is not accessable via script..

  • 2 weeks later...
Posted

Hey Blue , I tried it but its not working , Can you help me how it works ? I added it in game typed /GetRunningResources but nothing happned , I hope you will apply soon , Thanks

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...