Vazern Posted July 10, 2018 Share Posted July 10, 2018 Good night, good morning, or good afternoon! I am a beginner on the moon, I would like to know how to use string.find, or some other method, to start a mod that has a particular tag. In my case, I put the tag "[VZR]" in my mods. Thank you. Link to comment
rE5vK8bu Posted July 10, 2018 Share Posted July 10, 2018 addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),function() for _,v in ipairs(getResources())do local name = getResourceName(v) if string.find(name,"tag")then startResource(v) end end end) addEventHandler("onResourceStop",getResourceRootElement(getThisResource()),function() for _,v in ipairs(getResources())do local name = getResourceName(v) if string.find(name,"tag")then stopResource(v) end end end) 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