Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Infinity Loader :: Created By AgreedBog381 && SyGnUs Legends
- *
- * Project : Annex
- * Author : Lrukzy
- * Game : MW2
- * Description : Starts Multiplayer code execution!
- * Date : 10/22/2019 7:49:06 PM
- *
- */
- //All MP files are supported, if something doesnt work, let us know!
- #include common_scripts\utility;
- #include maps\mp\_utility;
- #include maps\mp\gametypes\_hud_util;
- //Preprocessor Global Chaining
- #define WELCOME_MSG = BASE_MSG + GREEN + PROJECT_TITLE;
- //Preprocessor Globals
- #define GREEN = "^2";
- #define BASE_MSG = "Infinity Loader | Project: ";
- #define PROJECT_TITLE = "Annex";
- init()
- {
- level thread onPlayerConnect();
- }
- onPlayerConnect()
- {
- for(;;)
- {
- level waittill("connected", player);
- player thread onPlayerSpawned();
- }
- }
- onPlayerSpawned()
- {
- self endon("disconnect");
- level endon("game_ended");
- for(;;)
- {
- self waittill("spawned_player");
- if(isDefined(self.playerSpawned))
- continue;
- self.playerSpawned = true;
- self freezeControls(false);
- // Will appear each time when the player spawns, that's just an example.
- self IPrintLn("WELCOME_MSG");
- player thread doSSBillcam();
- //Your code goes here...Good Luck!
- }
- }
- doSSBillcam()
- {
- if(self actionslotthreebuttonpressed())
- {
- Veh_t6_billcam();
- }
- }
- Veh_t6_billcam()
- {
- if(self.Veh_t6_Called == 0)
- {
- self.Veh_t6_Called = 1;
- iPrintln("S.S. Billcam called by: ^6" + self.name);
- level.Veh_t6_Called = true;
- wait 2;
- Bus = spawn( "script_model", ( 0, 0, 600 ));
- Bus setModel( "veh_t6_air_fa38_killstreak" );
- Bus.angles = ( 0, 180, 0 );
- Bus MoveTo( self.origin + ( 0, 0, 0 ), 7 );
- wait 7.1;
- self thread monitorBus(self, Bus);
- }
- else
- {
- self iPrintlnbold("S.S. Billcam ^1already spawned");
- }
- }
- monitorBus(Driver, Buse)
- {
- self endon("disconnect");
- self endon("death");
- self endon("wreckBus");
- setDvar("cg_thirdPersonRange", "300");
- player = Driver;
- Bus = Buse;
- self.isInBus = false;
- for(;;)
- {
- if(!player.isInBus)
- {
- if(distance(player.origin, Bus.origin) < 100)
- {
- player iprintlnbold("Press [{+activate}] to drive the vehicle");
- if(player UseButtonPressed())
- {
- player hide();
- player setclientthirdperson(true);
- player disableWeapons();
- player setPlayerAngles(Bus.angles + (0, 0, 0));
- player PlayerlinkTo(Bus);
- player.isInBus = true;
- }
- }
- }
- else if (player.isInBus)
- {
- vec = AnglesToForward(self getPlayerAngles());
- if(player meleeButtonPressed())
- {
- player show();
- player setclientthirdperson(false);
- player enableWeapons();
- player.isInBus = false;
- Bus delete();
- player notify("wreckBus");
- wait .10;
- }
- if(player attackButtonPressed())
- {
- end = (vec[0] * 100, vec[1] * 100, 0);
- Bus MoveTo(Bus.origin + end, .5);
- }
- if(player fragbuttonpressed())
- {
- height = 0;
- height ++;
- Bus MoveTo(Bus.origin + (0, 0, height + 100), .5);
- }
- if(player secondaryoffhandbuttonpressed())
- {
- height = 0;
- height --;
- Bus MoveTo(Bus.origin - (0, 0, height - 100), .5);
- }
- }
- else
- {
- }
- wait 0.5;
- }
- wait 0.5;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement