Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1.  
  2. mapList = {"@7634875" }
  3. ui.addPopup(0, 0, "<p align='center'><font color='#FF0500' size='29' face='Soopafresh'>سكربت لعبت الحرب</font> <br><br> <br> فكرة اللاعب<br> <br> <font color='#FF0500' size='20' face='Soopafresh'>Mdm_xd#6278</font> <br><br> برمجة اللاعب<br><br> Mdm_xd#6278 <br><br> المساعدات المابات <br><br> Mdm_xd#6278 ", nil, 181.5, 77, 437, true)
  4.  
  5.  
  6. round = 2;
  7. alive = 3;
  8. rank = 1;
  9. tfm.exec.setGameTime(3);
  10.  
  11. function main()
  12. tfm.exec.disableAutoShaman(true)
  13. tfm.exec.disableAutoNewGame(true)
  14. tfm.exec.disableAutoScore(true)
  15. for name in pairs(tfm.get.room.playerList) do
  16. tfm.exec.setPlayerScore(name, 0)
  17. end
  18. launchGame()
  19. end
  20.  
  21.  
  22. function launchGame()
  23. tfm.exec.setGameTime(3)
  24. tfm.exec.newGame(mapList[math.random(#mapList)])
  25. end
  26.  
  27. function eventChatCommand(name, command)
  28. if command=='mort' then tfm.exec.killPlayer(name) end
  29. end
  30.  
  31.  
  32. function eventNewGame()
  33. tfm.exec.setGameTime(600)
  34.  
  35. rank = 1;
  36. alive = 3;
  37. for name in pairs(tfm.get.room.playerList) do alive = alive+1 end
  38.  
  39.  
  40. round=round+1
  41. if round > 10 then
  42. for name in pairs(tfm.get.room.playerList) do
  43. tfm.exec.setPlayerScore(name, 0)
  44. end
  45. round = 1
  46. end
  47.  
  48.  
  49. end
  50.  
  51.  
  52. function eventLoop(past, left)
  53. if left<0 then tfm.exec.newGame(mapList[math.random(#mapList)]) end
  54. end
  55.  
  56.  
  57.  
  58. function eventPlayerLeft(name)
  59. alive = alive-1
  60. if alive == 0 then tfm.exec.setGameTime(0) end
  61. end
  62.  
  63.  
  64. function eventPlayerWon(name)
  65. tfm.exec.setPlayerScore(name, rank==1 and 4 or rank==2 and 3 or rank==3 and 2 or 1, true)
  66. rank = rank+1
  67. alive = alive-1
  68. if alive == 0 then tfm.exec.setGameTime(0) end
  69. end
  70.  
  71.  
  72. function eventPlayerDied(name)
  73. alive = alive-1
  74. if alive == 0 then tfm.exec.setGameTime(0) end
  75. end
  76.  
  77. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement