Advertisement
wassimevicw

ArtMice v3.0

Feb 21st, 2018
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.12 KB | None | 0 0
  1. color = {}
  2. width = {}
  3. height = {}
  4. for name,player in pairs(tfm.get.room.playerList) do
  5. system.bindMouse(name, true)
  6. color[name] = 1
  7. width[name] = 6
  8. height[name] = 6
  9. end
  10.  
  11. -- Black = 0x000000
  12. -- Green = 0x43eb00
  13. -- Blue = 0x0000ff
  14.  
  15. -- ui.showColorPicker
  16. id = 0
  17.  
  18. function eventMouse(n, x, y)
  19. id = id + 1
  20. ui.addTextArea(id, "", nil, x, y, width[n], height[n], color[n], color[n]+0.5, 1, false)
  21. end
  22.  
  23. function eventChatCommand(n,cmd)
  24.   if cmd == "clear" then
  25.     for i=1,id do
  26.       ui.removeTextArea(i)
  27.     end
  28.     id=1
  29.   end
  30.   if cmd == "color" then
  31.     ui.showColorPicker(1,n,0,"Select Color")
  32.     end
  33.  
  34. if cmd == "x" then
  35. ui.addTextArea(-5, "<p align='right'><font size='18'><font color='#c6154d'><a href='event:closew'>X</a>\n<p align='center'><font size='18'><font color='#6683ba'>الحجم\n<p align='center'><font size='18'><font color='#1ca8af'><a href='event:+w'>+\n<p align='center'><font size='18'><font color='#1ca8af'><a href='event:-w'>-\n", n, 348, 139, 111, 108, 0x324650, 0x000000, 1, true)
  36. end
  37. if cmd == "y" then
  38. ui.addTextArea(-6, "<p align='right'><font size='18'><font color='#c6154d'><a href='event:closeh'>X</a>\n<p align='center'><font size='18'><font color='#6683ba'>الحجم\n<p align='center'><font size='18'><font color='#1ca8af'><a href='event:+h'>+\n<p align='center'><font size='18'><font color='#1ca8af'><a href='event:-h'>-\n", n, 348, 139, 111, 108, 0x324650, 0x000000, 1, true)
  39. end
  40. end
  41.  
  42.  
  43. function eventColorPicked(id, name, colorr)
  44.   color[name] = colorr
  45. end
  46.  
  47. function eventTextAreaCallback(id,name,callback)
  48. if callback == "closew" then
  49.     ui.removeTextArea(-5,name)
  50. end
  51. if callback == "closeh" then
  52.     ui.removeTextArea(-6,name)
  53. end
  54. if callback == "+w" then
  55.     if width[name] < 100 then
  56.   width[name] = width[name] + 1
  57.       end
  58. end
  59.  
  60. if callback == "-w" then
  61.     if width[name] > 0 then
  62.   width[name] = width[name] - 1
  63.       end
  64. end
  65.   if callback == "+h" then
  66.     if height[name] < 100 then
  67.   height[name] = height[name] + 1
  68.       end
  69. end
  70.  
  71. if callback == "-h" then
  72.     if height[name] > 0 then
  73.   height[name] = height[name] - 1
  74.       end
  75. end
  76. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement