SHARE
TWEET

Untitled

a guest Oct 17th, 2019 161 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tag = getResourceInfo ( getThisResource(), "tag" )
  2. tag = tostring(tag)
  3. addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), function()
  4.     for k,v in ipairs(getResources()) do
  5.     if string.find(getResourceName(v), tag) or string.lower(string.find(getResourceName(v), tag)) or string.upper(string.find(getResourceName(v), tag)) then
  6.         stopResource(v)
  7.         outputDebugString(getResourceName(v).." stopped.")
  8.     end
  9.     end
  10. end)
  11.  
  12.  
  13. addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function()
  14.     for k,v in ipairs(getResources()) do
  15.     if string.find(getResourceName(v), tag) or string.lower(string.find(getResourceName(v), tag)) or string.upper(string.find(getResourceName(v), tag)) then
  16.         startResource(v)
  17.         outputDebugString(getResourceName(v).." started.")
  18.         end
  19.     end
  20. end)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top