proking

Mission

Aug 31st, 2011
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.96 KB | None | 0 0
  1. public TeamsStats(){
  2. if(Options[Language]==1)format(tstring,sizeof(tstring),"~b~Punti Difesa: %d~n~~r~Punti Nemico: %d",ArmyScore,EnemyScore);
  3. if(Options[Language]==2)format(tstring,sizeof(tstring),"~b~Defence Score: %d~n~~r~Enemy Score: %d",ArmyScore,EnemyScore);
  4. TextDrawSetString(ShipTextdraw1,tstring);
  5. return 1;}
  6.  
  7. public EndRoundTimer(){
  8. if(RoundCountActive==1){
  9. if(EndRoundSeconds==0 && EndRoundMinutes==0){
  10. //if(PlayersCountShip>0){
  11. RoundTimer();
  12. EndRoundMinutes=0;
  13. EndRoundSeconds=0;}
  14. if(EndRoundSeconds==0){
  15. //if(PlayersCountShip>0){
  16. EndRoundMinutes--;
  17. EndRoundSeconds=60;
  18. if(Options[Language]==1)format(tstring3,sizeof(tstring3),"Tempo Fine Round: %d.%d",EndRoundMinutes,EndRoundSeconds);
  19. if(Options[Language]==2)format(tstring3,sizeof(tstring3),"Round Time Finish: %d.%d",EndRoundMinutes,EndRoundSeconds);
  20. TextDrawSetString(ShipTextdraw3,tstring3);}
  21. if(EndRoundSeconds>0){
  22. //if(PlayersCountShip>0){
  23. if(Options[Language]==1)format(tstring3,sizeof(tstring3),"Tempo Fine Round: %d.%d",EndRoundMinutes,EndRoundSeconds);
  24. if(Options[Language]==2)format(tstring3,sizeof(tstring3),"Round Time Finish: %d.%d",EndRoundMinutes,EndRoundSeconds);
  25. TextDrawSetString(ShipTextdraw3,tstring3);
  26. EndRoundSeconds--;}}
  27. return 1;}
  28.  
  29. public RoundTimer(){
  30. SetTimer("RoundTimer2",4000,0);
  31. ShowShipCamera();
  32. for(new i=0;i<MAX_SERVER_PLAYERS;i++)if(IsPlayerConnected(i)){
  33. if(GetPlayerVirtualWorld(i)==SHIP__WORLD){
  34. TogglePlayerControllable(i,0);
  35. if(Options[Language]==1)GameTextForPlayer(i,"~w~La partita e' ~g~Finita!",3000,3);
  36. if(Options[Language]==2)GameTextForPlayer(i,"~w~The game is ~g~Finished!",3000,3);}}
  37. return 1;}
  38.  
  39. public RoundTimer2(){
  40. RoundCountActive=0;
  41. KillTimer(TimerCountDown);
  42. SetTimer("RoundTimer3",14000,0);
  43. for(new i=0;i<MAX_SERVER_PLAYERS;i++){
  44. if(GetPlayerVirtualWorld(i)==SHIP__WORLD){
  45. if(ArmyScore==EnemyScore){
  46. if(Options[Language]==1)GameTextForPlayer(i,"~b~Nessun team ha vinto!",3000,3);
  47. if(Options[Language]==2)GameTextForPlayer(i,"~b~No one has won the Game!",3000,3);}
  48. if(ArmyScore>EnemyScore){
  49. if(Options[Language]==1)GameTextForPlayer(i,"~g~La Difesa ha vinto la partita!",3000,3);
  50. if(Options[Language]==2)GameTextForPlayer(i,"~g~Defence ~w~has won the game!",3000,3);}
  51. if(ArmyScore<EnemyScore){
  52. if(Options[Language]==1)GameTextForPlayer(i,"~r~Il nemico ~w~ha vinto la partita!",3000,3);
  53. if(Options[Language]==2)GameTextForPlayer(i,"~r~Enemy ~w~has won the game!",3000,3);}}}
  54. return 1;}
  55.  
  56. public DefuseBomb(){
  57. for(new i=0;i<MAX_SERVER_PLAYERS;i++)if(IsPlayerConnected(i))if(GetPlayerVirtualWorld(i)==SHIP__WORLD){
  58. if(Checkpoint3[i]==SHIP_CHECKPOINT_BOMB || Checkpoint3[i]==SHIP_CHECKPOINT_NONE){
  59. Checkpoint3[i]=SHIP_CHECKPOINT_SHIP;
  60. if(Options[Language]==1)GameTextForPlayer(i,"~w~La BOMBA e' stata ~g~Disinnescata!!!",4000,3);
  61. if(Options[Language]==2)GameTextForPlayer(i,"~w~The BOMB has been ~g~Defused!!!",4000,3);
  62. DisablePlayerCheckpoint(i);
  63. KillTimer(TimerCountDown);
  64. Bombcountdown=bcountdown;
  65. DestroyObject(Bomb);
  66. BombPlazed=false;
  67. if(Options[Language]==1)TextDrawSetString(ShipTextdraw2,"~b~Bomba Disinnescata!");
  68. if(Options[Language]==2)TextDrawSetString(ShipTextdraw2,"~b~Bomb Defused!");
  69. print(">>> Bomb DEFUSED! <<<");
  70. new skin=GetPlayerSkin(i);
  71. switch(skin){
  72. case 121,122,206,102,103,104,0,269,270,271,272,108,109,110,105,106,107,114,115,116:{
  73. SetPlayerCheckpoint(i,-1438.6355,1490.2092,1.8366,2.0);
  74. Checkpoint3[i]=SHIP_CHECKPOINT_BOMB;
  75. if(Options[Language]==1)GameTextForPlayer(i,"~w~La BOMBA e' stata ~r~Disinnescata!!!~n~~b~Devi piazzarla di nuovo!",6000,3);
  76. if(Options[Language]==2)GameTextForPlayer(i,"~w~The BOMB has been ~r~Defused!!!~n~~b~You have to plaze it again!",6000,3);}}}}
  77. return 1;}
  78.  
  79. public Winning(){
  80. SetTimer("RoundTimer3",10000,0);
  81. RoundCountActive=0;
  82. DestroyObject(Bomb);
  83. if(Options[Language]==1)TextDrawSetString(ShipTextdraw2,"~b~Bomba Non Attivata!");
  84. if(Options[Language]==2)TextDrawSetString(ShipTextdraw2,"~b~Bomb Not Plazed!");
  85. for(new i=0;i<MAX_SERVER_PLAYERS;i++){
  86. if(GetPlayerVirtualWorld(i)==SHIP__WORLD){
  87. RemovePlayerFromVehicle(i);
  88. if(Options[Language]==1)GameTextForPlayer(i,"~r~I Nemici ~w~hanno vinto la partita!~n~~w~La nave e' ~r~DISTRUTTA!",9000,3);
  89. if(Options[Language]==2)GameTextForPlayer(i,"~r~Enemy ~w~has won the game!~n~~w~The ship is ~r~DESTROYED!",9000,3);}}
  90. return 1;}
  91.  
  92. public RoundTimer3(){
  93. if(Options[Language]==1)TextDrawSetString(ShipTextdraw2,"~b~Bomba Non Piazzata!");
  94. if(Options[Language]==2)TextDrawSetString(ShipTextdraw2,"~b~Bomb Not Plazed!");
  95. ArmyScore=0;
  96. EnemyScore=0;
  97. Bombcountdown=bcountdown;
  98. EndRoundMinutes=roundtime-1;
  99. EndRoundSeconds=60;
  100. BombPlazed=false;
  101. KillTimer(TimerCountDown);
  102. RoundCountActive=1;
  103. for(new i=0;i<MAX_SERVER_PLAYERS;i++)if(IsPlayerConnected(i)){
  104. if(GetPlayerVirtualWorld(i)==SHIP__WORLD){
  105. TogglePlayerControllable(i,1);
  106. SpawnPlayer(i);
  107. SetPlayerHealth(i,100);
  108. SendClientMessage(i,COLOR_GREEN,"____________________________________________________________________________");
  109. SendClientMessage(i,COLOR_WHITE,"____________________________________________________________________________");
  110. SendClientMessage(i,COLOR_LIGHTRED,"____________________________________________________________________________");
  111. if(Options[Language]==1)SendClientMessage(i,COLOR_YELLOW,"RESTART GAME: Il gioco รจ stato riavviato per un nuovo round.");
  112. if(Options[Language]==2)SendClientMessage(i,COLOR_YELLOW,"RESTART GAME: The game has been restarted for a new round.");}}
  113. return 1;}
  114.  
  115. public ReActiveCheckpointBomb(playerid){
  116. Checkpoint3[playerid]=SHIP_CHECKPOINT_BOMB;
  117. SetPlayerCheckpoint(playerid,-1438.0116,1491.1317,1.8672,2.0);
  118. BombPlazed=false;
  119. return 1;}
  120.  
  121. public PlantBomb(playerid){
  122. TogglePlayerControllable(playerid,1);
  123. Bomb=CreateObject(3786,-1438.0116,1491.1317,0.8672,0.0,0.0,0.0);
  124. TimerCountDown=SetTimer("BombCountDown",900,1);
  125. Bombcountdown=bcountdown;
  126. BombPlazed=true;
  127. TextDrawSetString(ShipTextdraw2,"Bomb Plazed!");
  128. for(new i=0;i<MAX_SERVER_PLAYERS;i++)if(IsPlayerConnected(i))if(GetPlayerVirtualWorld(i)==SHIP__WORLD){
  129. if(Options[Language]==1)GameTextForPlayer(i,"~r~LA BOMBA E' STATA ATTIVATA!",3000,3);
  130. if(Options[Language]==2)GameTextForPlayer(i,"~r~THE BOMB HAS BEEN ACTIVED!",3000,3);
  131. DisablePlayerCheckpoint(i);
  132. new skin=GetPlayerSkin(i);
  133. switch(skin){
  134. case 287,165,286,285,248,100,247:{
  135. Checkpoint3[i]=SHIP_CHECKPOINT_BOMB;
  136. SetPlayerCheckpoint(i,-1438.0116,1491.1317,1.8672,2.0);
  137. if(Options[Language]==1)GameTextForPlayer(i,"~r~DISATTIVA LA BOMBA PRIMA CHE ESPLODA!!!",3000,3);
  138. if(Options[Language]==2)GameTextForPlayer(i,"~r~DEFUSE THE BOMB BEFORE IT EXPLODES!!!",3000,3);}}}
  139. if(Options[Language]==1)GameTextForPlayer(playerid,"~r~SCAPPA DALLA NAVE!",3000,3);
  140. if(Options[Language]==2)GameTextForPlayer(playerid,"~r~ESCAPE FROM THE SHIP!",3000,3);
  141. return 1;}
  142.  
  143. public BombCountDown(){
  144. if(Bombcountdown>=1){
  145. if(Options[Language]==1)format(tstring2,sizeof(tstring2),"~y~La bomba esplodera' tra~n~~r~%d Secondi~g~!!!",Bombcountdown);
  146. if(Options[Language]==2)format(tstring2,sizeof(tstring2),"~y~Bomb Will explode in~n~~r~%d Seconds~g~!!!",Bombcountdown);
  147. for(new i=0;i<MAX_SERVER_PLAYERS;i++)if(IsPlayerConnected(i))GameTextForPlayer(i,tstring2,2000,3);
  148. Bombcountdown--;}else
  149. if(Bombcountdown==0){
  150. for(new i=0;i<MAX_SERVER_PLAYERS;i++)if(IsPlayerConnected(i))if(GetPlayerVirtualWorld(i)==SHIP__WORLD){
  151. CodeActive[i]=0;
  152. GameTextForPlayer(i,"~r~BOOM!!!!",5000,3);
  153. TogglePlayerControllable(i,0);}
  154. KillTimer(TimerCountDown);
  155. SetTimer("SecondExp",1000,0);
  156. Bombcountdown=bcountdown;
  157. ShowShipCamera();
  158. ShowFirstExplosions();}
  159. return 1;}
  160.  
  161. public SecondExp(){
  162. ShowSecondExplosions();
  163. SetTimer("ThirdExp",1000,0);
  164. return 1;}
  165.  
  166. public ThirdExp(){
  167. ShowThirdExplosions();
  168. Winning();
  169. return 1;}
  170.  
  171. public ShowFirstExplosions(){
  172. CreateExplosion(-1437.5767,1491.3003,1.8672,7,12000);
  173. CreateExplosion(-1430.2054,1490.6703,1.8672,7,12000);
  174. CreateExplosion(-1422.5399,1498.2721,1.8672,7,12000);
  175. CreateExplosion(-1413.2773,1496.5386,1.8672,7,12000);
  176. CreateExplosion(-1392.3235,1496.0385,1.8735,7,12000);
  177. CreateExplosion(-1392.5648,1481.6636,1.8672,7,12000);
  178. CreateExplosion(-1411.4480,1482.9911,1.8672,7,12000);
  179. CreateExplosion(-1417.1648,1489.5833,4.6081,7,12000);
  180. CreateExplosion(-1396.0765,1489.5842,4.6081,7,12000);
  181. TextDrawSetString(ShipTextdraw2,"~w~Bomb EXPLODED!");}
  182.  
  183. public ShowSecondExplosions(){
  184. CreateExplosion(-1384.0355,1493.9211,1.8516,7,12000);
  185. CreateExplosion(-1371.4795,1494.9740,1.8516,7,12000);
  186. CreateExplosion(-1383.9622,1484.5983,8.9063,7,12000);
  187. CreateExplosion(-1378.2446,1488.9755,11.2031,7,12000);}
  188.  
  189. public ShowThirdExplosions(){
  190. CreateExplosion(-1363.4955,1489.6821,11.0391,7,12000);
  191. CreateExplosion(-1371.0344,1497.2571,11.0391,7,12000);
  192. CreateExplosion(-1388.6154,1497.6204,7.1016,7,12000);
  193. CreateExplosion(-1389.0101,1481.4670,7.1092,7,12000);
  194. CreateExplosion(-1395.5691,1479.9114,7.1016,7,12000);
  195. CreateExplosion(-1417.3058,1479.9515,7.1016,7,12000);
  196. CreateExplosion(-1420.8896,1493.4929,7.1016,7,12000);
  197. CreateExplosion(-1437.3196,1490.3585,7.1016,7,12000);
  198. CreateExplosion(-1447.7533,1503.4209,1.7366,7,12000);
  199. CreateExplosion(-1465.6848,1494.2998,8.2578,7,12000);
  200. CreateExplosion(-1475.1741,1488.3488,8.2501,7,12000);
  201. CreateExplosion(-1446.0907,1483.5988,7.1016,7,12000);
  202. CreateExplosion(-1375.0986,1496.1176,13.8438,7,12000);
  203. CreateExplosion(-1375.3422,1481.8638,13.8438,7,12000);
  204. CreateExplosion(-1385.4469,1489.0769,13.8374,7,12000);
  205. CreateExplosion(-1385.1022,1496.8134,13.8438,7,12000);
  206. CreateExplosion(-1379.2994,1486.2386,16.3203,7,12000);
  207. CreateExplosion(-1382.9072,1489.8315,16.3189,7,12000);
  208. CreateExplosion(-1379.0686,1489.8683,24.7743,7,12000);
  209. BombPlazed=false;}
Advertisement
Add Comment
Please, Sign In to add comment