Advertisement
Dudugz-Contistente

Untitled

Sep 27th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. tfm.exec.disableAutoShaman(true)
  2. tfm.exec.disableAutoNewGame(true)
  3. tfm.exec.disableAfkDeath(true)
  4. tfm.exec.disableAutoTimeLeft(true)
  5.  
  6. data = {}
  7. tempo = 10
  8. players=0
  9. startTime=false
  10.  
  11. function eventNewPlayer(name)
  12. players=players+1
  13.  
  14. if players < 7 then
  15. tfm.exec.newGame("@4861682")
  16. ui.setMapName("Lobby <BL>|</BL> <R>Faltam "..(7-players).." jogadores para começar o jogo.</R>")
  17. elseif players >= 7 then
  18. startTime=true
  19. end
  20. end
  21.  
  22. function subTac(tic)
  23. tempo = tempo - tic
  24. if tempo <= 0 then
  25. tempo = 0
  26. end
  27. end
  28.  
  29. function eventLoop()
  30. if startTime and tempo > 0 then
  31. subTac(0.5)
  32. ui.setMapName("<CE>O jogo vai começar em "..tempo.." segundos</CE>")
  33. elseif startTime then
  34. startTime=false
  35. ui.setMapName("<CE>O jogo começou</CE>")
  36. end
  37. end
  38.  
  39. for i,v in pairs(tfm.get.room.playerList) do
  40. eventNewPlayer(i)
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement