Advertisement
Thetroz

Ovejanizar usuarios con !oveja nombredeusuario

Oct 2nd, 2016
895
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. function eventChatCommand (player, command)
  2. local args = {}
  3. for arg in command:gmatch ("[^%s]+") do
  4.     table.insert (args, arg)
  5. end
  6.  
  7. if args[1] == "oveja" and args[2] == "todos" then
  8. for name,mouse in pairs(tfm.get.room.playerList) do
  9.     tfm.exec.killPlayer (name)
  10.     tfm.exec.addShamanObject (40, mouse.x, mouse.y)
  11. end
  12. elseif args[1] == "oveja" and tfm.get.room.playerList[capitalize(args[2])] then
  13.     local mouse = tfm.get.room.playerList[capitalize(args[2])]
  14.     tfm.exec.killPlayer (capitalize(args[2]))
  15.     tfm.exec.addShamanObject (40, mouse.x, mouse.y)
  16. end
  17. end
  18.  
  19. function capitalize (word)
  20.     return string.upper (word:sub(1,1)) .. string.lower (word:sub(2));
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement