Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for name,player in pairs(tfm.get.room.playerList) do
- system.bindMouse(name,true)
- end
- id=0
- color = "0xFFFFFF"
- brush=1
- smallBrush = false
- function eventChatCommand(n,c)
- local arg={}
- for argument in c:gmatch("[^%s]+") do
- table.insert(arg, argument)
- end
- if c=="clear" then
- for i=1,id do
- ui.removeTextArea(i)
- end
- elseif c=="undo" then
- ui.removeTextArea(id)
- id=id-1
- elseif arg[1]=="undo" then
- for i=tonumber(arg[2]),id do
- ui.removeTextArea(i)
- end
- id=id-tonumber(arg[2])
- elseif arg[1]=="setcolor" then
- color="0x"..arg[2]
- elseif arg[1]=="brush" and tonumber(arg[2])<=20 and tonumber(arg[2])~=0 and not smallBrush then
- brush=arg[2]
- smallBrush = false
- elseif arg[1]=="smallbrush" then
- smallBrush = true
- end
- end
- function eventMouse(name,x,y)
- id = id + 1
- if not smallBrush then
- ui.addTextArea(id, "", nil, x, y, brush, brush, color, color)
- elseif smallBrush then
- ui.addTextArea(id, "<font size='20' color="..color..">•</font>", nil, x-8, y-17, brush+40, brush+40, color, color, 0.0)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment