Dudugz

[TFM][Minigame] Explosion v0.1

May 28th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. admin=""
  2. mapa = '@6930458'
  3. p = {}
  4.  
  5. tfm.exec.disableAutoNewGame(true)
  6. tfm.exec.disableAutoShaman(true)
  7. tfm.exec.disableAutoTimeLeft(true)
  8. tfm.exec.disableAfkDeath(true)
  9.  
  10. function eventNewPlayer(name)
  11.     p[name]={
  12.         click = true,
  13.         time_click = 0,
  14.     }
  15. end
  16.  
  17. for all in pairs(tfm.get.room.playerList) do
  18.     eventNewPlayer(all)
  19. end
  20.  
  21. function eventMouse(name,x,y)
  22.     if p[name].click then
  23.         tfm.exec.explosion (x, y, 20, 100, true)
  24.         tfm.exec.displayParticle(12,x,t)
  25.         p[name].click = false
  26.         p[name].time_click = 20
  27.     end
  28. end
  29.  
  30. function eventLoop()
  31.     if not p[admin].click then
  32.         if p[admin].time_click > 0 then
  33.             ui.addTextArea(0,"<b><p align='center'><VP>"..math.floor(p[admin].time_click/2).."</p>",admin,5,370,800,40,nil,nil,80,true)
  34.             p[admin].time_click = p[admin].time_click-1;
  35.         else
  36.             p[admin].click = true
  37.         end
  38.     end
  39. end
  40.  
  41. function eventNewGame()
  42.     tfm.exec.setShaman(admin)
  43. end
  44.  
  45. system.bindMouse(admin,true)
  46. tfm.exec.setUIMapName("Power of the sprit")
  47. tfm.exec.newGame(mapa)
Add Comment
Please, Sign In to add comment