Advertisement
Novohp

#DeadlyHunt

Oct 23rd, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.13 KB | None | 0 0
  1. tfm.exec.chatMessage =print
  2. tfm.exec.disableAutoShaman()
  3. newData = {}
  4. p = {}
  5. teamtime=false
  6.  
  7. ----------------------
  8. -- <procedure>
  9. -- Sistema de teams
  10. -- @Define se o jogador é do time red ou blue.
  11. ----------------------
  12. function eventNewGame()
  13.   for p,n in pairs(tfm.get.room.playerList) do
  14.     if teamtime == false then
  15.       newData[p].Team = "Survivor"
  16.       tfm.exec.setNameColor(p, 0xCB546B)
  17.       tfm.exec.chatMessage("<R>Você nasceu como um sobrevivente! Corra dos caçadores!!",p)
  18.       teamtime=true
  19.     else
  20.       newData[p].Team = "Hunter"
  21.       tfm.exec.setNameColor(p, 0x2F7FCC)
  22.       tfm.exec.chatMessage("<BV>Você nasceu como um caçador! Vá atrás dos sobreviventes!!",p)
  23.       teamtime=false
  24.     end
  25. end
  26. end
  27. function eventNewPlayer(name)
  28. newData[name] = {
  29.     Team = "Neutro",
  30.     Xp = 40
  31. }
  32.  
  33.  
  34. ui.addTextArea(2, "", name, 254, 375, 131, 8, 0x006191, 0x006191, 1, true)
  35. ui.addTextArea(0, "<p align='center'>"..newData[name].Xp.."/100</p>", name, 250, 373, 226, 13, 0x324650, 0x000000, 0.4, true)
  36.  
  37. end
  38. tfm.exec.newGame(0)
  39. ui.setMapName("DeadlyHunt")
  40. table.foreach(tfm.get.room.playerList,eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement