Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Creator: Bolodefchoco
- --Made in: 27/05/2016
- --Last update: 27/05/2016
- --[[ Notes:
- Does:
- Uma rotação automática sem usar função.
- ]]--
- TIME_PERMAP = 2.5 --< Altere 2.5 (2m e 30s) para o tempo que cada mapa deverá começar
- maps = {0,1,2,3} --< Introduza todos os mapas aqui
- tfm.exec.disableAutoNewGame()
- system.players=function()
- local alive,players = {},{}
- for k,v in next,tfm.get.room.playerList do
- if not v.isDead then
- alive[#alive+1]=k
- end
- players[#players+1]=k
- end
- return alive,players
- end
- eventLoop=function(time)
- local alive = system.players()
- if time <= 0 or #alive < 1 then
- local lastMap = currentMap or 0
- repeat currentMap = maps[math.random(#maps)] until currentMap ~= lastMap
- tfm.exec.newGame(currentMap)
- end
- end
- eventNewGame=function()
- tfm.exec.setGameTime(TIME_PERMAP*60)
- end
- eventLoop(-1)
Advertisement
Add Comment
Please, Sign In to add comment