Moony Posted February 20, 2020 Share Posted February 20, 2020 (edited) I'm having trouble translating the scripts into colloquial language (to build the concepts in my head and understand what happens and what triggers the events). My ultimate objective is to add a help window that shows the functions of my server. This is what I researched so far: *I know some things may be obvious to the experienced developer. My intension is to "think out loud" so, if I'm mistaken, the reader(s) will point out my errors. With a stock MTA, pressing 'F9' (resource: helpmanager) opens a help window that shows two tabs: 'votemanager' and 'freeroam'. Respectively, each are run by their own resource that go by the same names. This means that if I stop one, the tab will be gone; If I stop both, there will be no tabs visible. Therefore, it is safe to say that both tabs are being added by a script (the window elements creation, the text, the size, etc), into the 'helpmanager' help window. While I can edit either tab to show the desired info, if I plan on stopping both resources (votemanager and freeroam) from starting in the near future, they will not be visible. Thus, the only path left I have is to add a script of my own that will only show the desired info in a new tab on the 'F9' help window. My questions are: - How can I create a text inside new tab inside the window of another script? *I know how to create a window. My issue is creating an uneditable text inside the window of a different resource. - How can I stop 'votemanager' and 'freeroam' from starting when the server.exe is ran. *I've tried looking for the resource in mtaserver.conf, but I can't find any trace of a resource that's related to freeroam. I do want to keep 'play', for the moment. Edited February 20, 2020 by Moony Formatting Guidelines Link to comment
ReZurrecti0n Posted February 20, 2020 Share Posted February 20, 2020 <!-- Specifies resources that are loaded when the server starts and/or which are protected from being stopped. To specify several resources, add more <resource> parameter(s). --> <resource src="EXAMPLE" startup="1" protected="0" /> <resource src="GUIEdit" startup="1" protected="0" /> <resource src="SFXBrowser" startup="1" protected="0" /> </config> Look for something similar in the above code at the very bottom of your mtaserver.conf and this will determine what resources start up automatically on the server. Remove whatever resource lines out that you don't want to auto load on server startup. You may also manually start or stop a resource by simply typing in "start EXAMPLE" or "stop EXAMPLE" in the console to start or stop running a resource. I would recommend getting and using the GUIEditor resource to easily make GUIs with. https://community.multitheftauto.com/index.php?p=resources&s=list&name=guiedit&descr=&category= Link to comment
Moony Posted February 20, 2020 Author Share Posted February 20, 2020 22 minutes ago, ReZurrecti0n said: I would recommend getting and using the GUIEditor resource to easily make GUIs with. https://community.multitheftauto.com/index.php?p=resources&s=list&name=guiedit&descr=&category= I'll definitely check that out. 22 minutes ago, ReZurrecti0n said: Look for something similar in the above code at the very bottom of your mtaserver.conf and this will determine what resources start up automatically on the server. Remove whatever resource lines out that you don't want to auto load on server startup. That is pricesly the issue. I want to stop 'freeroam', but there is no 'freeroam' in the mtaserver.conf. I dare to say there is some kind of parent that's handling several resources, including 'freeroam'. Spoiler <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" /> <resource src="spawnmanager" startup="1" protected="0" /> <resource src="voice" startup="1" protected="0" /> <resource src="votemanager" startup="1" protected="0" /> <resource src="webadmin" startup="1" protected="0" /> <resource src="hedit" startup="1" protected="0" /> <resource src="fpsping" startup="1" protected="0" /> <resource src="openDoors" startup="1" protected="0" /> <resource src="petardos" startup="1" protected="0" /> <resource src="[mods]" startup="1" protected="0" /> <resource src="[wheelposition]" startup="1" protected="0" /> <resource src="asado" startup="1" protected="0" /> <resource src="[weaponSounds]" startup="1" protected="0" /> <resource src="vehremover" startup="1" protected="0" /> <resource src="SpawnVeh" startup="1" protected="0" /> <resource src="JoinPosition" startup="1" protected="0" /> <resource src="LoginWindow" startup="1" protected="0" /> <resource src="glue" startup="1" protected="0" /> <resource src="pubgcompass" startup="1" protected="0" /> Link to comment
ReZurrecti0n Posted February 21, 2020 Share Posted February 21, 2020 5 hours ago, Moony said: That is pricesly the issue. I want to stop 'freeroam', but there is no 'freeroam' in the mtaserver.conf. I dare to say there is some kind of parent that's handling several resources, including 'freeroam'. Hmm, that could be... I'm afraid I'm not familiar with the default resources as I myself cut them ALL out and only use what I create myself... Make some form of backup Then plug and play with it and see what happens, try removing any resource you don't think you use and keep only the ones you actually do use etc. Link to comment
Moony Posted February 21, 2020 Author Share Posted February 21, 2020 54 minutes ago, ReZurrecti0n said: Hmm, that could be... I'm afraid I'm not familiar with the default resources as I myself cut them ALL out and only use what I create myself... Make some form of backup Then plug and play with it and see what happens, try removing any resource you don't think you use and keep only the ones you actually do use etc. Alrighty. I will see what I can do, and how I do with a complete wipe and start from scratch. Thanks for taking the time and patience Link to comment
ReZurrecti0n Posted February 21, 2020 Share Posted February 21, 2020 2 hours ago, Moony said: how I do with a complete wipe and start from scratch. Well, you just remove ALL those resource lines and then only add in the resource(s) you created To make a resource, you just need a script file and the meta file for it inside a folder or zip file (But keep in mind, your server will have nothing except what you created basically...) Link to comment
Moony Posted February 21, 2020 Author Share Posted February 21, 2020 1 minute ago, ReZurrecti0n said: Well, you just remove ALL those resource lines and then only add in the resource(s) you created To make a resource, you just need a script file and the meta file for it inside a folder or zip file (But keep in mind, your server will have nothing except what you created basically...) I found a way to edit the necessary files without losing my stuff. It's safer but less practical, as there are a lot of resources I am not using; but since I don't know the use of many of the default resources, I would prefer to stay away from the complicated stuff. What I did was create a "Stock MTA" backup, and unzip what I need. So, if I want to mess around with any of the resources, I can simply look for it, unzip everything, edit it, and move it to the original resource. This way, I only tried to get rid of all the vehicle spawns from the gamemode 'play'. It didn't work; apparently, there is something else managing the spawns. I still need to do more research. 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