Quiz Posted March 14, 2013 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?
Anderl Posted March 14, 2013 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 --> "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
Quiz Posted March 15, 2013 Author 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?
50p Posted March 15, 2013 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. - MTA Script Editor - Ask your scripting questions properly, please. - 50p's public resources - Meta.xml - what is it for? How is it possible LOL
Anderl Posted March 15, 2013 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. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
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