Guest User

Lights

a guest
Dec 7th, 2013
848
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. pAtOnce=50
  2. radiusX=100
  3. radiusY=100
  4. id=0
  5.  
  6. function eventLoop(ct,tr)
  7. for i=1,id do
  8. ui.removeTextArea(i,nil)
  9. end
  10. id=0
  11. for i=1,pAtOnce do
  12. color=math.random(0x000000, 0xFFFFFF)
  13. ui.addTextArea(i,"",nil,math.random(400-radiusX*4,400+radiusX*4),math.random(200-radiusY*2,200+radiusY*2),1,1,color,color,0.75,true)
  14. id=id+1
  15. end
  16. end
  17.  
  18. function eventChatCommand(p,c)
  19. if c:sub(0,3)=="par" and tonumber(c:sub(5))<=1000 then
  20. pAtOnce=c:sub(5)
  21. elseif c:sub(0,2)=="rx" then
  22. radiusX=c:sub(4)
  23. elseif c:sub(0,2)=="ry" then
  24. radiusY=c:sub(4)
  25. end
  26. print("<v>["..p.."] <n>"..c)
  27. end
  28.  
  29. system.disableChatCommandDisplay("par",true)
  30. system.disableChatCommandDisplay("rx",true)
  31. system.disableChatCommandDisplay("ry",true)
  32. print("<p align='left'>\n<n>Hello there, want <j>less/more lights <n>on the screen? Type <j>'!par number'<n>!\nWant the lights to go <j>further/closer<n>? Type <j>'!rx number' <n>or <j>'!ry number'<n>!</p>")
Advertisement
Add Comment
Please, Sign In to add comment