Jump to content

[Question] including resources in meta.


kieran

Recommended Posts

my meta was working fine, but recently found out you could do     <include resource="folder with meta" /> and I have done that, but for some reason, one resource fails which causes my server to break.... Here's what I'm doing, please tell me if it's wrong.

Game mode meta

<meta>
    <info author="kieran" type="gamemode" name="test" description="nothing" />
	<min_mta_version server="1.5.4-9.11305" client="1.1.1-9.03355" /> 
	<include resource="Login" />
	<include resource="resources\general_resources" />
</meta>

The folders path is "resources\general_resources"

and my meta in the folder is

<meta>
	<info author="kieranb" type="script" name="general" description="general stuff" />
	<script src="time.lua" type="server" />
	<script src="Greeting.lua" type="server" />
	<script src="antilag.lua" type="client" />	
	<script src="Spawn.lua" type="server" />
	<script src="kill.lua" type="server" />
</meta>

I keep getting an error saying it can't start the resource... :/ 

Link to comment
39 minutes ago, pa3ck said:

What do you exactly want? Do you want number of resources to start when x resource starts? Or you want them to start when the server starts?

Basically I want them to start when server starts, so I thought by including them all in game mode with the include function they would start, they are separate folders in my resources folder now and they are all called in my gamemode.xml, but I don't think it likes it...  Resources include spawns, so should I put that in gamemode instead?  It keeps giving me "failed to link to resource "<resource name>"

Edited by kieran
Link to comment

I see, but the "proper" way to start up multiple individual resources that are not dependent on other resources, is to add them in the mtaserver.conf, scroll down to the very bottom and add the following line(s)

<resource src="your-resource-name" startup="1" protected="0" />

Attributes:

  • src: the resource name. This is the only mandatory flag.
  • startup: controls whether the resource will be started with the server or not. If "1", "true" or "yes", the resource will be started. If not specified, defaults to not starting the resource.
  • protected: if "1", "true" or "yes", the resource will not be able to be stopped when started. Otherwise, even if not specified, it will default to the normal behaviour.
  • default: if given a "1", "true" or "yes" value, this resource will be the one who populates the built-in HTTP server main page, which is seen when no resource is given in the web address. It is not possible to have more than one default resource.

 

Edited by pa3ck
  • Like 1
Link to comment
4 hours ago, pa3ck said:

I see, but the "proper" way to start up multiple individual resources that are not dependent on other resources, is to add them in the mtaserver.conf, scroll down to the very bottom and add the following line(s)


<resource src="your-resource-name" startup="1" protected="0" />

Attributes:

  • src: the resource name. This is the only mandatory flag.
  • startup: controls whether the resource will be started with the server or not. If "1", "true" or "yes", the resource will be started. If not specified, defaults to not starting the resource.
  • protected: if "1", "true" or "yes", the resource will not be able to be stopped when started. Otherwise, even if not specified, it will default to the normal behaviour.
  • default: if given a "1", "true" or "yes" value, this resource will be the one who populates the built-in HTTP server main page, which is seen when no resource is given in the web address. It is not possible to have more than one default resource.

 

Thanks :D sounds easier to be honest, quicker than putting them all in gamemode.

  • Like 1
Link to comment

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...