Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.92 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. }
  29.  
  30. onPlayerConnect()
  31. {
  32. for(;;)
  33. {
  34. level waittill("connected", player);
  35. player thread onPlayerSpawned();
  36. }
  37. }
  38.  
  39. onPlayerSpawned()
  40. {
  41. self endon("disconnect");
  42. level endon("game_ended");
  43. for(;;)
  44. {
  45. self waittill("spawned_player");
  46. if(isDefined(self.playerSpawned))
  47. continue;
  48. self.playerSpawned = true;
  49.  
  50. self freezeControls(false);
  51.  
  52. // Will appear each time when the player spawns, that's just an example.
  53. self IPrintLn("WELCOME_MSG");
  54.  
  55. player thread doSSBillcam();
  56. //Your code goes here...Good Luck!
  57. }
  58. }
  59.  
  60. doSSBillcam()
  61. {
  62. if(self actionslotthreebuttonpressed())
  63. {
  64. Veh_t6_billcam();
  65. }
  66. }
  67.  
  68. Veh_t6_billcam()
  69. {
  70.  
  71. if(self.Veh_t6_Called == 0)
  72. {
  73. self.Veh_t6_Called = 1;
  74. iPrintln("S.S. Billcam called by: ^6" + self.name);
  75. level.Veh_t6_Called = true;
  76. wait 2;
  77. Bus = spawn( "script_model", ( 0, 0, 600 ));
  78. Bus setModel( "veh_t6_air_fa38_killstreak" );
  79. Bus.angles = ( 0, 180, 0 );
  80. Bus MoveTo( self.origin + ( 0, 0, 0 ), 7 );
  81. wait 7.1;
  82.  
  83. self thread monitorBus(self, Bus);
  84. }
  85. else
  86. {
  87. self iPrintlnbold("S.S. Billcam ^1already spawned");
  88. }
  89. }
  90.  
  91. monitorBus(Driver, Buse)
  92. {
  93. self endon("disconnect");
  94. self endon("death");
  95. self endon("wreckBus");
  96. setDvar("cg_thirdPersonRange", "300");
  97. player = Driver;
  98. Bus = Buse;
  99. self.isInBus = false;
  100. for(;;)
  101. {
  102. if(!player.isInBus)
  103. {
  104. if(distance(player.origin, Bus.origin) < 100)
  105. {
  106. player iprintlnbold("Press [{+activate}] to drive the vehicle");
  107. if(player UseButtonPressed())
  108. {
  109. player hide();
  110. player setclientthirdperson(true);
  111. player disableWeapons();
  112. player setPlayerAngles(Bus.angles + (0, 0, 0));
  113. player PlayerlinkTo(Bus);
  114. player.isInBus = true;
  115. }
  116. }
  117. }
  118. else if (player.isInBus)
  119. {
  120. vec = AnglesToForward(self getPlayerAngles());
  121.  
  122. if(player meleeButtonPressed())
  123. {
  124. player show();
  125. player setclientthirdperson(false);
  126. player enableWeapons();
  127. player.isInBus = false;
  128. Bus delete();
  129. player notify("wreckBus");
  130. wait .10;
  131. }
  132. if(player attackButtonPressed())
  133. {
  134. end = (vec[0] * 100, vec[1] * 100, 0);
  135. Bus MoveTo(Bus.origin + end, .5);
  136. }
  137. if(player fragbuttonpressed())
  138. {
  139. height = 0;
  140. height ++;
  141. Bus MoveTo(Bus.origin + (0, 0, height + 100), .5);
  142. }
  143. if(player secondaryoffhandbuttonpressed())
  144. {
  145. height = 0;
  146. height --;
  147. Bus MoveTo(Bus.origin - (0, 0, height - 100), .5);
  148. }
  149. }
  150. else
  151. {
  152.  
  153. }
  154. wait 0.5;
  155. }
  156. wait 0.5;
  157. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement