Thetroz

Matar a un jugador al hacer click.

Feb 4th, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. system.bindMouse("Thetroz")
  2.  
  3. function matarjugador(player)
  4.  name_x=tfm.get.room.playerList[player].x
  5.  name_y=tfm.get.room.playerList[player].y
  6.     tfm.exec.killPlayer(player)
  7.         end
  8.  
  9. function eventMouse(name, x, y)
  10.  for player in pairs(tfm.get.room.playerList) do
  11.   player_x=tfm.get.room.playerList[player].x
  12.   player_y=tfm.get.room.playerList[player].y
  13.   if x<player_x+20 and x>player_x-20 then
  14.    if y<player_y+20 and y>player_y-20 then
  15.     matarjugador(player)
  16.     print("<N>Haz matado a "..player.."")
  17.    end
  18.   end
  19.  end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment