Jump to content

Working with multiple resources


thekoyax123

Recommended Posts

Posted

Hey, so I need someone to explain me if there is a way to connect one resource with another as in being able to call its functions or trigger its events. On some other thread someone said that I can normally do it with triggerServerEvent or triggerClientEvent but obviously I can't. So is this even possible? If not, how do other servers deal with multiple resources? I mean I'm pretty sure it can be done somehow but I just don't know how.

Thanks in advance

Posted

So it doesn't matter that the .lua files are at the completely separate folders (resources), the event is added as long as the resource is running and I can trigger it from where ever I want?

Posted

Thanks, I've got this figured out but now I have a new problem. When I restart one resource the other one gets restarted as well, is there any way to prevent that? Like, I want one resource to keep going while I restart the other one. I don't if it has to do something with the event connection between the two (resource 1 triggers an event from resource 2 at some point). Any ideas?

And yeah, I've read the Server Manual on mta wiki, didn't help

Posted

You're either using includes or have a code that restarts the resource, normally it shouldn't restart the other resource.

Posted

I stated the normal behavior as far as I know. Make sure that the resource is restarted, perhaps with a debug string or a chat box message.

Make sure that there are no other resources running that might be doing that.

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