Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- CMDS:
- 1. !team1 "playername" "playername" \\Assign players to team1 , ex: !team1 Ctmce Ziggy_z
- 2. !team2 "playername "playername" \\Assign players to team2 , ex: !team2 Ctmce Ziggy_z
- 3. !add team1 "playername" "playername" \\Adds the player team1.
- 4. !add team2 "playername" "playername" \\Adds the player team2.
- 5. !remove team1 "playername" "playername" \\Removes the player/'s from team1!
- 6. !remove team2 "playername" "playername" \\Removes the player/'s from team2!
- 7. !exit \\Closing the Admin Panel//
- 8. !start \\Shows the Admin Panel back//
- 9. !sp team1 23 \\Sets the points for team1 to 23 or whatever you choose!
- 10. !sp team2 15 \\Sets the points for team1 to 15 or whatever you choose!
- 11. !aj on / off \\Turns AutoJoin On and Off.
- 12. !pause //pauses the game , and shows the gui back ^^
- ---------------------------------
- Total Commands Count: [8].
- Total BootcampMaps Count: [222].
- Total RacingMaps Count: [1424].
- ---------------------------------
- TODO:
- 1. Make 4 teams!
- --]]
- --Admin/Game Setup--
- --local Admin = "Misterthepro#0000" --Write your name here to be able to use the Admin Panel--
- local admin = {
- ["Blood#3565"] = true,
- ["Misterthepro#0000"] = true,
- ["Fabi#5061"] = true,
- ["Alditohacker#0000"] = true
- }
- local ScoreToWin = 15 --Type here the amount of points need to win the game(Leave it at the same number it is right now if you want to change it in the Setup Panel)--
- local autoJoin = true
- local team1Color = "Red"
- local team2Color = "Blue"
- local mod = "Bootcamp"
- --DO NOT CHANGE THE SCRIPT!--
- local teams = {Team1 = {}, Team2 = {}}
- --Team score--
- local teamScore = {Team1 = 0, Team2 = 0}
- --------------
- ---Maps---
- local bootcampMaps = {
- 113156, 124000, 149422, 149451, 150651, 150664, 151655, 152260, 152733,
- 153996, 155480, 155606, 155611, 155628, 155765, 156720, 157203, 157805,
- 157960, 158345, 158417, 158909, 159187, 159298, 159932, 160841, 161023,
- 161434, 162482, 163159, 163172, 163506, 163531, 163596, 164544, 164916,
- 165186, 166032, 177652, 166056, 166271, 166333, 166361, 166430, 166805,
- 167075, 167903, 168204, 167903, 168754, 169059, 169076, 169110, 169139,
- 171148, 171480, 171482, 171776, 172501, 172512, 172520, 172547, 172605,
- 172621, 172951, 172976, 173623, 173816, 174223, 175204, 175280, 176253,
- 176507, 176710, 176729, 179005, 179488, 179492, 179807, 180801, 182370,
- 182769, 183139, 183141, 184648, 184817, 184868, 185289, 185428, 185529,
- 185529, 185873, 185887, 186066, 189819, 190646, 190996, 191177, 191203,
- 191205, 191443, 191642, 192158, 192255, 192959, 193662, 195116, 195672,
- 197229, 198988, 199210, 199710, 199826, 201000, 202574, 203664, 204488,
- 204647, 205240, 205506, 206396, 208056, 208373, 232675, 208653, 208940,
- 209848, 213752, 213755, 213874, 214631, 214755, 216173, 217261, 220352,
- 222377, 222910, 223947, 2795201, 225744, 226266, 227093, 230588, 231137,
- 231921, 232469, 232678, 235037, 236768, 237091, 242291, 250153, 254785,
- 257218, 257324, 257715, 258192258908, 259319, 261298, 261814, 263819,
- 263926, 264091, 268915, 270143, 270924, 271193, 271411, 159145, 272402,
- 272518, 272689, 277427, 277513, 514311, 277824, 279337, 281948, 282584,
- 284134, 286254, 289865, 2574744, 295465, 295630, 295932, 297442, 299942,
- 299983, 301610, 302080, 303151, 303939, 304861, 305567, 305614, 305820,
- 306365, 306384, 313216, 314743, 315666, 315800, 316012, 318129, 319443,
- 320483, 320626, 322582, 327354, 329318, 329571, 330933, 330967, 331344,
- 331988, 332130, 332906, 333002, 336305, 337644, 342035, 343456, 354984,
- 361500, 365061, 368839, 372419, 392240, 393426, 394132, 395216, 395310,
- 395961, 397467, 397469, 399364, 401630, 403755, 403940, 408577, 408643,
- 410040, 410045, 412467, 412913, 419335, 419369, 419635, 420877, 422981,
- 423311, 424604, 424685, 424900, 425884, 431433, 431749, 432501, 435812,
- 438333, 438364, 439092, 444589, 447805, 449496, 454049, 455271, 457726,
- 458528, 460961, 467137, 476706, 478236, 492222, 492399, 496610, 496886,
- 497965, 499986, 500690, 500748, 500894, 504485, 505619, 506032, 506613,
- 506940, 510996, 511136, 512887, 523270, 528032, 531084, 541223, 541693,
- 541729, 543010, 551317, 556841, 380516, 557066, 560583, 562897, 563436,
- 564198, 568122, 571683, 586901, 592189, 593164, 593431, 593530, 596239,
- 605255, 608368, 618999, 684566, 692650, 692740, 783547, 801683, 815336,
- 834297, 842019, 842167, 868262, 898934, 912356, 919484, 976944, 1000006,
- 1004622, 1014313, 1018394, 1157281, 1162831, 1164086, 1242584, 1255359,
- 536905, 1265789, 1266330, 1383297, 1384078, 1413528, 1427980, 1435902,
- 1494499, 1503203, 1526894, 1531604, 1540221, 1580356, 1580835, 1593066,
- 1595965, 1615753, 1615949, 1647131, 1678634, 1722755, 1733211, 1788490,
- 1807217, 1809410, 2040569, 2130169, 2311703, 2423300, 256899, 2520540,
- 2636519, 2738370, 2794566, 2989803, 3136410, 3199998, 3242049, 3908151,
- 4067327, 4445580, 330841, 2176211, 373105, 375455, 376704, 378704, 2252731,
- 1646448, 4488666, 698992, 3888888, 4627777, 528782, 192519, 159691, 158053,
- 3907267, 3848147, 2692883, 5517891, 7016000, 215933, 343875, 507884, 597348,
- 720672, 1951944, 2850177, 2918822, 3043779, 3076903, 3200001, 3483300,
- 3527399, 3937567, 4854539, 1893451, 5534007 ,394125,3734989,3734996,3734998,3866660,320607,3089270,170483,1852910,2998268,658960,293306,157098,178297,328351,182681,176614,229802,233971,237188,239698,242351,245908,247311,252142,255561,255776,256886,258801,259029,261784,262533,263730,265652,267589,267973,268668,268882,270650,273903,275897,277641,279502,292809,7023000,294249,295620,296518,297465, 6892200, 6000050, 157004, 158345, 158417, 163094, 7288650, 3473925, 192560,
- 216171, 2795201, 263819, 4617716, 590775, 306655, 307324, 327743, 2914456,
- 372255, 391924, 392240, 397478, 3133917, 2932238, 438364, 482791, 500000,
- 522719, 552986, 557074, 560583, 587501, 2242899, 612415, 721319, 722837,
- 562897, 563436, 564198, 568122, 571683, 574183, 575497, 584783, 560526,
- 729863, 374995, 758595, 881158, 886744, 970919, 1046877, 1066607, 1130256,
- 1156092, 1226207, 1301649, 1303323, 1323048, 1333846, 1384078, 1410539,
- 1620703, 1955745, 1989803, 1990413, 2024960, 2178800, 2329940, 2416969,
- 2469365, 2788517, 2846829, 3038589, 3668888, 3690269, 3988424, 549666,
- 4114521, 1523082, 5960814, 1256085, 6137767, 4890068, 557132, 357892,
- 273373, 225484, 5000126, 6533602, 6574593, 293559, 6696038, 6600067,
- 4763378, 1601992, 4770120, 6774534, 4877895, 425533, 556973, 4769901,
- 406154, 6642996, 6675248, 223174, 6999009, 4895345, 655207, 823329, 2082776,
- 2309030, 2963166, 2999994, 3828508, 3976977, 4107909, 4632975, 5092739,
- 6593495, 6727980, 2803483, 4237910, 4538472, 3521460, 2128560, 3493490,
- 4362335, 2294519, 6000033, 6284671, 7196861, 7261219, 6640663, 7306627,
- 7324922, 6000044, 7110102, 7370291, 6931020, 7290999, 7000002, 7512725,
- 7598733, 6462982,3707630,1737800,3734988,3734990,3747520,3750360,3759157,3767893,3779861,3850000,3799357,6722315,3815568,3826546,3849999,3860578,3866663,3920916,355336,5263927,3958217,5342889,3964892,3969628,6304911,3976766,3999991,3999992,3999997,4000007,4000008,4000009,4027263,4241333,4039451,4058168,4093488,7024409,4121359,4333895,5132197,4317592,5134116,7091488,1972688,4337732,1568331,4295473,4234558,7005221,4249695,4413656,3820501,3999979,3939000,4484685,6609034,6022675,4644584,4311255,4697673,4000000,3295954,4365527,4313858,3530999,2758747,4594304,322649,3999110,3838020,1923584,3846632,4720851,3734984,1551020,621850,4506542,4948659,315283,3311534,4822672,6621953,6827739,5008365,5505990,5931069,187478,4000662,2395201,2941840,4948551,3142783,4220381,5473125,2605186,5616777,5761507,4398794,5914063,5706542,5340984,6546598,6045500,293658,4117513,5356911,5284625,6079100,5998000,5758150,5720741,3985463,4660408,3500000,5444444,3984871,219956,6289411,330827,366260,4000010,6041917,7134487,7319472,5933637,6450492,238951,248650,249003,250664,277665,282332}
- local rMaps = {}
- local mRound = 5
- ----------
- local teamColors = {Red = 'CB546B', Blue = '2F7FCC'}
- local first = false
- ---Game Time Settings----
- local gameTime = {Minutes = 1,Seconds = 2}
- local Ticker = 0
- -------------------------
- local gameStarted = false
- currentMap = 0
- team1C = team1Color
- team2C = team2Color
- function main()
- tfm.exec.disableAllShamanSkills(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoScore(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableDebugCommand(true)
- tfm.exec.disablePhysicalConsumables(true)
- checkColor()
- ShowStartBoard()
- end
- function eventNewGame()
- if gameStarted then
- currentMap = tostring(tfm.get.room.currentMap)
- setTimeMode()
- for n,p in pairs(tfm.get.room.playerList) do
- if not PlayerInTeam(n) then
- tfm.exec.killPlayer(n)
- end
- end
- SetPlayerNameColor()
- first = false
- if mod == "Bootcamp" then
- tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#"..team2Color .."'>" ..team2C ..": "..teamScore.Team2.."</font> / <n>D:" ..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":" ..gameTime.Seconds .."\n")
- end
- end
- end
- function eventNewPlayer(plr)
- if gameStarted then
- if PlayerInTeam(plr) then tfm.exec.killPlayer(plr) return end
- --[[ if autoJoin then
- if #teams.Team1 == #teams.Team2 then
- table.insert(teams.Team1,plr)
- elseif #teams.Team1 > #teams.Team2 then
- table.insert(teams.Team2,plr)
- end
- end ]]
- end
- end
- function eventPlayerDied(plr)
- if gameStarted then
- local plrCount = 0
- for n,p in pairs(tfm.get.room.playerList) do
- if not p.isDead then
- plrCount = plrCount + 1
- end
- end
- if plrCount <= 0 then
- newMap()
- print("Se murieron todos jajaencerio")
- end
- end
- end
- function eventPlayerWon(plr, TT, wonTime)
- if gameStarted then
- if PlayerInTeam(plr) then
- if not first then
- if table.contain(teams.Team1,plr) then
- first = true
- teamScore.Team1 = teamScore.Team1 + 1
- tfm.exec.setPlayerScore(plr, 1,true)
- gameTime.Minutes = 0
- gameTime.Seconds = 3
- if tonumber(teamScore.Team1) >= tonumber(ScoreToWin) then
- print("Team 1 won the game! The last point made by: "..plr)
- gameStarted = false
- tfm.exec.newGame(7692692,true)
- ShowStartBoard()
- ui.addTextArea(16, "<font size='13' color='#ffffff'><i>Team</font><font color='#" ..team1Color .."'> " ..team1C .."</font> won the game!</font></font>", nil, 8, 166, 202, 60, 0x000000, 0x5eff6e, 0, true)
- ui.addTextArea(17, "<font size='13' color='#ffffff'><i>The Player:<font color='#"..team1Color .."'> "..plr .."</font> made the last point!", nil, 602, 166, 188, 61, 0xffffff, 0x5eff6e, 0, true)
- end
- else
- first = true
- --if the plr form team2 then
- teamScore.Team2 = teamScore.Team2 + 1
- tfm.exec.setPlayerScore(plr, 1,true)
- gameTime.Minutes = 0
- gameTime.Seconds = 3
- if tonumber(teamScore.Team2) >= tonumber(ScoreToWin) then
- print("Team 2 won the game! The last point made by: "..plr)
- gameStarted = false
- tfm.exec.newGame(7692692,true)
- ShowStartBoard()
- ui.addTextArea(16, "<font size='13' color='#ffffff'><i>Team</font><font color='#" ..team2Color .."'> " ..team2C .."</font> won the game!</font></font>", nil, 8, 166, 202, 60, 0x000000, 0x5eff6e, 0, true)
- ui.addTextArea(17, "<font size='13' color='#ffffff'><i>The Player:<font color='#"..team2Color .."'> "..plr .."</font> made the last point!", nil, 602, 166, 188, 61, 0xffffff, 0x5eff6e, 0, true)
- end
- end
- end
- end
- end
- end
- function eventTextAreaCallback(id, player, callback)
- if admin[player] then
- --if id == 8 then
- --if callback == "bc" then
- -- mod = "Bootcamp"
- --ShowStartBoard()
- -- end
- if id == 10 then
- if callback == "start" then
- for i=0, 17,1 do
- ui.removeTextArea(i)
- end
- gameStarted = true
- teamScore.Team1 = 0
- teamScore.Team2 = 0
- resetScore()
- -- print("Game started! Made by - Ctmce -")
- newMap()
- end
- elseif id == 11 then
- if callback == "dec" then
- if tonumber(ScoreToWin) > 1 then
- ScoreToWin = ScoreToWin - 1
- ShowStartBoard()
- end
- elseif callback == "inc" then
- if tonumber(ScoreToWin) < 99 then
- ScoreToWin = ScoreToWin + 1
- ShowStartBoard()
- end
- end
- elseif callback == "versus1" then
- teams.Team1 = {}
- teams.Team2 = {}
- table.insert(teams.Team1,"Blood#3565")
- table.insert(teams.Team1,"Misterthepro#0000")
- table.insert(teams.Team2,"Noob#5388")
- table.insert(teams.Team2,"Edudekarly#3398")
- ShowStartBoard()
- elseif callback == "versus2" then
- teams.Team1 = {}
- teams.Team2 = {}
- table.insert(teams.Team1,"Darkfestt#0000")
- table.insert(teams.Team1,"Kiwi#8872")
- table.insert(teams.Team2,"Illenium#4890")
- table.insert(teams.Team2,"Kimqueen#5976")
- ShowStartBoard()
- elseif callback == "versus3" then
- teams.Team1 = {}
- teams.Team2 = {}
- table.insert(teams.Team1,"Bones#9712")
- table.insert(teams.Team1,"Frig#3331")
- table.insert(teams.Team2,"Fabi#5061")
- table.insert(teams.Team2,"Sanders#1255")
- ShowStartBoard()
- elseif callback == "versus4" then
- teams.Team1 = {}
- teams.Team2 = {}
- table.insert(teams.Team1,"Raatonsexy#0000")
- table.insert(teams.Team1,"Fresco#8600")
- table.insert(teams.Team2,"Z4mas#0000")
- table.insert(teams.Team2,"Joseph2006#0000")
- ShowStartBoard()
- end
- end
- end
- function eventChatCommand(name, command)
- if admin[name] then
- local arg={}
- for argument in command:gmatch("[^%s]+") do
- table.insert(arg,argument)
- end
- if arg[1]:lower() == "team1" and arg[2] ~= nil then
- teams.Team1 = {}
- for i,v in pairs(arg) do
- if i > 1 then
- if PlayerCheck(v) then
- if TeamFix(v) == "team2"then
- table.clear(teams.Team2,v)
- table.insert(teams.Team1,v)
- if not gameStarted then
- ShowStartBoard()
- end
- else
- table.insert(teams.Team1,v)
- if not gameStarted then
- ShowStartBoard()
- end
- end
- else
- print("Sory couldn't found: " .. tostring(v))
- end
- end
- end
- elseif arg[1]:lower() == "team2" and arg[2] ~= nil then
- teams.Team2 = {}
- for i,v in pairs(arg) do
- if i > 1 then
- if PlayerCheck(v) then
- if TeamFix(v) == "team1"then
- table.clear(teams.Team1,v)
- table.insert(teams.Team2,v)
- if not gameStarted then
- ShowStartBoard()
- end
- else
- table.insert(teams.Team2,v)
- if not gameStarted then
- ShowStartBoard()
- end
- end
- else
- print("Sory couldn't found: " .. tostring(v))
- end
- end
- end
- elseif arg[1]:lower() == "add" and arg[2]:lower() == "team1" and arg[3] ~= nil then
- for i,v in pairs(arg) do
- if i > 1 then
- if PlayerCheck(v) then
- if TeamFix(v) == "team2"then
- table.clear(teams.Team2,v)
- table.insert(teams.Team1,v)
- if not gameStarted then
- ShowStartBoard()
- end
- else
- table.insert(teams.Team1,v)
- if not gameStarted then
- ShowStartBoard()
- end
- end
- end
- end
- end
- elseif arg[1]:lower() == "add" and arg[2]:lower() == "team2" and arg[3] ~= nil then
- for i,v in pairs(arg) do
- if i > 1 then
- if PlayerCheck(v) then
- if TeamFix(v) == "team1"then
- table.clear(teams.Team1,v)
- table.insert(teams.Team2,v)
- if not gameStarted then
- ShowStartBoard()
- end
- else
- table.insert(teams.Team2,v)
- if not gameStarted then
- ShowStartBoard()
- end
- end
- end
- end
- end
- elseif arg[1] == "remove" and arg[2] == "team1" and arg[3] ~= nil then
- if TeamFix(arg[3]) == "team1" then
- if not gameStarted then
- table.clear(teams.Team1,arg[3])
- ShowStartBoard()
- else
- table.clear(teams.Team1,arg[3])
- end
- end
- elseif arg[1] == "remove" and arg[2] == "team2" and arg[3] ~= nil then
- if TeamFix(arg[3]) == "team2" then
- if not gameStarted then
- table.clear(teams.Team2,arg[3])
- ShowStartBoard()
- else
- table.clear(teams.Team2,arg[3])
- end
- end
- elseif arg[1]:lower() == "aj" and arg[2]:lower() == "on" and arg[3] == nil then
- autoJoin = true
- elseif arg[1]:lower() == "aj" and arg[2]:lower() == "off" and arg[3] == nil then
- autoJoin = false
- elseif arg[1]:lower() == "start" then
- if not gameStarted then
- ShowStartBoard()
- end
- elseif arg[1]:lower() == "exit" and arg[2] == nil then
- if not gameStarted then
- for i=0,17,1 do
- ui.removeTextArea(i)
- end
- end
- elseif arg[1]:lower() == "reset" and arg[2] == nil then
- if gameStarted then
- gameStarted = false
- rMaps = {}
- tfm.exec.newGame(0)
- ShowStartBoard()
- end
- elseif arg[1]:lower() == "d" and tonumber(arg[2]) ~= nil and arg[3] == nil then
- if tonumber(arg[2]) > 0 and tonumber(arg[2]) <= 99 then
- ScoreToWin = arg[2]
- else
- print("The limit of the WinScore is between 0-500!")
- end
- elseif arg[1]:lower() == "skip" and arg[2] == nil then
- newMap()
- elseif arg[1]:lower() == "sp" then
- if arg[2]:lower() == "team1" then
- if tonumber(arg[3]) ~= nil then
- if tonumber(arg[3]) < tonumber(ScoreToWin) and tonumber(arg[3]) > 0 then
- teamScore.Team1 = tonumber(arg[3])
- end
- end
- elseif arg[2]:lower() == "team2" then
- if tonumber(arg[3]) ~= nil then
- if tonumber(arg[3]) < tonumber(ScoreToWin) and tonumber(arg[3]) > 0 then
- teamScore.Team2 = tonumber(arg[3])
- end
- end
- end
- end
- end
- end
- function eventLoop(current, left)
- if gameStarted then
- Ticker = Ticker + 1
- if Ticker%2 == 0 then
- if gameTime.Minutes <= 0 and gameTime.Seconds <= 0 then
- newMap()
- elseif gameTime.Seconds < 1 then
- gameTime.Minutes = gameTime.Minutes - 1
- gameTime.Seconds = 59
- end
- if gameTime.Seconds > 9 then
- tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#"..team2Color .."'>" ..team2C ..": "..teamScore.Team2.."</font> / <n>D:" ..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":" ..gameTime.Seconds .."\n")
- elseif gameTime.Seconds < 10 then
- -- tfm.exec.setUIMapName(currentMap .."| Time left: 0" .. gameTime.Minutes ..":0".. gameTime.Seconds .." | " ..team1C ..": ".. teamScore.Team1 .."/ "..team2C ..": "..teamScore.Team2 .."\n")
- tfm.exec.setUIMapName(currentMap .." <font color='#"..team1Color .."'>" ..team1C ..": ".. teamScore.Team1 .."</font> / <font color='#" ..team2Color .."'>" ..team2C ..": "..teamScore.Team2 .."</font> / <n>D:"..ScoreToWin .."</n> Time left: 0" .. gameTime.Minutes ..":0" ..gameTime.Seconds .."\n")
- end
- gameTime.Seconds = gameTime.Seconds - 1
- Ticker = 0
- end
- end
- end
- function newMap()
- --Write the maps codes first and then make it choose a random map .
- if mod == "Bootcamp" then
- math.randomseed(os.time())
- local r = bootcampMaps[math.random(#bootcampMaps)]
- if tableSizeKey(rMaps,r) > 0 then
- for i,v in pairs(rMaps) do
- if rMaps[i] > 0 then
- rMaps[i] = rMaps[i] - 1
- print(rMaps[i])
- elseif rMaps[i] <= 0 then
- rMaps = table_removeKey(rMaps,i)
- end
- end
- end
- if rMaps[tostring(r)] then
- newMap()
- else
- rMaps[tostring(r)] = mRound
- tfm.exec.newGame(r)
- print(r)
- end
- end
- end
- function SetPlayerNameColor()
- checkColor()
- for i,v in pairs(teams.Team1) do
- tfm.exec.setNameColor(v, "0x"..team1Color)
- end
- for i,v in pairs(teams.Team2) do
- tfm.exec.setNameColor(v, "0x"..team2Color)
- end
- end
- function setTimeMode()
- gameTime.Minutes = 1
- gameTime.Seconds = 50
- end
- function FillTeams()
- local t = 1
- teams.Team1 = {}
- teams.Team2 = {}
- for n,p in pairs(tfm.get.room.playerList) do
- if t == 1 then
- table.insert(teams.Team1,n)
- t = 2
- elseif t == 2 then
- table.insert(teams.Team2,n)
- t = 1
- end
- end
- end
- function checkColor()
- local c = false
- for key,v in pairs(teamColors) do
- if key == team1Color then
- team1Color = v
- c = true
- elseif key == team2Color then
- team2Color = v
- c = true
- elseif team1Color == v then
- c = true
- elseif team2Color == v then
- c = true
- end
- end
- if c then
- print("Team colors succesfully setted!")
- else
- team1Color = teamColors.Green
- team2Color = teamColors.Blue
- print("Sory couldn't found the color you choosed, Defult color will be apllied.")
- end
- end
- function table.clear(t,obj)
- for i,v in ipairs(t) do
- if v==obj then
- table.remove(t,i)
- end
- end
- end
- function table.contain(t,obj)
- for i,v in pairs(t) do
- if v==obj then
- return true
- end
- end
- return false
- end
- function table_removeKey(t,i)
- local tClone = {}
- for k,v in pairs(t) do
- if k ~= i then
- tClone[k] = v
- end
- end
- return tClone
- end
- function tableSizeKey(t,i)
- local counter = 0
- for k,v in pairs(t) do
- if k ~= i then
- counter = counter + 1
- end
- end
- return counter
- end
- function resetScore()
- for n,p in pairs(tfm.get.room.playerList) do
- tfm.exec.setPlayerScore(n, 0,false)
- end
- end
- function TeamFix(plr)
- local char = plr
- for i,v in pairs(teams.Team1) do
- if v == char then
- return "team1"
- end
- end
- for i,n in pairs(teams.Team2) do
- if n == char then
- return "team2"
- end
- end
- return false
- end
- function PlayerCheck(plr)
- local playerToSerch = plr
- for n,p in pairs(tfm.get.room.playerList) do
- if n == plr then
- return true
- end
- end
- return false
- end
- function PlayerInTeam(plr)
- local player = plr
- for i,v in pairs(teams.Team1) do
- if v == player then
- return true
- end
- end
- for i,n in pairs(teams.Team2) do
- if n == player then
- return true
- end
- end
- return false
- end
- function ShowStartBoard()
- ui.addTextArea(0, "<p align='center'><font size='13'> Administradores: <font color='#00ff40'><b>Fabi#5061 y Ijuini#0000", nil, 247, 367, 305, 25, 0x324650, 0x000000, 0.8, true)
- ui.addTextArea(1, "", nil, 209, 33, 381, 326, 0x324650, 0x000000, 1, true)
- ui.addTextArea(2, "<p align='center'><font size='12' color='#" ..team1Color .."'>" .. (table.concat(teams.Team1,"\n") or ""), nil, 208, 66, 151, 254, 0x324650, 0x000000, 1, true)
- ui.addTextArea(3, "<p align='center'><font size='12' color='#" ..team2Color .."'> " .. (table.concat(teams.Team2,"\n") or ""), nil, 438, 66, 151, 254, 0x324650, 0x000000, 1, true)
- ui.addTextArea(4, "<p align='center'>" ..(mod), nil, 354, 60, 89, 19, 0x324650, 0x000000, 1, true)
- ui.addTextArea(5, "<font size='12'><p align='center'><b><font color='#00C17C'> \\ The Legends Bc Tournament /</font></b>", nil, 209, 33, 381, 21, 0x324650, 0x000000, 1, true)
- --ui.addTextArea(6, "<p align='center'>Made by - <font color='#ff0000'>Ctmce</font> -", nil, 207, 33, 109, 20, 0x324650, 0x000000, 0, true)
- -- ui.addTextArea(7, "Racing 2/4 Teams!", nil, 510, 33, 109, 20, 0x324650, 0x000000, 0, true)
- -- ui.addTextArea(8, "<p align='center'><b><a href='event:bc'>Bootcamp</a>", nil, 365, 208, 69, 19, 0x540c0c, 0x000000, 1, true)
- -- ui.addTextArea(9, "<p align='center'><b><a href='event:rc'>Racing</a>", nil, 365, 157, 69, 20, 0x1a0d6e, 0x000000, 1, true)
- ui.addTextArea(10, "<p align='center'><font size='13'><b><a href='event:start'><A:ACTIVE>Start</a></font>", nil, 359, 180, 82, 23, 0x324650, 0x000000, 1, true)
- ui.addTextArea(11, "<p align='center'>Score: <a href='event:dec'>-</a><font color='#00C17C'> "..ScoreToWin .." </font><a href='event:inc'>+</a>", nil, 356, 210, 87, 20, 0x324650, 0x000000, 1, true)
- ui.addTextArea(12, "<p align='center'><b><T><a href='event:versus1'>Versus 1</T>", nil, 217, 335, 65, 20, 0x324650, 0x000000, 1, true)
- ui.addTextArea(13, "<p align='center'><b><V><a href='event:versus2'>Versus 2</V>", nil, 315, 335, 65, 20, 0x324650, 0x000000, 1, true)
- ui.addTextArea(14, "<p align='center'><b><VP><a href='event:versus3'>Versus 3</VP></a>", nil, 418, 335, 65, 20, 0x324650, 0x000000, 1, true)
- ui.addTextArea(15, "<p align='center'><b><CH><a href='event:versus4'>Versus 4</CH>", nil, 518, 335, 65, 20, 0x324650, 0x000000, 1, true)
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement