Safwanrockz

Untitled

Oct 24th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tfm.exec.newGame ("47")
  2. players={}
  3. for name,player in pairs(tfm.get.room.playerList) do
  4.     tfm.exec.setShaman(name)
  5.     table.insert(players,name)
  6. end
  7.  
  8. tfm.exec.disableAutoNewGame(true)
  9. tfm.exec.setGameTime(0)
  10.  
  11. function eventNewGame()
  12. for name,player in pairs(tfm.get.room.playerList) do
  13.     tfm.exec.setPlayerScore(name,0)
  14. end
  15. end
  16. function eventPlayerDied(name)
  17. for name,player in pairs(tfm.get.room.playerList) do
  18.    if tfm.get.room.playerList[name].score<15 then
  19.     tfm.exec.respawnPlayer(name)
  20.    elseif tfm.get.room.playerList[name].score>=15 then
  21.     ui.addTextArea(0, "<J>"..name.."</J><BV> has lost! They won't be revived anymore!", nil)
  22.    elseif players==1 then
  23.     ui.updateTextArea(0, "<J>"..name.."</J><BV> has won the round! Starting a new round..", nil)
  24.    elseif os.time
  25.    end
  26.  end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment