Advertisement
KananGamer

[TFM-LUA] Matar jogador com Click

May 10th, 2017
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.73 KB | None | 0 0
  1. --[[
  2.     Author: Nettoork#0000
  3. ]]--
  4.  
  5. eventMouse = function(name, x, y)
  6.     print(1)
  7.     for player, info in next, tfm.get.room.playerList do
  8.         if x >= info.x - 18 and x <= info.x + 18 and y >= info.y - 19 and y <= info.y + 19 then
  9.             tfm.exec.killPlayer(player)
  10.             if name == player then
  11.                 ui.addTextArea(1,"<p align='center'><R>[Killer]</R> O jogador <V>"..player.."</V> se matou.", nil, 5, 380, 790, 0, 1, 1, 0, true)
  12.             else
  13.                 ui.addTextArea(1,"<p align='center'><R>[Killer]</R> O jogador <V>"..player.."</V> foi assasinado por <J>"..name.."</J>.", nil, 5, 380, 790, 0, 1, 1, 0, true)
  14.             end
  15.         end
  16.     end
  17. end
  18.  
  19. eventNewPlayer = function(name)
  20.     system.bindMouse(name, true)
  21. end
  22.  
  23. table.foreach(tfm.get.room.playerList, eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement