hhaos

Untitled

Jun 2nd, 2022
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. -- check classes
  2. local classes, alreadyon = {}, {}
  3. for w in string.gmatch(matches[2], "%a+") do
  4. if svo.classes[w] and not svo.enabledclasses[w] then classes[#classes+1] = w -- weed out invalid names
  5. elseif svo.classes[w] and svo.enabledclasses[w] then alreadyon[#alreadyon+1] = w end
  6. end
  7.  
  8. for i = 1, #classes do
  9. svo.enableclass(classes[i])
  10. end
  11.  
  12. local setsomething = false
  13. if classes[1] then
  14. svo.echof("Enabled %s %sclass%s.", svo.concatand(classes), (not only and '' or "only the "), (#classes == 1 and '' or 'es'))
  15. setsomething = true
  16. end
  17. if alreadyon[1] then
  18. svo.echof("%s %s already on.", svo.concatand(alreadyon):title(), (#alreadyon == 1 and 'is' or 'are'))
  19. setsomething = true
  20. end
  21.  
  22. if not setsomething then
  23. svo.echof("'%s' isn't something you can change.", matches[2])
  24. end
Add Comment
Please, Sign In to add comment