Quiz Posted March 14, 2013 Share Posted March 14, 2013 Hi guys, I just want to ask about how to install lua libraries( ex: Socket Library ) in MTA to be able to use thier functions? Link to comment
Anderl Posted March 14, 2013 Share Posted March 14, 2013 Copy the library (DLL) to the 'modules' folder located in %PATH_TO_YOUR_SERVER%/mods/deathmatch/. Then, open the file "mtaserver.conf" file located in the same folder above (%PATH_TO_YOUR_SERVER%/mods/deathmatch/) and search for module node and add the following line below them but changing the name of the DLL in this to the right one: <module src="myModule.so" /> <!-- Change "myModule" to the name of the DLL. This loads a "myModule" shared library in the server, but only for Linux. If you're using Windows, you obviously need to change the extension 'so' to 'dll' in this line --> Link to comment
Quiz Posted March 15, 2013 Author Share Posted March 15, 2013 I really don't know much in these stuff, but what I know that I have to use require() to load the library but in debugscript 3 says that it's not safe. Do you have any idea what should I do now? Link to comment
50p Posted March 15, 2013 Share Posted March 15, 2013 As I said in one of the previous topic, MTA does not allow using 3rd party libraries for security reasons therefore you can't use any Lua libraries. Link to comment
Anderl Posted March 15, 2013 Share Posted March 15, 2013 Ah, ok.. Now I got it. I thought that by "Lua libraries" you meant "modules", Quiz. By the way, there is a sockets module (there are actually two I think) that you can use. Simply download it from the MTA:SA Wiki and follow the steps I wrote above. 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