abadabadu Posted July 8, 2015 Share Posted July 8, 2015 The way to share functions between resources is /export tag in meta and call function. Questions: 1. Since export's goal is to share functions between different resources, is there any way to share functions between scripts in the same resource? Does same export tag and call do this work? 2. Is there any page with information about how many MTA servers exists in the world? Or average? Information about count of MTA players online in the world? Any statistics information? Link to comment
Wojak Posted July 8, 2015 Share Posted July 8, 2015 1. Since export's goal is to share functions between different resources, is there any way to share functions between scripts in the same resource?Does same export tag and call do this work? If you have more then one server side script (or more then one client side) You simply make the function global (all function ale global by default, you need to use local keyword to make them local) and that function will be accessible in any file of the specific side. In order to call a server side function from client you can use triggerServerevent and add the event server side, In order to call a client side function from server you can use triggerClientevent and add the event client side. The alternative to the event system is to use the "shared" keyword in meta.xml, though I never do that... So in theory you can create a file called utility.lua write some global functions there and add this line to meta.xml: 2. Is there any page with information about how many MTA servers exists in the world? Or average? Information about count of MTA players online in the world? Any statistics information? The mta server browser displays that information, you can also look for sites like this: http://www.game-state.com/index.php?spp=50&game=mta 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