Advertisement
Guest User

Lights

a guest
Dec 7th, 2013
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.85 KB | None | 0 0
  1. lights={"1","2","4","9","11","13"}
  2. pAtOnce=50
  3. radiusX=100
  4. radiusY=100
  5.  
  6. function eventLoop(ct,tr)
  7. for i=1,pAtOnce do
  8. tfm.exec.displayParticle(lights[math.random(#lights)],math.random(400-radiusX*4,400+radiusX*4),math.random(200-radiusY*2,200+radiusY*2),0,0,0,0,nil)
  9. end
  10. end
  11.  
  12. function eventChatCommand(p,c)
  13. if c:sub(0,3)=="par" and tonumber(c:sub(5))<=1000 then
  14. pAtOnce=c:sub(5)
  15. elseif c:sub(0,2)=="rx" then
  16. radiusX=c:sub(4)
  17. elseif c:sub(0,2)=="ry" then
  18. radiusY=c:sub(4)
  19. end
  20. print("<v>["..p.."] <n>"..c)
  21. end
  22.  
  23. system.disableChatCommandDisplay("par",true)
  24. system.disableChatCommandDisplay("rx",true)
  25. system.disableChatCommandDisplay("ry",true)
  26. 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
Advertisement