Z4Zy Posted February 1, 2019 Share Posted February 1, 2019 Hello ! Actually the problem is, I had to restart the server. And there are number of resources running on the server now. After restarting the server, I had to start them one by one to come into the previous position Are there any scripting solution [ or another method ] that I can obtain as a solution in this occasion ? Link to comment
Dimos7 Posted February 1, 2019 Share Posted February 1, 2019 What exacly happend the resource is not runing? Link to comment
Z4Zy Posted February 1, 2019 Author Share Posted February 1, 2019 6 hours ago, Dimos7 said: What exacly happend the resource is not runing? Nothing ! I mean to save the time that had to spend when searching and starting the stopped resource when restarting the server. Link to comment
Overkillz Posted February 1, 2019 Share Posted February 1, 2019 mtaserver.conf At the end of the file <resource src="admin" startup="1" protected="0" /> <resource src="defaultstats" startup="1" protected="0" /> <resource src="helpmanager" startup="1" protected="0" /> <resource src="joinquit" startup="1" protected="0" /> <resource src="mapcycler" startup="1" protected="0" /> <resource src="mapmanager" startup="1" protected="0" /> <resource src="parachute" startup="1" protected="0" /> <resource src="performancebrowser" startup="1" protected="0" /> <resource src="reload" startup="1" protected="0" /> <resource src="resourcebrowser" startup="1" protected="1" default="true" /> <resource src="resourcemanager" startup="1" protected="1" /> <resource src="scoreboard" startup="1" protected="0" /> .... 2 Link to comment
Z4Zy Posted February 2, 2019 Author Share Posted February 2, 2019 19 hours ago, Overkillz said: mtaserver.conf At the end of the file <resource src="admin" startup="1" protected="0" /> <resource src="defaultstats" startup="1" protected="0" /> <resource src="helpmanager" startup="1" protected="0" /> <resource src="joinquit" startup="1" protected="0" /> <resource src="mapcycler" startup="1" protected="0" /> <resource src="mapmanager" startup="1" protected="0" /> <resource src="parachute" startup="1" protected="0" /> <resource src="performancebrowser" startup="1" protected="0" /> <resource src="reload" startup="1" protected="0" /> <resource src="resourcebrowser" startup="1" protected="1" default="true" /> <resource src="resourcemanager" startup="1" protected="1" /> <resource src="scoreboard" startup="1" protected="0" /> .... exactly that is ! But the problem is I want to get the resource names currently running on the server to add there... Link to comment
Overkillz Posted February 2, 2019 Share Posted February 2, 2019 Yes you can. You must probally use onResourceStart, getResourceName. Store the name of the resources (to start them by your code) in a list and add THAT RESOURCE you have to add on the previous list mentioned. Link to comment
Moderators IIYAMA Posted February 2, 2019 Moderators Share Posted February 2, 2019 (edited) 1 hour ago, DeadthStrock said: exactly that is ! But the problem is I want to get the resource names currently running on the server to add there... You can't add them there automatic. But there are two other ways to start resources. 0. https://wiki.multitheftauto.com/wiki/GetResources https://wiki.multitheftauto.com/wiki/GetResourceState https://wiki.multitheftauto.com/wiki/XML (this can be a external or internal (meta.)xml file, and you can also generate for your mtaserver.conf file) orhttps://wiki.multitheftauto.com/wiki/JSON Ways of starting: https://wiki.multitheftauto.com/wiki/StartResource https://wiki.multitheftauto.com/wiki/RestartResource (requires admin rights) <include /> https://wiki.multitheftauto.com/wiki/Meta.xml (warning: the source resource can't be started if the included resources are missing or broken, this can be annoying or a benefit for validation) Edited February 2, 2019 by IIYAMA 1 1 Link to comment
Z4Zy Posted February 3, 2019 Author Share Posted February 3, 2019 @IIYAMA That's cool Thank You as well ... !! 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now