Advertisement
Tectoon

[TFM] Passar Mapas Automaticamente

Sep 5th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1. tfm.exec.disableAutoNewGame(true);
  2. mapas={"1", "2", "3", "4", "5", "6", "7", "8", "9", "10"}
  3.  
  4. function nextRound()
  5.     tfm.exec.newGame(mapas[math.random(#mapas)]);
  6. end
  7.  
  8. function eventNewGame()
  9.     vivo=0
  10.     for name,player in pairs(tfm.get.room.playerList) do
  11.         vivo=vivo+1
  12.     end
  13. end
  14.  
  15. function eventPlayerDied(name)
  16.     vivo=vivo-1
  17. end
  18.  
  19. function eventPlayerWon(name)
  20.     vivo=vivo-1
  21. end
  22.  
  23. function eventLoop(tempoPassado, tempoFaltando)
  24.     if vivo == 0 or tempoFaltando < 1000 then
  25.         nextRound();
  26.     end
  27. end
  28.  
  29. nextRound();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement