Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.21 KB | None | 0 0
  1. /*
  2. * Infinity Loader :: Created By AgreedBog381 && SyGnUs Legends
  3. *
  4. * Project : Annex
  5. * Author : Lrukzy
  6. * Game : MW2
  7. * Description : Starts Multiplayer code execution!
  8. * Date : 10/22/2019 7:49:06 PM
  9. *
  10. */
  11.  
  12. //All MP files are supported, if something doesnt work, let us know!
  13. #include common_scripts\utility;
  14. #include maps\mp\_utility;
  15. #include maps\mp\gametypes\_hud_util;
  16.  
  17. //Preprocessor Global Chaining
  18. #define WELCOME_MSG = BASE_MSG + GREEN + PROJECT_TITLE;
  19.  
  20. //Preprocessor Globals
  21. #define GREEN = "^2";
  22. #define BASE_MSG = "Infinity Loader | Project: ";
  23. #define PROJECT_TITLE = "Annex";
  24.  
  25. init()
  26. {
  27. level thread onPlayerConnect();
  28. precacheModel("vehicle_av8b_harrier_jet_mp");
  29. }
  30.  
  31. onPlayerConnect()
  32. {
  33. for(;;)
  34. {
  35. level waittill("connected", player);
  36. player thread onPlayerSpawned();
  37.  
  38. }
  39. }
  40.  
  41. onPlayerSpawned()
  42. {
  43. self endon("disconnect");
  44. level endon("game_ended");
  45. for(;;)
  46. {
  47. self waittill("spawned_player");
  48. if(isDefined(self.playerSpawned))
  49. continue;
  50. self.playerSpawned = true;
  51.  
  52. self freezeControls(false);
  53.  
  54. // Will appear each time when the player spawns, that's just an example.
  55. self IPrintLn("WELCOME_MSG");
  56.  
  57. self thread Veh_t6_billcam();
  58. //Your code goes here...Good Luck!
  59. }
  60. }
  61.  
  62. Veh_t6_billcam()
  63. {
  64.  
  65. if(self.Veh_t6_Called == 0)
  66. {
  67. self.Veh_t6_Called = 1;
  68. iPrintln("S.S. Billcam called by: ^6" + self.name);
  69. level.Veh_t6_Called = true;
  70. wait 2;
  71. Bus = spawn( "script_model", ( 0, 0, 600 ));
  72. Bus setModel( "vehicle_av8b_harrier_jet_mp" );
  73. Bus.angles = ( 0, 0, 0 );
  74. Bus MoveTo( self.origin + ( 0, 0, 0 ), 7 );
  75. wait 7.1;
  76.  
  77. self thread monitorBus(self, Bus);
  78. }
  79. else
  80. {
  81. self iPrintlnbold("S.S. Billcam ^1already spawned");
  82. }
  83. }
  84.  
  85. monitorBus(Driver, Buse)
  86. {
  87. self endon("disconnect");
  88. self endon("death");
  89. self endon("wreckBus");
  90. player = Driver;
  91. Bus = Buse;
  92. self.isInBus = false;
  93. for(;;)
  94. {
  95. if(!player.isInBus)
  96. {
  97. if(distance(player.origin, Bus.origin) < 100)
  98. {
  99. player iprintlnbold("Press [{+activate}] to drive the vehicle");
  100. if(player UseButtonPressed())
  101. {
  102. player hide();
  103. player disableWeapons();
  104. player setPlayerAngles(Bus.angles + (0, 0, 0));
  105. player PlayerlinkTo(Bus);
  106. player.isInBus = true;
  107. }
  108. }
  109. }
  110. else if (player.isInBus)
  111. {
  112. vec = AnglesToForward(self getPlayerAngles());
  113.  
  114. if(player meleeButtonPressed())
  115. {
  116. player show();
  117. player enableWeapons();
  118. player.isInBus = false;
  119. player thread platform();
  120. Bus delete();
  121. player notify("wreckBus");
  122. wait .10;
  123. }
  124. if(player attackButtonPressed())
  125. {
  126. end = (vec[0] * 100, vec[1] * 100, 0);
  127. Bus MoveTo(Bus.origin + end, .5);
  128. }
  129. if(player fragbuttonpressed())
  130. {
  131. height = 0;
  132. height ++;
  133. Bus MoveTo(Bus.origin + (0, 0, height + 100), .5);
  134. }
  135. if(player secondaryoffhandbuttonpressed())
  136. {
  137. height = 0;
  138. height --;
  139. Bus MoveTo(Bus.origin - (0, 0, height - 100), .5);
  140. }
  141. }
  142. else
  143. {
  144.  
  145. }
  146. wait 0.5;
  147. }
  148. wait 0.5;
  149. }
  150.  
  151. platform()
  152. {
  153. self iprintln("^1Platform Spawned");
  154. wait .1;
  155. SC();
  156. }
  157.  
  158. SC(location)
  159. {
  160. crate = spawn("script_model", location);
  161. crate setModel("com_plasticcase_friendly");
  162. crate Solid();
  163. crate CloneBrushmodelToScriptmodel(level.airDropCrateCollision);
  164. }
  165. spawnPlat(location, X, Y, Z)
  166. {
  167. location = self.origin + (0, 0, -20);
  168. for(i=0;i<X;i++)SC(Location+(i*25,0,0));
  169. for(i=0;i<Z;i++)SC(Location+(0,0,i*25));
  170. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement