Advertisement
hhaos

Untitled

Jun 17th, 2023
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. local nameToCheck = match[2] -- Use match instead of matches
  2.  
  3. -- Function to check if the name exists in the targetTable
  4. local function containsName(table, name)
  5. -- Convert both keys to lowercase for case-insensitive comparison
  6. local lowerName = string.lower(name)
  7. for key, _ in pairs(table) do
  8. print("Checking key:", key)
  9. if string.lower(key) == lowerName then
  10. return true
  11. end
  12. end
  13. return false
  14. end
  15.  
  16. -- Checking if the name exists in the targetTable
  17. if containsName(arc.targetTable, nameToCheck) then
  18. cecho("\npretend I'm shadow vortex")
  19. cecho("\npretend I'm shadow vortex")
  20. cecho("\npretend I'm shadow vortex")
  21. else
  22. -- Print a message if the name doesn't exist
  23. cecho("\nThe name does not exist in the targetTable")
  24. end
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement