Advertisement
alditojeje

Untitled

Nov 3rd, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. adm="Blood#3565"
  2.  
  3. tfm.exec.disableAfkDeath(true)
  4. tfm.exec.disableAutoShaman()
  5. tfm.exec.disableAutoNewGame()
  6. tfm.exec.disableAutoTimeLeft()
  7. tfm.exec.disablePhysicalConsumables()
  8. tfm.exec.disableAutoScore()
  9. tfm.exec.newGame(7589151)
  10. system.disableChatCommandDisplay("mapa", true)
  11.  
  12. local gameRunning = false
  13. local teams = {
  14. [1] = {},
  15. [2] = {},
  16. }
  17. local points = {
  18. [1] = 0,
  19. [2] = 0,
  20. }
  21. local equipoc= {}
  22. local colors = {
  23. [1] = "e54427",
  24. [2] = "0a98db",
  25. }
  26.  
  27. local maps = {7623375, 7618265, 7598750}
  28.  
  29. function newMap()
  30. local mapcode = maps[math.random(#maps)]
  31. tfm.exec.newGame(mapcode)
  32. end
  33.  
  34.  
  35. function eventChatCommand(playerName, command)
  36. if command == "mapa" then
  37. newMap()
  38. end
  39. end
  40.  
  41. ui.addTextArea(16, "<p align='center'><V><a href='event:iniciarJuego'>Iniciar", ADMINISTRADOR, 375, 203, 40, 18, 0x324650, 0x324650, 1, true)
  42.  
  43. function eventTextAreaCallback(id, player, callback)
  44. if callback == 'iniciarJuego' then
  45. gameRunning = true
  46. for i = 1, 20 do
  47. ui.removeTextArea(i)
  48. end
  49. for i = 26, 60 do
  50. ui.removeTextArea(i)
  51. end
  52. newMap()
  53. tfm.exec.setGameTime(1080)
  54. contarJugadores()
  55. end
  56. end
  57.  
  58. function contarJugadores()
  59. local players=0
  60. function eventPlayerLeft(name)
  61. players=players-1
  62. end
  63. for name in pairs(tfm.get.room.playerList) do
  64. players=players+1
  65. tfm.exec.setPlayerScore(name, 0 ,false)
  66. end
  67. end
  68.  
  69. function eventPlayerDied (playerName)
  70. tfm.exec.respawnPlayer(playerName)
  71. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement