Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Creator: Bolodefchoco
- --Made in: 06/03/2016
- --Last update: 26/05/2016
- --[[ Notes:
- Does:
- Lista todos os seus mapas (Em número)
- Commands:
- !
- x --> Valor da posição horizontal
- y --> Valor da posição vertical
- w --> Valor da largura
- h --> Valor da altura
- Int --> Muda o valor para int
- Keys:
- Teclas direcionais / WASD --> Movem a textarea
- Espaço --> Aumenta a largura da textarea
- M --> Diminui a largura da textarea
- J --> Diminui a altura da textarea
- H --> Aumenta a altura da textarea
- Mouse:
- Clicar fará com que você possa adicionar um texto na textarea
- ]]--
- adm = "Bolodefchoco"
- x,y,w,h,text = 50,50,50,50,""
- ui.addTextArea(0,"",adm,x,y,w,h)
- eventKeyboard = table.foreach({0,1,2,3,string.byte(" MHJ",1,4)},function(_,k)
- system.bindKeyboard(adm,k,true,true)
- end) or function(n,k)
- x,y,w,h = (k==0 and x-1 or k==2 and x+1 or x),(k==1 and y-1 or k==3 and y+1 or y),(k==32 and w+1 or k==("M"):byte() and w-1 or w),(k==("H"):byte() and h+1 or k==("J"):byte() and h-1 or h)
- ui.addTextArea(0,text,adm,x,y,w,h)
- print('\t'..table.concat({x,y,w,h},', '))
- end
- eventChatCommand=function(n,c)
- if n == adm and #c>2 then
- for _,v in next,{'x','y','w','h'} do
- if c:sub(1,1):lower() == v then
- k = v;break
- end
- end
- if k then _G[k] = tonumber(c:sub(3)) end
- ui.addTextArea(0,text,adm,x,y,w,h)
- print('\t'..table.concat({x,y,w,h},', '))
- end
- end
- eventMouse=system.bindMouse(adm,true) or function(n,x,y)
- ui.addPopup(0,2,"Text:",adm,x,y,100,true)
- end
- eventPopupAnswer=function(i,n,a)
- text = a
- end
Advertisement
Add Comment
Please, Sign In to add comment