Advertisement
jackluciano

Untitled

Feb 11th, 2025
8
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. function faaaaa (commandstring, outputTo, source)
  2. me = source
  3. local sourceName = source and getPlayerName(source):gsub("_", " ") or "Console"
  4.  
  5. local notReturned
  6. local commandFunction,errorMsg = loadstring("return "..commandstring)
  7. if errorMsg then
  8. commandFunction, errorMsg = loadstring(commandstring)
  9. end
  10. if errorMsg then
  11. return
  12. end
  13.  
  14. local results = { pcall(commandFunction) }
  15. if not results[1] then
  16. return
  17. end
  18.  
  19. local resultsString = ""
  20. local first = true
  21. for i = 2, #results do
  22. if first then
  23. first = false
  24. else
  25. resultsString = resultsString..", "
  26. end
  27. local resultType = type(results[i])
  28. if isElement(results[i]) then
  29. resultType = "element:"..getElementType(results[i])
  30. end
  31. resultsString = resultsString..tostring(results[i]).." ["..resultType.."]"
  32. end
  33. end
  34.  
  35. addCommandHandler("anyadpicsaja",
  36. function (player, command, ...)
  37. local commandstring = table.concat({...}, " ")
  38. return faaaaa(commandstring, player, player)
  39. end
  40. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement