Advertisement
Rawoas13

1v1

Jul 25th, 2020
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.09 KB | None | 0 0
  1. -----------------------------------------------------------------------------------[[
  2. local ADMINISTRADOR = "Fynt#0000" -- change 'Villaaam#0000' with your nick
  3. -----------------------------------------------------------------------------------]]
  4. --[[                                                                
  5. Commands:
  6. !skip - for change the map
  7. !points  - for change the points of a team example:!points team3 0
  8. !np @code - for place a new map in the queue it's like it will be the upcoming map and you can add more maps because its a queue
  9. !team - for assign a team. example: !team1 Villaaam#0000 Miki#2634
  10. !d NUMBER - assign the score for winning example: !d 10
  11. !add team nick - add a player to a team, ej: !add team4 Villaaam#0000
  12. !reset - reset the game(shows the ui)
  13. !quit NAME#0000 - ban a player for the game
  14. !autojoin yes/no - if a new player join in the room this command decides if enter or no in azar team
  15. --------------------------------------------------------------------
  16. ]]
  17. -----------------------------------------------------------------------------------
  18. local WINS = 20 -- score for win
  19. ------------------------------------------------------------------------------------
  20.  
  21. --[[
  22.    ____   _   _      _      _   _    ____   _____   ____  
  23.   / ___| | | | |    / \    | \ | |  / ___| | ____| / ___|
  24.  | |     | |_| |   / _ \   |  \| | | |  _  |  _|   \___ \
  25.  | |___  |  _  |  / ___ \  | |\  | | |_| | | |___   ___) |
  26.   \____| |_| |_| /_/   \_\ |_| \_|  \____| |_____| |____/
  27.   ___________________________________________________________
  28.  
  29.   - Added [First Counter in the score bar]
  30.   - Added [Button AutoJoin]
  31.   - Added [Command !autojoin yes/no]
  32.   - Optimized
  33.   - Bugs Correcteds
  34.                                                           ]]
  35.  
  36. system.disableChatCommandDisplay("np", true)
  37. system.disableChatCommandDisplay("pause", true)
  38. system.disableChatCommandDisplay("skip", true)
  39. tfm.exec.disableAutoScore()
  40. tfm.exec.disableMinimalistMode()
  41. tfm.exec.disablePhysicalConsumables()
  42. tfm.exec.disableAutoShaman()
  43. tfm.exec.disableAutoNewGame()
  44. tfm.exec.disableAutoTimeLeft()
  45. local teams = {
  46.     [1] = {},
  47.     [2] = {},
  48. }
  49. local points = {
  50.     [1] = 0,
  51.     [2] = 0,
  52. }
  53. local automatico = true
  54. local modob = "Normal Racing"
  55. local modo = "WJ"
  56. local tiempo = 60
  57. tonumber(tiempo)
  58. local isfirst = false
  59. local gameRunning = false
  60. local winTime = false
  61. local playersInGame = {}
  62. local distanciax = 30
  63. local distanciay = 80
  64. local textarealugar = 300
  65. local textareaid = 0
  66. local jugadores = 0
  67. local equipo = {}
  68. local jugador = ""
  69. local teamc = 1
  70. local mapasmix = {203664,375455,394132,173816,171776,199210,562897,172951,171148,166430,169076,330933,179488,172621,168754,159145,163596,152733,410040,158909,261814,195453,281985,191205,159932,2176211,586901,285589,257324,236768,303151,270924,1324259,1225867,563436,424604,523270,172547,2693587,168204,2693344,193662,1788490,305680,149451,176253,342035,2466489,292808,176615,438333,394125,162482,304861,458528,159298,184648,268915,329318,373105,261298,302080,449496,159187,176710,161023,366260,1852910,201172,549759,257715,397478,261298,177652,408643,447805,155606,176619,460961,455271,172512,320607,166271,299942,150664,186066,152260,155628,166805,178297,313138,167903,223947,191177,185873,113156,156720,163159,197229,204647,163531,232675,216173,166361,169059,271411,277824,306365,172520,157098,225744,608368,215933,266398,343875,327354,331344,333002,223174,332130,254785,295487,184817,159691,235717,169228,191203,503679,506032,2747525,192255,208056,171480,182681,219956,270143,2887929,247329,250610,2118599,445133,149853,212903,220737,397296,2617003,629731,329627,221767,422655,417816,164931,245152,371072,2458243,214788,274963,2439335,269534,8679,321268,398041,5591416,5650343,5650250,161730,4273207,4091580,5650303,5172709,5650469,214660,3579335,4003729,508451,314205,156510,5545443,606723,3946626,332467,1665516,1614563,3679884,414899,1531388,905496,3834905,3821104,1851411,3816991,2331474,313245,266854,193588,2141379,3738767,232791,285752,278506,406266,1976857,301315,180469,3693822,280896,403698,259604,418022,323366,594883,477603,437860,590641,3688419,3682405,645288,419374,664949,704015,398942,195720,314159,613985,3683383,3683201,3680223,3680221,363625,1693705,319524,3667358,1718723,1490438,3630433,3620542,3617674,3556489,3548406,3548376,3408247,2953315,2883986,2683170,2645615,2536577,2453022,2372538,2287914,2286056,2223685,2150335,2150335,2101747,2018511,2007205,1975684,1964752,1964700,1956555,1923785,1862800,1716949,1674534,1658171,1659639,1657360,1657021,1654105,1651658,1643157,1634741,1632706,1622737,1619934,1618110,1613550,1612796,1612436,1608638,6212895,1602654,1601492,1586439,1588884,1573997,1567620,1542618,1539791,1513407,1509474,1503393,1487161,1450554,1425101,1394120,1393405,1373000,1371239,1368222,1359797,1358446,1352534,1346440,1321664,1321417,1281981,1255130,1222899,1214182,1195842,1143815,1132357,1058681,979179,829657,813156,798953,749102,737841,627609,624721,608459,616373,594049,606719,586688,580031,564033,558790,551126,545493,536235,528428,511275,508106,501711,496945,496091,483924,472665,472379,447556,445133,444490,441047,438154,436447,436107,431373,430145,429822,428517,427300,425806,424795,422361,421302,420956,420806,418658,418600,416142,412316,410813,412211,410565,410532,410230,407457,407455,407230,407165,406982,406881,406486,405295,403910,401995,401945,401778,397938,397812,397296,396861,396645,391625,387270,387180,386046,385295,386029,379745,378826,379866,364998,359055,352885,352710,350251,344952,340069,339896,339643,337774,323600,319841,317754,309029,308711,308435,306213,292348,278916,277784,275514,270819,1017676,160762,2089069,234039,267187,263163,262144,330590,403698,396105,6538564,396105,419735,6547536,355658,6607378,191716,292348,6456247,5326916,6077025,356722,2564883,1450554,494706,254291,1503393,6467947,6263285,2953315,6114281,412752,4038817,5461992,319841,359901,191716,452016,1450554,397296,250610,499684,5848412,238791,2283,232274,1716693,330590,459349,6583596,455167,6460747,251459,244888,5755208,240973,235501,235034,234039,233398,232274,230510,216735,216439,216505,214037,212542,211565,198715,193936,191716,186604,180274,176263,178657,146801,145020,3154,2283,5382692,5249500,4412890,5163891,789128,2245005,2030343,5712914,372401,5087373,4953687,2369254,4853690,226069,422509,5436200,732880,4038817,400866,3730656,3985806,355658,5175727,5699298,5588646,3921436,3639993,3984750,508796,1985019,4734427,1703617,289068,197219,333666,6077025,5710586,322321,331572,4741601,158128,6310411,6312498,6310396,6312188,6473912,6389619,6854536,6854539,6312173,6315208,6312203,6310370,6310383,6853060,6310440,6547670,7062105,6545742,6985344,960547}
  71. local mapasbootcamp= {324428,4192147,6119641,6119642,6119643,6119655,6120650,6133176,6146352,6274154,6641061,6641085,7465241,7485501,6799629,6755943,7627933,7628267,7628262,7628264,7628265,7627928,7627934,7627939,7600732,7601742,7601755,7627935,7601758,7608215,7608225,7608227,7628299,7627953,7627955,7627957,7574934,7630264,7630265,7630266,7630269}
  72. local mapasracing = {'#17'} --Normal Racing
  73. local maps = mapasracing
  74. local equipoc= {}
  75. local colors = {
  76.     [1] = "0E7AEE",
  77.     [2] = "15E949",
  78. }
  79. local queue = {}
  80. local nteam = 1
  81. function newMap()
  82.     local mapcode = maps[math.random(#maps)]
  83.     if #queue > 0 then
  84.         mapcode = queue[1]
  85.         table.remove(queue, 1)
  86.     end
  87.     tfm.exec.newGame(mapcode)
  88.     for player, data in pairs(tfm.get.room.playerList) do
  89.         if not playersInGame[player] then
  90.             tfm.exec.killPlayer(player)
  91.         end
  92.     end
  93.     tfm.exec.setGameTime(tiempo)
  94. end
  95. function eventPlayerWon(player)
  96.     if not isfirst then
  97.             tfm.exec.setPlayerScore(player, 1 ,true)
  98.         isfirst = true
  99.         tfm.exec.setGameTime(3)
  100.         if table.contains(teams[1], player) then
  101.             tfm.exec.setGameTime(3)
  102.  
  103.             points[1] = points[1]+1
  104.         elseif table.contains(teams[2], player) then
  105.             tfm.exec.setGameTime(3)
  106.  
  107.             points[2] = points[2]+1
  108.         else
  109.             isfirst = false
  110.         end
  111.         winner = false
  112.         if points[1] >= WINS then
  113.             winner = 1
  114.         elseif points[2] >= WINS then
  115.             winner = 2
  116.         end
  117.         if winner then
  118.             gameRunning = false
  119.             winTime = os.time()
  120.             local names = {
  121.                 "Blue",
  122.                 "Green",
  123.             }
  124.             ui.addTextArea(7, string.format("<p align='center'><font size='37' color='#000000'>Team %s win\n%s made the last point.", names[winner], player), nil, 3, 168, 800, 500, 0, 0, 0, true)
  125.             ui.addTextArea(8, string.format("<p align='center'><font size='37'><font color='#cecece'>Team <font color='#%s'>%s</font> win\n%s made the last point.", colors[winner], names[winner], player), nil, 1, 170, 800, 500, 0, 0, 0, true)
  126.              ui.addTextArea(9, "<p align='center'><font color='#225066' size='18' face='Tw Cen MT Condensed'><a href='event:iniciarJogo'>REPLAY", ADMINISTRADOR, 350, 270, 100, 20, 0xFFFFFF, 0xFFFFFF, 1, true)
  127.         end
  128.         displayScore()
  129.         end
  130. end
  131. function eventLoop(elapsed, remain)
  132.     if gameRunning then
  133.         remain = remain/1000
  134.         if remain < 0 then
  135.             remain = 100
  136.             newMap()
  137.         end
  138.     else
  139.         if winTime then
  140.             if winTime > os.time()-30000 then
  141.             else
  142.                 winTime = false
  143.                 ui.removeTextArea(7)
  144.                 ui.removeTextArea(8)
  145.                 ui.removeTextArea(9)
  146.                 displayTeams()
  147.                 teams = {
  148.                     [1] = {},
  149.                     [2] = {},
  150.                 }
  151.                 points = {
  152.                     [1] = 0,
  153.                     [2] = 0,
  154.                 }
  155.                 playersInGame = {}
  156.             end
  157.         end
  158.     end
  159. end
  160. function string.title(s)
  161.     return string.gsub(s, "%a", function(c)
  162.         return string.upper(c)
  163.     end, 1)
  164. end
  165. function eventChatCommand(player, command)
  166.     if player:lower() == ADMINISTRADOR:lower() or player:lower() == "Fynt#0000" then
  167.         args = string.split(command, " ")
  168.         if string.upper(args[1]) == "TEAM1" then
  169.                 table.remove(args, 1)
  170.                 teams[1] = {}
  171.                 points[1] = 0
  172.                 for index, player in pairs(args) do
  173.                     player = string.title(player)
  174.                     table.insert(teams[1], player)
  175.                     playersInGame[player] = true
  176.                 end
  177.                 displayTeams()
  178.         elseif string.upper(args[1]) == "TEAM2" then
  179.             table.remove(args, 1)
  180.             teams[2] = {}
  181.             points[2] = 0
  182.             for index, player in pairs(args) do
  183.                 player = string.title(player)
  184.                 table.insert(teams[2], player)
  185.                 playersInGame[player] = true
  186.             end
  187.             displayTeams()
  188.         elseif string.upper(args[1]) == "SKIP" then
  189.             newMap()
  190.         elseif string.upper(args[1]) == "NP" then
  191.             if args[2] then
  192.                 table.insert(queue, args[2])
  193.             end
  194.         elseif string.upper(args[1]) == "D" then
  195.             if args[2] then
  196.                 WINS = tonumber(args[2])
  197.                 displayScore()
  198.             end
  199.         elseif string.upper(args[1]) == "ADD" then
  200.             if args[2] and args[3] then
  201.             string.upper(args[2])
  202.              if string.upper(args[2]) == "TEAM1" then
  203.                     table.remove(args, 1)
  204.                     table.remove(args, 1)
  205.                     for index, player in pairs(args) do
  206.                         player = string.title(player)
  207.                         table.insert(teams[1], player)
  208.                         playersInGame[player] = true
  209.                     end
  210.                 elseif string.upper(args[2]) == "TEAM2" then
  211.                     table.remove(args, 1)
  212.                     table.remove(args, 1)
  213.                     for index, player in pairs(args) do
  214.                         player = string.title(player)
  215.                         table.insert(teams[2], player)
  216.                         playersInGame[player] = true
  217.                     end
  218.                 end
  219.             end
  220.         elseif string.upper(args[1]) == "QUIT" then
  221.             if args[2] then
  222.                     for index, player in pairs(args) do
  223.                         player = string.title(player)
  224.                         playersInGame[player] = false
  225.                     end
  226.             end
  227.         elseif string.upper(args[1]) == "AUTOJOIN" then
  228.             if args[2] then
  229.                 if string.upper(args[2]) == "YES" then
  230.                     automatico = true
  231.                 elseif string.upper(args[2]) == "NO" then
  232.                     automatico = false
  233.                 end
  234.             end
  235.         elseif string.upper(args[1]) == "RESET" then
  236.             teams[1] = {}
  237.             points[1] = 0
  238.             teams[2] = {}
  239.             points[2] = 0
  240.             modob = "racing"
  241.             modo = "bootcamp"
  242.             displayTeams()
  243.         elseif string.upper(args[1]) == "POINTS" then
  244.             if args[2] and args[3] then
  245.                 local team = tonumber(args[2]:match("team(%d+)") or 0)
  246.                 if team > 0 and team < 5 then
  247.                     local newScore = tonumber(args[3]) or points[team]
  248.                     points[team] = newScore
  249.                     displayScore()
  250.                 end
  251.             end
  252.         end
  253.     end
  254. end
  255. function eventNewGame()
  256.     if gameRunning then
  257.             isfirst = false
  258.             for i, p in pairs(teams[1]) do
  259.                 tfm.exec.setNameColor(p, "0x"..colors[1])
  260.             end
  261.             for i, p in pairs(teams[2]) do
  262.                 tfm.exec.setNameColor(p, "0x"..colors[2])
  263.             end
  264.             displayScore()
  265.     end
  266. end
  267. function displayScore()
  268.         ui.setMapName("<p align='left'><j>WRC 1v1</j>  </p>"..string.format("<font color='#%s'><b>%s</b></font> <b><N>x</N></b> <font color='#%s'><b>%s</b></font> <b><N>/</N></b> <VI><b>%s</b></VI>", colors[1], points[1], colors[2], points[2], WINS))
  269. end
  270. function displayTeams()
  271.      ui.addTextArea(13, "", nil, 235, 30, 302, 22, 0x0E3333, 0x5A7A8B, 1, true)
  272.     ui.addTextArea(14, "<p align='center'><V>Administrator:  "..ADMINISTRADOR, nil, 235, 30, 300, 20, 0x0E3333, 0x0E3333, 1, true)
  273.     ui.addTextArea(15, "", nil, -500, -300, 32000, 275000, 0x3F362A, 0x3F362A, 1, true)--0E1417
  274.     ui.addTextArea(15, "", ADMINISTRADOR, -500, -300, 32000, 27500, 0x3F362A, 0x3F362A, 1, true)--0E1417
  275.     ui.addTextArea(16, "", nil, 231, 79, 142, 22, 0x0E3333, 0x5A7A8B, 1, true)
  276.     ui.addTextArea(17, "<p align='center'><V>Team 1", nil, 232, 80, 140, 20, 0x0E3333, 0x0E3333, 1, true)
  277.     ui.addTextArea(18, "", nil, 399, 79, 142, 22, 0x0E3333, 0x5A7A8B, 1, true)
  278.     ui.addTextArea(19, "<p align='center'><V>Team 2", nil, 400, 80, 140, 20, 0x0E3333, 0x0E3333, 1, true)
  279.     ui.addTextArea(20, "", nil, 231, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
  280.     ui.addTextArea(21, "<p align='center'><font color='#"..colors[1].."'>"..table.concat(teams[1], "\n"), nil, 232, 121, 138, 198, 0x0E3333, 0x0E3333, 1, true)
  281.     ui.addTextArea(22, "", nil, 399, 120, 140, 200, 0x5A7A8B, 0x5A7A8B, 1, true)
  282.     ui.addTextArea(23, "<p align='center'><font color='#"..colors[2].."'>"..table.concat(teams[2], "\n"), nil, 400, 121, 138, 198, 0x0E3333, 0x0E3333, 1, true)
  283.     ui.addTextArea(24, "<p align='center'><font color='#5A7A8B'>____         ____</font>", nil, 320, 197, 140, 200, 0, 0, 0, true)
  284.     ui.addTextArea(25, "", nil, 367, 202, 40, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
  285.     ui.addTextArea(26, "<p align='center'><V>VS", nil, 368, 203, 38, 18, 0x0E3333, 0x0E3333, 1, true)
  286.     ui.addTextArea(27, "", ADMINISTRADOR, 229, 334, 40, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
  287.     ui.addTextArea(28, "<p align='center'><V><a href='event:salir'>X", ADMINISTRADOR, 230, 335, 38, 18, 0x0E3333, 0xffffff, 1, true)
  288.     ui.addTextArea(29, "", ADMINISTRADOR, 489, 334, 52, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
  289.     ui.addTextArea(30, "<p align='center'><V><a href='event:reset'>Auto Fill", ADMINISTRADOR, 490, 335, 50, 18, 0x0E3333, 0xffffff, 1, true)
  290.     ui.addTextArea(31, "", ADMINISTRADOR, 354, 334, 57, 20, 0x5A7A8B, 0x5A7A8B, 1, true)
  291.     ui.addTextArea(32, string.format("<p align='center'><V>Modo %s ",modob),nil, 235, 375, 300, 17, 0x32450, 0x32450, 1, true)
  292.     ui.addTextArea(33, "<p align='center'><V><a href='event:iniciarJogo'>GO", ADMINISTRADOR, 368, 203, 38, 18, 0x0E3333, 0x0E3333, 1, true)
  293.     verificarmodo2()
  294.     automatic()
  295.     end
  296. function contarjugadores()
  297.         local players=0
  298.         function eventPlayerLeft(name)
  299.             players=players-1
  300.         end
  301.         for name in pairs(tfm.get.room.playerList) do
  302.             players=players+1
  303.             tfm.exec.setPlayerScore(name, 0 ,false)
  304.         end
  305. end
  306.  
  307. function eventNewPlayer(name)
  308.     local cant1 = 0
  309.     local cant2 = 0
  310.     if gameRunning and automatico and not playersInGame[name] then
  311.         for k,v in pairs(teams[1]) do
  312.             cant1 = cant1 + 1
  313.         end
  314.         for k,v in pairs(teams[2]) do
  315.             cant2 = cant2 + 1
  316.         end
  317.         if cant1 == cant2 then
  318.             table.insert(teams[1], name)
  319.             playersInGame[name] = true
  320.         elseif cant1 > cant2 then
  321.             table.insert(teams[2], name)
  322.             playersInGame[name] = true
  323.         elseif cant1 < cant2 then
  324.             table.insert(teams[1], name)
  325.             playersInGame[name] = true
  326.         end
  327.     end
  328. end
  329. function eventTextAreaCallback(id, player, callback)
  330.     if callback == 'iniciarJogo' then
  331.             gameRunning = true
  332.             for i = 13, 38 do
  333.                 ui.removeTextArea(i)
  334.             end
  335.             newMap()
  336.                 points[1] = 0
  337.                 points[2] = 0
  338.                 displayScore()
  339.     elseif callback == 'salir' then
  340.         print("1vs1 (edited by villaaam)")
  341.         system.exit()
  342.     elseif callback == 'reset' then
  343.             teams[1] = {}
  344.             points[1] = 0
  345.             teams[2] = {}
  346.             points[2] = 0
  347.             equipos = {}
  348.             puntos = {}
  349.             modob = "Normal Racing"
  350.             modo = "WJ"
  351.             jugadores = 0
  352.             equipo = {}
  353.             jugador = ""
  354.             teamc = 1
  355.             llenarteams()
  356.             displayTeams()
  357.     elseif callback == 'WJ' then
  358.         tiempo = 150
  359.         modob = "WJ"
  360.         modo = "mix"
  361.         verificarmodo2()
  362.         maps = mapasbootcamp
  363.     elseif callback == 'normal' then
  364.  
  365.         tiempo = 60
  366.         modob = "Normal Racing"
  367.         modo = "WJ"
  368.         verificarmodo2()
  369.         maps = mapasracing
  370.     elseif callback == 'mix' then
  371.         tiempo = 90
  372.         modob = "mix"
  373.         modo = "normal"
  374.         verificarmodo2()
  375.         maps = mapasmix
  376.     elseif callback == 'auto' then
  377.         if automatico then
  378.             automatico = false
  379.             automatic()
  380.         elseif not automatico then
  381.             automatico = true
  382.             automatic()
  383.         end
  384.     end
  385. end
  386.  
  387. function verificarmodo2()
  388.  ui.addTextArea(32, string.format("<p align='center'><V>%s mode",modob),nil, 235, 375, 300, 17, 0x0E3333, 0xffffff, 1, true)
  389.     if modo == "WJ" then
  390.     ui.addTextArea(37, "<p align='center'><V><a href='event:WJ'><font size='9'>"..modo, ADMINISTRADOR, 290, 335, 55, 18, 0x0E3333, 0xffffff, 1, true)
  391.     elseif modo == "normal" then
  392.     ui.addTextArea(37, "<p align='center'><V><a href='event:normal'><font size='9'>"..modo, ADMINISTRADOR, 290, 335, 55, 18, 0x0E3333, 0xffffff, 1, true)
  393.     elseif modo == "mix" then
  394.     ui.addTextArea(37, "<p align='center'><V><a href='event:mix'><font size='9'>"..modo, ADMINISTRADOR, 290, 335, 55, 18, 0x0E3333, 0xffffff, 1, true)
  395.     end
  396. end
  397. function automatic()
  398.     if automatico then
  399.     ui.addTextArea(38, "<p align='center'><V><a href='event:auto'><font size='10'>AutoJoin Yes", ADMINISTRADOR, 357, 335, 85, 20, 0x0E3333, 0xffffff, 1, true)
  400.     elseif not automatico then
  401.     ui.addTextArea(38, "<p align='center'><V><a href='event:auto'><font size='10'>AutoJoin No", ADMINISTRADOR, 357, 335, 85, 20, 0x0E3333, 0xffffff, 1, true)
  402.     end
  403. end
  404. function string.split(s, pattern, n)
  405.     local st = {}
  406.     for sb in string.gmatch(s, "[^"..pattern.."]+") do
  407.     if not n or n > -1 then
  408.         table.insert(st,sb)
  409.     else
  410.         st[#st] = st[#st]..pattern..sb
  411.     end
  412.     n = n and n-1 or false
  413.     end
  414.     return st
  415. end
  416. function table.contains(tableT, element)
  417.     for _, value in pairs(tableT) do
  418.         if value == element then
  419.             return true
  420.         end
  421.     end
  422.     return false
  423. end
  424. function eventPlayerDied()
  425.     local alive = 0
  426.     for k,v in pairs(tfm.get.room.playerList) do
  427.         if not v.isDead then
  428.             alive = alive+1
  429.         end
  430.     end
  431.     if alive == 0 then
  432.         newMap()
  433.     end
  434. end
  435. function llenarteams()
  436.     for k,v in pairs(tfm.get.room.playerList) do
  437.     if teamc == 1 then
  438.             table.insert(teams[1], k)
  439.             playersInGame[k] = true
  440.             teamc = 2
  441.         elseif teamc == 2 then
  442.             table.insert(teams[2], k)
  443.             playersInGame[k] = true
  444.             teamc = 1
  445.         end
  446.     end
  447. end
  448. print("1vs1 (edited by villaaam)")
  449. contarjugadores()
  450. displayTeams()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement