wassimevicw

ArtMice

Feb 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. color = {}
  2.  
  3. for name,player in pairs(tfm.get.room.playerList) do
  4. system.bindMouse(name, true)
  5. color[name] = 0
  6. end
  7.  
  8. -- Black = 0x000000
  9. -- Green = 0x43eb00
  10. -- Blue = 0x0000ff
  11.  
  12. -- ui.showColorPicker
  13. id = 0
  14.  
  15. function eventMouse(n, x, y)
  16. id = id + 1
  17. ui.addTextArea(id, "", nil, x, y, 6, 6, color[n], color[n] + 1, 1, false)
  18. end
  19.  
  20. function eventChatCommand(n,cmd)
  21.   if cmd == "clear" then
  22.     for i=1,id do
  23.       ui.removeTextArea(i)
  24.     end
  25.     id=1
  26.   end
  27.   if cmd == "color" then
  28.     ui.showColorPicker(1,n,0,"Select Color")
  29.     end
  30. end
  31.  
  32. function eventColorPicked(id, name, colorr)
  33.   color[name] = colorr
  34. end
Add Comment
Please, Sign In to add comment