Advertisement
Guest User

Survivor bot competition

a guest
Jul 1st, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.51 KB | None | 0 0
  1. tfm.exec.disableAutoTimeLeft (true)
  2. tfm.exec.disableAutoNewGame(true)
  3. tfm.exec.disableAutoShaman(true)
  4.  
  5. admins = {"Warfenixkill", "Ultraspeedy", "Ratacp", "Sucarin", "Belkano", "Yunowears", "Bogkitty", "Kissyta", "Toritomm", "Ssergi", "Crashark", "Enjoyandplay", "Jontreras","Tenfeenti", "Mousetat", "Xsilverraven"}
  6. menuAdmin = {false,false}
  7. gameOn = false
  8. adminOn = false
  9. gameEnds = false
  10. player = {}
  11. keys = {66,71,74,76}
  12. roundsCounter=1
  13. maxRound=20
  14. numberWinners=5
  15.  
  16. despawnObject = {}
  17. timeLastShoot = {0,0,false}
  18. timeLastMultipleShoot = {0,0,false}
  19.  
  20. cannonPosition = {x={},y={},a={}}
  21.  
  22. mapas = {"391664","866256","393406","292672","793117","392616","311496","6622204","3102891","479091 ","397066","802975","289932 ","489470 ","6631961","6592438","6549805","6515473","6456320","6284023","6240668","6125512","5973058","5964714","5498543","5239078","5196131","5175883","4842994","4705798","4679748","4329532","3699989","3686073","3587860","3579303","3550350","3540608","3480467","3473722","3419948","3400319","3322939","3220945","3175437","3146721","3107377","3067251","2964900","2939549","2842113","2732060","2526952","2408376","2284187","1812056","1794907","1794873","1661909","1659906","1545834","153914","1535492","1533374","1533333","1528388","1525486","1519483","1515058","1514928","1492805","1463332","1388662","1277941","1026249","953515","908739","837797","290546"}
  23.  
  24. textES = {"You sure you want to start the game?",
  25. "Nice Job! You obtained <font color='#AAFF68'><b>3</b> points</font>!",
  26. "Good Job! You got <font color='#AAFF68'><b>1</b> point</font>!",
  27. "<p align='center'><font size='15'><font color='#C5CAFF'><b>List of players - ratings</b></font></font></p>",
  28. "The tournament is now in <font color='#AAFF68'><b>Practice Mode</b></font>!",
  29. "<p align='center'><font size='15'><font color='#C5CAFF'><b>Players classified to semifinals!</b></font></font></p>"}
  30.  
  31. numberPlayers = {0,0}
  32.  
  33. function main()
  34. --ui.addTextArea(0, "<p align='center'><font size='26'><font color='#90C6FF'><b>Survivor</b></font></font><br><font size='14'><font color='#FFBB90'><b>Edition <font color='#DCFF90'>Special</font></b></font></font><br>------------------------------<br><font size='11'><b>OFFICIAL TOURNAMENT <font color='#FF9090'>E</font><font color='#FFF990'>S</font></b></p>", nil, 630, 30, 160, 115, 0x324650, 0x0, 0)
  35. --tfm.exec.newGame("@6653312")
  36. for playerName in pairs(tfm.get.room.playerList) do
  37. tfm.exec.setPlayerScore(playerName,0)
  38. eventNewPlayer(playerName)
  39. end
  40. game()
  41. end
  42.  
  43. function eventNewPlayer(playerName)
  44. player[playerName] = {points=0, msjOn={false,false}}
  45. for _,k in pairs(keys) do
  46. system.bindKeyboard(playerName, k, true)
  47. end
  48. end
  49.  
  50. function eventKeyboard(playerName, key, down, px, py)
  51. if key==71 then
  52. for _,adminName in pairs(admins) do
  53. if playerName==adminName then
  54. startGame(playerName)
  55. end
  56. end
  57.  
  58. elseif key==74 then
  59. for _,adminName in pairs(admins) do
  60. if playerName==adminName then
  61. if menuAdmin[1]==false then
  62. adminModeControl(playerName,1)
  63. else
  64. adminModeControl(playerName,0)
  65. end
  66. end
  67. end
  68.  
  69. elseif key==76 then
  70. if player[playerName]~=nil then
  71. if player[playerName].msjOn[1]==false then
  72. scoreList(playerName,1)
  73. else
  74. scoreList(playerName,0)
  75. end
  76. end
  77. elseif key==66 then
  78. for _,adminName in pairs(admins) do
  79. if playerName==adminName then
  80. restartMode()
  81. end
  82. end
  83. end
  84. end
  85.  
  86. function restartMode()
  87. for i = 1,3000,1 do
  88. ui.removeTextArea (i,nil)
  89. end
  90. roundsCounter=1
  91. menuAdmin = {false,false}
  92. gameOn = false
  93. adminOn = false
  94. gameEnds = false
  95. despawnObject = {}
  96. timeLastShoot = {0,0,false}
  97. timeLastMultipleShoot = {0,0,false}
  98. cannonPosition = {x={},y={},a={}}
  99. player = {}
  100. main()
  101. end
  102.  
  103. function startGame(playerName)
  104. ui.addPopup(1, 2, " Place <font color='#FFDE6E'><b>password</b></font> to start the tournament:", playerName, 20, 40, 280, true)
  105. end
  106.  
  107. function eventTextAreaCallback(id, playerName, answer)
  108. if id>=200 and id<=300 then
  109. modControlV(answer)
  110. end
  111.  
  112. if id>=44 and id<=45 then
  113. if answer=='Cancelar' then
  114. modControlV1()
  115. else
  116. tfm.exec.killPlayer(answer)
  117. modControlV1()
  118. end
  119. end
  120. end
  121.  
  122. function eventPopupAnswer(id, playerName, answer)
  123. if id==1 and answer=="@GBCSSSSTWBBRUY" then
  124. ui.removeTextArea (0,nil)
  125. roundsCounter=1
  126. gameEnds = false
  127. for playerName in pairs(player) do
  128. player[playerName].points = 0
  129. end
  130. adminOn=true
  131. game()
  132. end
  133. end
  134.  
  135. function game()
  136. numberPlayers = {0,0}
  137. ui.removeTextArea (0,nil)
  138.  
  139. for i = 1,5,1 do
  140. ui.removeTextArea (i+10,nil)
  141. ui.removeTextArea (i+20,nil)
  142. end
  143.  
  144. if adminOn==true then
  145. if roundsCounter>=maxRound then
  146. gameOn=false
  147. gameEnds=true
  148. for playerName in pairs(player) do
  149. finalScoreList(playerName)
  150. end
  151. end
  152. end
  153.  
  154. tfm.exec.newGame("@"..mapas[math.random(#mapas)])
  155. tfm.exec.setUIMapName("[Tournament] Survivor (Special Edition)")
  156.  
  157. for playerName in pairs(player) do
  158. tfm.exec.giveMeep(playerName)
  159. numberPlayers[1] = numberPlayers[1]+1
  160. end
  161.  
  162. numberPlayers[2] = numberPlayers[1]
  163. gameOn = true
  164. end
  165.  
  166. function eventLoop(t, tr)
  167. ui.removeTextArea (2,nil)
  168. ui.removeTextArea (6000,nil)
  169.  
  170. for i,object in ipairs(despawnObject) do
  171. if os.time()+10 > object[2]+1000 then
  172. tfm.exec.removeObject (object[1])
  173. table.remove (despawnObject, i)
  174. end
  175. end
  176.  
  177. if tr <= 117000 and tr >= 116000 and gameOn==true and gameEnds==false then
  178. ui.addTextArea(2, "<p align='center'><font color='#FFFFFF'><font size='30'><b>3</b></font></font></p>", nil, 350, 350, 100, 50, 0x20202, 0x0, 0.8)
  179. if adminOn==true then
  180. ui.addTextArea(6000, "<p align='center'><font color='#FFFFFF'><font size='30'><b>Round "..roundsCounter.."/"..maxRound.."</b></font></font></p>", nil, 273, 177.5, 254, 45, 0x2e2e2e)
  181. end
  182. elseif tr <= 116000 and tr >= 115000 and gameOn==true and gameEnds==false then
  183. ui.addTextArea(2, "<p align='center'><font color='#FFFFFF'><font size='30'><b>2</b></font></font></p>", nil, 350, 350, 100, 50, 0x20202, 0x0, 0.8)
  184. if adminOn==true then
  185. ui.addTextArea(6000, "<p align='center'><font color='#FFFFFF'><font size='30'><b>Round "..roundsCounter.."/"..maxRound.."</b></font></font></p>", nil, 273, 177.5, 254, 45, 0x2e2e2e)
  186. end
  187. elseif tr <= 115000 and tr >= 114000 and gameOn==true and gameEnds==false then
  188. ui.addTextArea(2, "<p align='center'><font color='#FFFFFF'><font size='30'><b>1</b></font></font></p>", nil, 350, 350, 100, 50, 0x20202, 0x0, 0.8)
  189. if adminOn==true then
  190. ui.addTextArea(6000, "<p align='center'><font color='#FFFFFF'><font size='30'><b>Round "..roundsCounter.."/"..maxRound.."</b></font></font></p>", nil, 273, 177.5, 254, 45, 0x2e2e2e)
  191. end
  192. elseif tr <= 114000 and tr >= 113000 and gameOn==true and gameEnds==false then
  193. ui.addTextArea(2, "<p align='center'><font color='#FFFFFF'><font size='30'><b>GO</b></font></font></p>", nil, 350, 350, 100, 50, 0x20202, 0x0, 0.8)
  194. if adminOn==true then
  195. ui.addTextArea(6000, "<p align='center'><font color='#FFFFFF'><font size='30'><b>Round "..roundsCounter.."/"..maxRound.."</b></font></font></p>", nil, 273, 177.5, 254, 45, 0x2e2e2e)
  196. end
  197. elseif tr <= 113000 and tr >= 0 and gameOn==true and os.time()>(timeLastShoot[1]+500) then
  198. if gameEnds == false then
  199. regularShoot()
  200. end
  201. elseif tr < 0 and tr >=- 3000 then
  202. if gameOn == true then
  203. updateScore()
  204. end
  205. gameOn = false
  206. elseif tr <- 3000 then
  207. game()
  208. if adminOn==true then
  209. roundsCounter=roundsCounter+1
  210. end
  211. end
  212.  
  213. if tr<=90000 and tr>=0 and gameOn==true and os.time()>(timeLastMultipleShoot[1]+30000) then
  214. if gameEnds == false then
  215. multipleShoot()
  216. updateNumberPlayers()
  217. end
  218. end
  219. end
  220.  
  221. function eventPlayerLeft(playerName)
  222. player[playerName]=nil
  223. end
  224.  
  225. function eventPlayerDied (playerName)
  226. if player[playerName] ~= nil then
  227. tfm.exec.setPlayerScore(playerName,player[playerName].points)
  228. end
  229. numberPlayers[2]=numberPlayers[2]-1
  230. if numberPlayers[2] == 1 then
  231. gameOn = false
  232. for playerName,playerNameAlive in pairs(tfm.get.room.playerList) do
  233. if playerNameAlive.isDead == false then
  234. if adminOn==true and gameEnds==false then
  235. player[playerName].points = player[playerName].points+3
  236. tfm.exec.setPlayerScore(playerName,player[playerName].points)
  237. ui.addTextArea(0, "<p align='center'><font color='#FFFFFF'><font size='15'>"..textES[2].."</font></p>", playerName, 200, 350, 400, 30, 0xd1b40, 0x0, 0.6)
  238. else
  239. player[playerName].points = 0
  240. tfm.exec.setPlayerScore(playerName,0)
  241. ui.addTextArea(0, "<p align='center'><font color='#FFFFFF'><font size='15'>"..textES[5].."</font></p>", nil, 0, 350, 800, 50, 0xd1b40, 0x0, 0.6)
  242. end
  243. tfm.exec.setGameTime(0,false)
  244. end
  245. end
  246. end
  247. end
  248.  
  249. function regularShoot()
  250. local angle = {45,90,-90,-45}
  251.  
  252. if timeLastShoot[3] == false then
  253. cannonPosition.a[1] = angle[math.random(#angle)]
  254. cannonPosition.y[1] = math.random(0,400)
  255.  
  256. if cannonPosition.a[1] > 0 then
  257. cannonPosition.x[1] = math.random(0,400)
  258. ui.addTextArea(2, "<p align='center'><font size='40'><font color='#FFB15D'><b>•</b></font></font></p>", nil, cannonPosition.x[1], cannonPosition.y[1]-6, 50, 50, 0x324650, 0x0, 0)
  259. ui.addTextArea(3, "<p align='center'><font size='30'><font color='#FF4F33'><b>•</b></font></font></p>", nil, cannonPosition.x[1], cannonPosition.y[1], 50, 50, 0x324650, 0x0, 0)
  260.  
  261. elseif cannonPosition.a[1] < 0 then
  262. cannonPosition.x[1]=math.random(400,800)
  263. ui.addTextArea(2, "<p align='center'><font size='40'><font color='#FFB15D'><b>•</b></font></font></p>", nil, cannonPosition.x[1], cannonPosition.y[1]-6, 50, 50, 0x324650, 0x0, 0)
  264. ui.addTextArea(3, "<p align='center'><font size='30'><font color='#FF4F33'><b>•</b></font></font></p>", nil, cannonPosition.x[1], cannonPosition.y[1], 50, 50, 0x324650, 0x0, 0)
  265. end
  266.  
  267. timeLastShoot[3] = true
  268. else
  269. if os.time()>(timeLastShoot[1]+1000) then
  270. ui.removeTextArea (2,nil)
  271. ui.removeTextArea (3,nil)
  272. timeLastShoot[1] = os.time()
  273. table.insert(despawnObject, {tfm.exec.addShamanObject(17,cannonPosition.x[1],cannonPosition.y[1],cannonPosition.a[1]), os.time()})
  274. table.insert(despawnObject, {tfm.exec.addShamanObject(17,cannonPosition.x[1],cannonPosition.y[1],cannonPosition.a[1]*-1), os.time()})
  275. end
  276. timeLastShoot[3]=false
  277. end
  278. end
  279.  
  280. function multipleShoot()
  281. local angle = {90,-90}
  282.  
  283. if timeLastMultipleShoot[3] == false then
  284. for i = 1,5,1 do
  285. cannonPosition.a[i] = angle[math.random(#angle)]
  286. cannonPosition.y[i] = math.random(0,400)
  287. if cannonPosition.a[i] == 90 then
  288. ui.addTextArea(i+10, "<p align='center'><font size='33'><font color='#F5D889'><b>•</b></font></font></p>", nil, 400, cannonPosition.y[i]-4, 50, 50, 0x324650, 0x0, 0)
  289. ui.addTextArea(i+20, "<p align='center'><font size='25'><font color='#FF3923'><b>&#187;</b></font></font></p>", nil, 400, cannonPosition.y[i], 50, 50, 0x324650, 0x0, 0)
  290. else
  291. ui.addTextArea(i+10, "<p align='center'><font size='33'><font color='#F5D889'><b>•</b></font></font></p>", nil, 400, cannonPosition.y[i]-4, 50, 50, 0x324650, 0x0, 0)
  292. ui.addTextArea(i+20, "<p align='center'><font size='25'><font color='#FF3923'><b>&#171;</b></font></font></p>", nil, 400, cannonPosition.y[i], 50, 50, 0x324650, 0x0, 0)
  293. end
  294. timeLastMultipleShoot[3] = true
  295. end
  296. timeLastMultipleShoot[2] = os.time()
  297.  
  298. else
  299. if os.time()>(timeLastMultipleShoot[1]+3000) and os.time() > timeLastMultipleShoot[2]+1500 then
  300. for i = 1,5,1 do
  301. ui.removeTextArea (i+10,nil)
  302. ui.removeTextArea (i+20,nil)
  303. timeLastMultipleShoot[1] = os.time()
  304. table.insert(despawnObject, {tfm.exec.addShamanObject(17,400,cannonPosition.y[i],cannonPosition.a[i]), os.time()})
  305. end
  306. timeLastMultipleShoot[3] = false
  307. end
  308. end
  309. end
  310.  
  311. function updateScore()
  312. for playerName,playerNameAlive in pairs(tfm.get.room.playerList) do
  313. if playerNameAlive.isDead == false then
  314. if adminOn==true and gameEnds==false then
  315. player[playerName].points = player[playerName].points+1
  316. tfm.exec.setPlayerScore(playerName,player[playerName].points)
  317. ui.addTextArea(0, "<p align='center'><font color='#FFFFFF'><font size='15'>"..textES[3].."</font></p>", playerName, 200, 350, 400, 50, 0xd1b40, 0x0, 0.6)
  318. else
  319. player[playerName].points = 0
  320. tfm.exec.setPlayerScore(playerName,0)
  321. ui.addTextArea(0, "<p align='center'><font color='#FFFFFF'><font size='15'>"..textES[5].."</font></p>", nil, 0, 350, 800, 50, 0xd1b40, 0x0, 0.6)
  322. end
  323. end
  324. end
  325. end
  326.  
  327. function updateNumberPlayers()
  328. local aux=0
  329.  
  330. for _,playerName in pairs(tfm.get.room.playerList) do
  331. if playerName.isDead==false then
  332. aux=aux+1
  333. end
  334. end
  335. numberPlayers[2]=aux
  336. end
  337.  
  338. function scoreList(playerName,action)
  339. if action==1 then
  340. local backupList,aux,cont,xList,yList={},{},0,125,135
  341. player[playerName].msjOn[1]=true
  342. ui.addTextArea(80, "", playerName, 100, 60, 600, 300, 0x25234b, 0x0, 0.6)
  343. ui.addTextArea(81, textES[4], playerName, 125, 80, 550, 25, 0x5060c, 0x0, 0.7)
  344. for name in pairs(player) do
  345. cont=cont+1
  346. table.insert(backupList,{playerName=name,points=player[name].points})
  347. end
  348. for i=1,cont,1 do
  349. for j=1,cont,1 do
  350. if backupList[j+1]~=nil then
  351. if (backupList[j].points < backupList[j+1].points) then
  352. aux=backupList[j]
  353. backupList[j]=backupList[j+1]
  354. backupList[j+1]=aux
  355. end
  356. end
  357. end
  358. end
  359. for i=1,cont,1 do
  360. if i%4~=0 then
  361. if yList~=345 then
  362. ui.addTextArea(i+100, "<p align='center'><font color='#C5CAFF'><font size='11'><b><font color='#ADF27C'>"..i..".</font> "..backupList[i].playerName..": <font color='#5BC8E6'>"..backupList[i].points.."</font></b></font></font></p>", playerName, xList, yList, 135, 18, 0x324650, 0x0, 0)
  363. xList=xList+140
  364. end
  365. else
  366. if yList~=345 then
  367. ui.addTextArea(i+100, "<p align='center'><font color='#C5CAFF'><font size='11'><b><font color='#ADF27C'>"..i..".</font> "..backupList[i].playerName..": <font color='#5BC8E6'>"..backupList[i].points.."</font></b></font></font></p>", playerName, xList, yList, 135, 18, 0x324650, 0x0, 0)
  368. yList=yList+30
  369. xList=125
  370. end
  371. end
  372. end
  373. elseif action==0 then
  374. player[playerName].msjOn[1]=false
  375. ui.removeTextArea (80,playerName)
  376. ui.removeTextArea (81,playerName)
  377. for i=101,150,1 do
  378. ui.removeTextArea (i,playerName)
  379. end
  380. end
  381. end
  382.  
  383. function finalScoreList(playerName)
  384. local backupList,aux,cont,xList,yList={},{},0,125,135
  385. player[playerName].msjOn[1]=true
  386. ui.addTextArea(80, "", playerName, 100, 60, 600, 300, 0x25234b, 0x0, 0.6)
  387. ui.addTextArea(81, textES[6], playerName, 125, 80, 550, 25, 0x5060c, 0x0, 0.7)
  388. for name in pairs(player) do
  389. cont=cont+1
  390. table.insert(backupList,{playerName=name,points=player[name].points})
  391. end
  392. for i=1,cont,1 do
  393. for j=1,cont,1 do
  394. if backupList[j+1]~=nil then
  395. if (backupList[j].points < backupList[j+1].points) then
  396. aux=backupList[j]
  397. backupList[j]=backupList[j+1]
  398. backupList[j+1]=aux
  399. end
  400. end
  401. end
  402. end
  403. for i=1,cont,1 do
  404. if i%4~=0 then
  405. if yList~=345 then
  406. if i>=1 and i<=numberWinners then
  407. ui.addTextArea(i+100, "<p align='center'><font color='#C5CAFF'><font size='11'><b><font color='#ADF27C'>"..i..".</font> "..backupList[i].playerName..": <font color='#5BC8E6'>"..backupList[i].points.."</font></b></font></font></p>", playerName, xList, yList, 135, 18, 0x324650, 0x0, 0)
  408. end
  409. xList=xList+140
  410. end
  411. else
  412. if yList~=345 then
  413. if i>=1 and i<=numberWinners then
  414. ui.addTextArea(i+100, "<p align='center'><font color='#C5CAFF'><font size='11'><b><font color='#ADF27C'>"..i..".</font> "..backupList[i].playerName..": <font color='#5BC8E6'>"..backupList[i].points.."</font></b></font></font></p>", playerName, xList, yList, 135, 18, 0x324650, 0x0, 0)
  415. end
  416. yList=yList+30
  417. xList=125
  418. end
  419. end
  420. end
  421. end
  422.  
  423. function adminModeControl(adminName,action)
  424. if action==1 then
  425. local playerList,cont,xList,yList={},0,55,95
  426. for playerName,playerNameAlive in pairs(tfm.get.room.playerList) do
  427. if playerNameAlive.isDead==false then
  428. table.insert(playerList,{playerNameList=playerName})
  429. cont=cont+1
  430. end
  431. end
  432.  
  433. ui.addTextArea(30, "", adminName, 25, 35, 750, 150, 0x12274a, 0x12274a)
  434. ui.addTextArea(31, "", adminName, 40, 35, 720, 150, 0x30f14, 0x2233)
  435. ui.addTextArea(32, "<p align='center'><b>Click on the player you want to delete</b></p>", adminName, 15, 50, 300, 22, 0x1b3745, 0x324650)
  436.  
  437. for i=1,cont,1 do
  438. if i%5~=0 then
  439. if yList~=155 then
  440. ui.addTextArea(i+200, "<p align='center'><font color='#FFFFFF'><font size='11'><b><a href='event:"..playerList[i].playerNameList.."'>"..playerList[i].playerNameList.."</a></b></font></font></p>", adminName, xList, yList, 135, 18, 0x324650, 0x0, 0)
  441. xList=xList+144
  442. end
  443. else
  444. if yList~=155 then
  445. ui.addTextArea(i+200, "<p align='center'><font color='#FFFFFF'><font size='11'><b><a href='event:"..playerList[i].playerNameList.."'>"..playerList[i].playerNameList.."</a></b></font></font></p>", adminName, xList, yList, 135, 18, 0x324650, 0x0, 0)
  446. yList=yList+30
  447. xList=55
  448. end
  449. end
  450. end
  451. menuAdmin[1]=true
  452. elseif action==0 then
  453. for i=200,250,1 do
  454. ui.removeTextArea (i,nil)
  455. modControlV1()
  456. end
  457. ui.removeTextArea (30,nil)
  458. ui.removeTextArea (31,nil)
  459. ui.removeTextArea (32,nil)
  460. ui.removeTextArea (33,nil)
  461. menuAdmin[1]=false
  462. end
  463. end
  464.  
  465. function modControlV(respuesta)
  466. ui.addTextArea(40, "", administrador, 620, 330, 160, 50, 0x12274a, 0x12274a)
  467. ui.addTextArea(41, "", administrador, 346, 313, 450, 20, 0x30f14, 0x30f14)
  468. ui.addTextArea(42, "", administrador, 630, 330, 140, 50, 0x30f14, 0x30f14)
  469. ui.addTextArea(43, "<p align='center'><b>Are you sure you want to remove the selected player?</b></p>", administrador, 346, 318, 450, 20, 0x1b3745)
  470. ui.addTextArea(44, "<p align='center'><font color='#FF3246'><font size='18'><u><b><a href='event:"..respuesta.."'>Yes</b></font></p>", administrador, 645, 348, 50, 30, 0x324650, 0x0, 0)
  471. ui.addTextArea(45, "<p align='center'><font size='18'><font color='#81DC3B'><u><b><a href='event:Cancelar'>No</b></font></p>", administrador, 710, 348, 50, 30, 0x324650, 0x0, 0)
  472. end
  473.  
  474. function modControlV1()
  475. ui.removeTextArea (40,nil)
  476. ui.removeTextArea (41,nil)
  477. ui.removeTextArea (42,nil)
  478. ui.removeTextArea (43,nil)
  479. ui.removeTextArea (44,nil)
  480. ui.removeTextArea (45,nil)
  481. end
  482.  
  483. function actualizaJugadoresVivos()
  484. local cont=0
  485. for nombreJugador,verificaVivo in pairs(tfm.get.room.playerList) do
  486. if verificaVivo.isDead==false then
  487. cont=cont+1
  488. end
  489. end
  490. jugadoresVivos=cont
  491. end
  492.  
  493. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement