greenops011 Posted June 1, 2022 Share Posted June 1, 2022 Not sure if this is the correct place to ask this, but here we go. I'm basically getting started on learning LUA scripting, and am trying to use an old roleplay gamemode to learn. one thing I am wondering is is there a way to find out if one particular lua script depends on another? Basically if I were to take an lua script from one section of the game mode, modify it, and test it stand-alone, I don't want to break the script, so what I'd like to try to do is use notepad++ to search for a particular string (like if the lua file calls a second lua file). Does anyone know what the code I would need to look for is? Link to comment
FernandoMTA Posted June 1, 2022 Share Posted June 1, 2022 (edited) The 2 most common ways of interacting with other resource scripts is: - calling exported functions like: exports.resourceName:functionName or exports["resourceName"]:functionName - calling events, you should look for which were added in other resources: triggerEvent, triggerServerEvent, etc Edited June 1, 2022 by FernandoMTA 1 Link to comment
Moderators IIYAMA Posted June 1, 2022 Moderators Share Posted June 1, 2022 @greenops011 If the developer sets another resource as a dependency, then the <include /> tag should have been used in the meta.xml. https://wiki.multitheftauto.com/wiki/Meta.xml If not, then indeed as Fernando explains, the functions you should look for. 1 Link to comment
greenops011 Posted June 2, 2022 Author Share Posted June 2, 2022 awesome, thanks guys. that was really helpful 2 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