Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Hey heres a managed code list of GSC Codes from BO2
- Source: http://adf.ly/s3c96
- //Pastebins
- //Spoiler:
- /*
- Weapon List:
- Multiplayer http://adf.ly/s3bzB
- Zombies http://adf.ly/s3c0o
- Model List:
- Models http://adf.ly/s3c1h
- Some Materials and Vehicles
- Materials http://adf.ly/s3c3E
- Vehicles http://adf.ly/s3c4O
- Visions and Turrets:
- Visions http://adf.ly/s3c59
- Turrets http://adf.ly/s3c5t
- Sound and Dvars:
- Dvars http://adf.ly/s3c6J
- Sounds http://adf.ly/s3c6p
- */
- //Button Codes
- //Spoiler:
- //Code:
- if(self sprintbuttonpressed()) self iprintln("SPRINT");
- if(self inventorybuttonpressed()) self iprintln("INVENTORY");
- if(self secondaryoffhandbuttonpressed()) self iprintln("SECONDARY OFFHAND");
- if(self fragbuttonpressed()) self iprintln("FRAG");
- if(self stancebuttonpressed()) self iprintln("STANCE");
- if(self jumpbuttonpressed()) self iprintln("JUMP");
- if(self meleebuttonpressed()) self iprintln("MELEE");
- if(self throwbuttonpressed()) self iprintln("THROW");
- if(self adsbuttonpressed()) self iprintln("ADS");
- if(self actionslotfourbuttonpressed()) self iprintln("ACTION SLOT FOUR");
- if(self actionslotthreebuttonpressed()) self iprintln("ACTION SLOT THREE");
- if(self actionslottwobuttonpressed()) self iprintln("ACTION SLOT TWO");
- if(self actionslotonebuttonpressed()) self iprintln("ACTION SLOT ONE");
- if(self attackbuttonpressed()) self iprintln("ATTACK");
- if(self changeseatbuttonpressed()) self iprintln("CHANGE SEAT");
- if(self usebuttonpressed()) self iprintln("USE");
- //Infinite Ammo
- //Spoiler:
- //Code:
- //Call like
- //self thread unlimited_ammo();
- unlimited_ammo( )
- {
- self endon( "disconnect" );
- self endon( "death" );
- for(;;)
- {
- wait 0.1;
- currentWeapon = self getcurrentweapon();
- if ( currentWeapon != "none" )
- {
- self setweaponammoclip( currentWeapon, weaponclipsize(currentWeapon) );
- self givemaxammo( currentWeapon );
- }
- currentoffhand = self getcurrentoffhand();
- if ( currentoffhand != "none" )
- self givemaxammo( currentoffhand );
- }
- }
- //God Mode
- //Spoiler:
- //Code:
- self enableInvulnerability(); // On
- self disableInvulnerability(); // Off
- //Weapon Assets
- //Spoiler:
- //Code:
- weaponfiretime(weapon);
- weaponreloadtime(weapon);
- isweaponcliponly(weapon);
- isweapondetonationtimed(weapon);
- weaponclipsize(weapon);
- weaponfuellife(weapon);
- weaponissemiauto(weapon);
- weaponisboltaction(weapon);
- weaponisgasweapon(weapon);
- weapontype(weapon);
- weaponclass(weapon);
- weaponmoutable(weapon);
- weaponinventorytype(weapon);
- weaponstartammo(weapon);
- weaponmaxammo(weapon);
- weaponaltweaponname(weapon);
- weaponduelwieldweaponname(weapon);
- weaponisduelwield(weapon);
- getweaponmindamagerange(weapon);
- getweaponmaxdamagerange(weapon);
- getweaponmindamage(weapon);
- getweaponmaxdamage(weapon);
- getweaponfusetime(weapon);
- getweaponexplosionradius(weapon);
- getweaponprojexplosionsound(weapon);
- isweaponspecificuse(weapon);
- isweapondisallowedatmatchstart(weapon);
- isweaponscopeoverlay(weapon);
- isweaponequipment(weapon);
- isweaponprimary(weapon);
- getweaponfiresound(weapon_index);
- getweaponfiresoundplayer(weapon_index);
- getweaponpickupsoundplayer(weapon_index);
- getweaponpickupsound(weapon_index);
- getweaponindexfromname(weapon);
- getweapondisplayname(weapon);
- //Simple Welcome (2 Textlines, 1 Icon)
- //Spoiler:
- //Code:
- WelcomeMessage(text, text1, icon, glow)
- {
- hmb=spawnstruct();
- hmb.titleText=text;
- hmb.notifyText=text1;
- hmb.iconName=icon;
- hmb.glowColor=glow;
- hmb.hideWhenInMenu=true;
- hmb.archived=false;
- self thread maps\mp\gametypes\_hud_message::notifyMessage(hmb);
- }
- //Spawn Weapon Projectile
- //Spoiler:
- //Code:
- <rocket_entity> = MagicBullet( <weaponBulletToSpawn>, <startOrigin>, <endOrigin>, <owner> );
- //Randoms and Math Functions
- //Spoiler:
- //Code:
- randomint(max);
- randomfloat(max);
- randomintrange(min,max);
- randomfloatrange(min,max);
- sin(theta);
- cos(theta);
- tan(theta);
- asin(theta);
- acos(theta);
- atan(theta);
- int(value);// ToInt
- float(value);// ToFloat
- istring(value); //ToString
- min(val1, val2);
- max(val1, val2);
- floor(value);//Round down
- ceil(value); //Round up
- sqrt(value);
- pow(value, exp);
- distance(start, end);
- distance2D(start, end);
- distanceSquared(start, end); //Comparing a^2 to b is much faster than a to sqrt(b)
- distance2DSquared(start, end);
- length(vector);
- lengthSquared(vector);
- closer(start, trueIfCloser, falseIfCloser);
- vectordot(vec1, vec2);
- vectorcross(vec1, vec2);
- vectornormalize(vector);
- //Type Identifiers
- //Spoiler:
- //Code:
- isstring(obj);
- isint(obj);
- isfloat(obj);
- isvec(obj);
- isarray(obj);
- isalive(obj);
- isspawner(obj);
- isplayer(obj);
- isai(obj);
- issentient(obj);
- isvehicle(obj);
- //System Check
- //Spoiler:
- //Code:
- is_ps3();
- is_xenon();
- is_pc();
- is_wiiu();
- //Game Session Settings
- //Spoiler:
- //Code:
- sessionmodeisonlinegame();
- sessionmodeisprivateonlinegame();
- sessionmodeisprivate();
- sessionmodeissystemlink();
- sessionmodeiszombiesgame();
- gamemodeismode(gamemode);
- gamemodeisusingxp();
- gamemodeisusingstats();
- getgametypesetting(setting);
- setgametypesetting(setting, value)
- //Map Change
- //Spoiler:
- //Code:
- map( <mapName>, <boolKeepCurrentSettings> );
- //Map Restart
- //Spoiler:
- //Code:
- map_restart( <boolKeepCurrentSettings> );
- //iPrintln's
- //Spoiler:
- //Code:
- self iprintln("Text");
- self iprintlnbold("Text");
- //Simple Typewriter
- //Spoiler:
- //Code:
- self thread maps\mp\gametypes\_hud_message::hintMessage("Text", floatDuration);
- //Client Codes
- //Spoiler:
- //Code:
- self isthrowinggrenade();
- self forcegrenadethrow();
- self isfiring();
- self ismeleeing();
- self isswitchingweapons();
- self isreloading();
- self takeallweapons();
- self getcurrentweapon();
- self getcurrentweaponaltweapon();
- self isweaponoverheating(<bool_heat>, <weapon_name>);//Both Optional Arguments
- self setweaponoverheating(heatValue, overheatValue, <optional_weapon_name>);
- self getcurrentoffhand();
- self isusingoffhand();
- self hasweapon("weapon_name");
- //Unlock Achievements
- //Spoiler:
- //Code:
- unlockAllCheevos()
- {
- cheevoList = strtok("SP_COMPLETE_ANGOLA,SP_COMPLETE_MONSOON,SP_COMPLETE_AFGHANISTAN,SP_COMPLETE_NICARAGUA,SP_COMPLETE_****STAN,SP_COMPLETE_KARMA,SP_COMPLETE_PANAMA,SP_COMPLETE_YEMEN,SP_COMPLETE_BLACKOUT,SP_COMPLETE_LA,SP_COMPLETE_HAITI,SP_VETERAN_PAST,SP_VETERAN_FUTURE,SP_ONE_CHALLENGE,SP_ALL_CHALLENGES_IN_LEVEL,SP_ALL_CHALLENGES_IN_GAME,SP_RTS_DOCKSIDE,SP_RTS_AFGHANISTAN,SP_RTS_DRONE,SP_RTS_CARRIER,SP_RTS_****STAN,SP_RTS_SOCOTRA,SP_STORY_MASON_LIVES,SP_STORY_HARPER_FACE,SP_STORY_FARID_DUEL,SP_STORY_OBAMA_SURVIVES,SP_STORY_LINK_CIA,SP_STORY_HARPER_LIVES,SP_STORY_MENENDEZ_CAPTURED,SP_MISC_ALL_INTEL,SP_STORY_CHLOE_LIVES,SP_STORY_99PERCENT,SP_MISC_WEAPONS,SP_BACK_TO_FUTURE,SP_MISC_10K_SCORE_ALL,MP_MISC_1,MP_MISC_2,MP_MISC_3,MP_MISC_4,MP_MISC_5,ZM_DONT_FIRE_UNTIL_YOU_SEE,ZM_THE_LIGHTS_OF_THEIR_EYES,ZM_DANCE_ON_MY_GRAVE,ZM_STANDARD_EQUIPMENT_MAY_VARY,ZM_YOU_HAVE_NO_POWER_OVER_ME,ZM_I_DONT_THINK_THEY_EXIST,ZM_FUEL_EFFICIENT,ZM_HAPPY_HOUR,ZM_TRANSIT_SIDEQUEST,ZM_UNDEAD_MANS_PARTY_BUS,ZM_DLC1_HIGHRISE_SIDEQUEST,ZM_DLC1_VERTIGONER,ZM_DLC1_I_SEE_LIVE_PEOPLE,ZM_DLC1_SLIPPERY_WHEN_UNDEAD,ZM_DLC1_FACING_THE_DRAGON,ZM_DLC1_IM_MY_OWN_BEST_FRIEND,ZM_DLC1_MAD_WITHOUT_POWER,ZM_DLC1_POLYARMORY,ZM_DLC1_SHAFTED,ZM_DLC1_MONKEY_SEE_MONKEY_DOOM,ZM_DLC2_PRISON_SIDEQUEST,ZM_DLC2_FEED_THE_BEAST,ZM_DLC2_MAKING_THE_ROUNDS,ZM_DLC2_ACID_DRIP,ZM_DLC2_FULL_LOCKDOWN,ZM_DLC2_A_BURST_OF_FLAVOR,ZM_DLC2_PARANORMAL_PROGRESS,ZM_DLC2_GG_BRIDGE,ZM_DLC2_TRAPPED_IN_TIME,ZM_DLC2_POP_GOES_THE_WEASEL,ZM_DLC3_WHEN_THE_REVOLUTION_COMES,ZM_DLC3_FSIRT_AGAINST_THE_WALL,ZM_DLC3_MAZED_AND_CONFUSED,ZM_DLC3_REVISIONIST_HISTORIAN,ZM_DLC3_AWAKEN_THE_GAZEBO,ZM_DLC3_CANDYGRAM,ZM_DLC3_DEATH_FROM_BELOW,ZM_DLC3_IM_YOUR_HUCKLEBERRY,ZM_DLC3_ECTOPLASMIC_RESIDUE,ZM_DLC3_BURIED_SIDEQUEST", ",");
- foreach(cheevo in cheevoList) {
- self giveachievement(cheevo);
- wait 0.25;
- }
- }
- //Mulitjump
- //Spoiler:
- //onPlayerMultiJump needs to be threaded and change self.numOfMultijumps to 3 or something else and u can jump 3 or more times
- //Spoiler:
- //Second method if first throws errors
- //Spoiler:
- //Get Name
- //Spoiler:
- //Code:
- getName()
- {
- nT=getSubStr(self.name,0,self.name.size);
- for(i=0;i<nT.size;i++)
- {
- if(nT[i]=="]")
- break;
- }
- if(nT.size!=i)
- nT=getSubStr(nT,i+1,nT.size);
- return nT;
- }
- //Suicide Player
- //Spoiler:
- //Code:
- player suicide();
- //Give Weapon
- //Spoiler:
- //Code:
- self giveWeapon( "WEAPON NAME" );
- self switchToWeapon( "WEAPON NAME" );
- //Freeze Controls
- //Spoiler:
- //Code:
- self freezecontrols(true);
- self freezecontrols(false);
- //Forge Mode
- //Spoiler:
- //Code:
- ForgeON()
- {
- if(self.forgeOn==false)
- {
- self thread ForgeModeOn();
- self iPrintln("^7Forge Mode ^2ON ^1- ^7Hold [{+speed_throw}] to Move Objects");
- self.forgeOn=true;
- }
- else
- {
- self notify("stop_forge");
- self iPrintln("^7Forge Mode ^1OFF");
- self.forgeOn=false;
- }
- }
- ForgeModeOn()
- {
- self endon("death");
- self endon("stop_forge");
- for(;;)
- {
- while(self adsbuttonpressed())
- {
- trace=bulletTrace(self GetTagOrigin("j_head"),self GetTagOrigin("j_head")+ anglesToForward(self GetPlayerAngles())* 1000000,true,self);
- while(self adsbuttonpressed())
- {
- trace["entity"] setOrigin(self GetTagOrigin("j_head")+ anglesToForward(self GetPlayerAngles())* 200);
- trace["entity"].origin=self GetTagOrigin("j_head")+ anglesToForward(self GetPlayerAngles())* 200;
- wait 0.05;
- }
- }
- wait 0.05;
- }
- }
- //doHeart FM|T Style
- //Spoiler:
- //Code:
- doHeart()
- {
- if(!isDefined(level.SA))
- {
- level.SA=level createServerFontString("hudbig",2.1);
- level.SA.alignX="right";
- level.SA.horzAlign="right";
- level.SA.vertAlign="middle";
- level.SA.x = 30;
- level.SA setText("Youtube/Gamer2thamax");
- level.SA.archived=false;
- level.SA.hideWhenInMenu=true;
- for(;;)
- {
- level.SA.glowAlpha=1;
- level.SA.glowColor =((randomint(255)/255),(randomint(255)/255),(randomint(255)/255));
- level.SA SetPulseFX(40,2000,600);
- wait 1;
- }
- }
- if(level.doheart==0)
- {
- self iPrintln("Do Heart: On");
- level.doheart=1;
- level.SA.alpha=1;
- }
- else if(level.doheart==1)
- {
- self iPrintln("Do Heart: Off");
- level.SA.alpha=0;
- level.doheart=0;
- }
- }
- //Unfair aimbot with autoaim
- //Spoiler:
- //Code:
- aimBot()
- {
- self endon( "disconnect" );
- self endon( "death" );
- for(;;)
- {
- aimAt = undefined;
- foreach(player in level.players)
- {
- if((player == self) || (!isAlive(player)) || (level.teamBased && self.pers["team"] == player.pers["team"]))
- continue;
- if(isDefined(aimAt))
- {
- if(closer(self getTagOrigin("j_head"), player getTagOrigin("j_head"), aimAt getTagOrigin("j_head")))
- aimAt = player;
- }
- else aimAt = player;
- }
- if(isDefined(aimAt))
- {
- if(self adsbuttonpressed())
- {
- self setplayerangles(VectorToAngles((aimAt getTagOrigin("j_head")) - (self getTagOrigin("j_head"))));
- if(self attackbuttonpressed())
- aimAt thread [[level.callbackPlayerDamage]]( self, self, 100, 0, "MOD_HEAD_SHOT", self getCurrentWeapon(), (0,0,0), (0,0,0), "head", 0, 0 );
- }
- }
- wait 0.01;
- }
- }
- //Earthquake
- //Spoiler:
- //Code:
- Quake()
- {
- self iPrintln("^1Boom Boom Shake The Room!");
- earthquake(0.6,10,self.origin,100000);
- }
- //Spawn with Weapon
- //Spoiler:
- //Code:
- self setSpawnWeapon( "weaponname" );
- //Edit ammo
- //Spoiler:
- //Code:
- self setweaponammoclip( weaponname, amount );
- self setweaponammostock( weaponname, amount );
- //Clear Perks
- //Spoiler:
- //Code:
- self clearperks();
- //EMP/Thermal Vision
- //Spoiler:
- //Code:
- self setempjammed( < state > );
- self setinfraredvision( < state > );
- //Change Model
- //Spoiler:
- //Code:
- self setModel( "model" );
- //Death Types for example for aimbot
- //Spoiler:
- //Code:
- switch( meansofdeath )
- {
- case "MOD_EXPLOSIVE";
- case "MOD_GRENADE";
- case "MOD_GRENADE_SPLASH";
- case "MOD_PROJECTILE_SPLASH";
- case "MOD_SUICIDE";
- case "MOD_PISTOL_BULLET";
- case "MOD_RIFLE_BULLET";
- case "MOD_BURNED";
- case "MOD_GAS";
- case "MOD_HEAD_SHOT;
- case "MOD_MELEE";
- case "MOD_FALLING";
- case "MOD_CRUSH";
- case "MOD_HEAD_SHOT":
- return 1;
- }
- //End game
- //Spoiler:
- //Code:
- endGame()
- {
- level thread maps/mp/gametypes/_globallogic::forceend();
- }
- //Teleport with Computer
- //Spoiler:
- //Code:
- doTeleport()
- {
- self beginLocationSelection( "map_mortar_selector" );
- self.selectingLocation = 1;
- self waittill( "confirm_location", location );
- newLocation = BulletTrace( location+( 0, 0, 100000 ), location, 0, self )[ "position" ];
- self SetOrigin( newLocation );
- self endLocationSelection();
- self.selectingLocation = undefined;
- self iPrintLn("Teleported!");
- }
- //No Clip
- //Spoiler:
- //Code:
- Noclip()
- {
- self endon("stop_noclip");
- self.originObj = spawn( "script_origin", self.origin, 1 );
- self.originObj.angles = self.angles;
- self playerlinkto( self.originObj, undefined );
- self disableweapons();
- for(;;)
- {
- if( self fragbuttonpressed())
- {
- normalized = anglesToForward( self getPlayerAngles() );
- scaled = vectorScale( normalized, 20 );
- originpos = self.origin + scaled;
- self.originObj.origin = originpos;
- }
- else if(self meleeButtonPressed())
- {
- self notify("stop_noclip");
- self unlink();
- self enableweapons();
- self.originObj delete();
- }
- wait .05;
- }
- }
- //Magic Bullet
- //Spoiler:
- //Code:
- MagicBullet()
- {
- self endon("disconnect");
- self endon("death");
- for(;;)
- {
- self waittill("weapon_fired");
- forward = anglestoforward(self getplayerangles());
- start = self geteye();
- end = vectorscale(forward, 9999);
- magicbullet("ai_tank_drone_rocket_mp", start, bullettrace(start, start + end, false, undefined)["position"], self);
- }
- }
- //Set Perks + some perks
- //Spoiler:
- //Code:
- self setperk( "PerkName" );
- specialty_armorpiercing
- specialty_fastweaponswitch
- specialty_fastmantle
- specialty_longersprint
- specialty_movefaster
- //All Clients Max Prestige + Max Level
- //Spoiler:
- //Code:
- maxRank()
- {
- self.pers[ "rank" ] = level.maxrank;
- self.pers[ "prestige" ] = level.maxprestige;
- self setdstat( "playerstatslist", "plevel", "StatValue", level.maxprestige );
- self setdstat( "playerstatslist", "rank", "StatValue", level.maxrank );
- self setrank( level.maxrank, level.maxprestige );
- }
- //For the moment spawn 1
- //Spoiler:
- //Code:
- //SpawnBot("autoassign");
- SpawnBot(team)
- {
- maps/mp/bots/_bot::spawn_bot(team);
- }
- //Display Message (Like MW2 First Player Killed Message On Side)
- //Spoiler:
- //Code:
- //displayMessage("Hello", self);
- displayMessage(message, player)
- {
- level thread maps/mp/_popups::displayteammessagetoall(message, player);
- }
- //Flashing Scoreboard and flash Println's
- //Spoiler:
- //Code:
- FlashFeed()
- {
- self endon("disconnect");
- while(1)
- {
- setDvar("g_TeamColor_Axis","1 0 0 1");
- setDvar("g_TeamColor_Allies","1 0 0 1");
- wait .2;
- setDvar("g_TeamColor_Axis","1 0.7 0 1");
- setDvar("g_TeamColor_Allies","1 0.7 0 1");
- wait .2;
- setDvar("g_TeamColor_Axis","1 1 0 1");
- setDvar("g_TeamColor_Allies","1 1 0 1");
- wait .2;
- setDvar("g_TeamColor_Axis","0 1 0 1");
- setDvar("g_TeamColor_Allies","0 1 0 1");
- wait .2;
- setDvar("g_TeamColor_Axis","0 0 1 1");
- setDvar("g_TeamColor_Allies","0 0 1 1");
- wait .2;
- setDvar("g_TeamColor_Axis","1 0 1 1");
- setDvar("g_TeamColor_Allies","1 0 1 1");
- wait .2;
- setDvar("g_TeamColor_Axis","0 1 1 1");
- setDvar("g_TeamColor_Allies","0 1 1 1");
- wait .1;
- }
- }
- self iPrintln("^8My Text Is Flashing OMG");
- self iPrintlnBold("^8Look At This Flashing Text <3");
- //Clone Player
- //Spoiler:
- //Code:
- self cloneplayer(1);
- //Change Class ingame
- //Spoiler:
- //Code:
- ChangeClass()
- {
- self endon("disconnect");
- self endon("death");
- self maps/mp/gametypes/_globallogic_ui::beginclasschoice();
- for(;;)
- {
- if(self.pers[ "changed_class" ])
- self maps/mp/gametypes/_class::giveloadout( self.team, self.class );
- wait 0.05;
- }
- }
- //Teleport Gun
- //Spoiler:
- //Code:
- ToggleTeleportGun()
- {
- if (self.TPG == true)
- {
- self thread TeleportGun();
- self iPrintln("^7Teleport Gun: ^2ON");
- self.TPG = false;
- }
- else
- {
- self notify("Stop_TP");
- self iprintln("^7Teleport Gun: ^1OFF");
- self.TPG = true;
- }
- }
- TeleportGun()
- {
- self endon( "disconnect" );
- self endon("Stop_TP");
- for(;;)
- {
- self waittill("weapon_fired");
- self setorigin(bullettrace(self gettagorigin("j_head"), self gettagorigin("j_head") + anglesToForward(self getplayerangles()) * 1000000, 0, self)["position"]);
- }
- }
- //Pause Game
- //Spoiler:
- //Code:
- Pause()
- {
- self thread maps\mp\gametypes\_hostmigration::callback_hostmig ration();
- }
- //Anti Quit
- //Spoiler:
- //Code:
- doAntiQuit()
- {
- self endon("disconnect");
- for(;;)
- {
- foreach(player in level.players)
- player maps/mp/gametypes/_globallogic_ui::closemenus();
- wait 0.05;
- }
- }
- //Notify Message
- //Spoiler:
- //Code:
- notifyData = spawnstruct();
- notifyData.titleText = "Text 1";//Line 1
- notifyData.notifyText = "Text 2";//Line 2
- notifyData.notifyText2 = "Text 3";//Line 3
- notifyData.glowColor = (0.3, 0.6, 0.3); //RGB Color array divided by 100
- notifyData.duration = 5; //Change Duration
- notifyData.font = "objective"; //font
- self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
- //Kamikaze Bomber (unsure if it works)
- //Spoiler:
- //Code:
- locationSelector()
- {
- self beginLocationSelection( "map_mortar_selector" );
- self.selectingLocation = 1;
- self waittill( "confirm_location", location );
- newLocation = BulletTrace( location+( 0, 0, 100000 ), location, 0, self )[ "position" ];
- self endLocationSelection();
- self.selectingLocation = undefined;
- return newLocation;
- }
- kamikaze()
- {
- self endon("disconnect");
- self endon("death");
- Location = locationSelector();
- self iPrintlnBold("^3Kamikaze Bomber Inbound");
- Kamikaze = spawn("script_model", self.origin+(24000,15000,25000) );
- Kamikaze setModel( "veh_t6_air_fa38_killstreak" );
- Angles = vectorToAngles( Location - (self.origin+(8000,5000,10000)));
- Kamikaze.angles = Angles;
- Kamikaze moveto(Location, 3.5);
- Kamikaze playsound( "mpl_lightning_flyover_boom" );
- playFxOnTag( level.chopper_fx[ "damage" ][ "light_smoke" ], Kamikaze, "tag_origin" );
- wait 3.6;
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin);
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(400,0,0));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(0,400,0));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(400,400,0));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(0,0,400));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin-(400,0,0));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin-(0,400,0));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin-(400,400,0));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(0,0,800));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(200,0,0));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(0,200,0));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(200,200,0));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(0,0,200));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin-(200,0,0));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin-(0,200,0));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin-(200,200,0));
- playFX(level.chopper_fx["explode"]["large"], Kamikaze.origin+(0,0,200));
- Kamikaze playsound( level.heli_sound[ "crash" ] );
- self RadiusDamage(Kamikaze.origin, 500, 1000, 100, self);
- Kamikaze delete();
- Earthquake( 0.4, 4, Kamikaze.origin, 800 );
- }
- //3rd Person
- //Spoiler:
- //Code:
- ThirdPerson()
- {
- if (self.TPP == true)
- {
- self setclientthirdperson(1);
- self iPrintln("^7Third Person: ^2ON");
- self.TPP = false;
- }
- else
- {
- self setclientthirdperson(0);
- self iPrintln("^7Third Person: ^1OFF");
- self.TPP = true;
- }
- }// 3rd Person
- //Location Selector with Pad
- //Spoiler:
- //Code:
- //self locationSelector();
- locationSelector()
- {
- self beginLocationSelection( "map_mortar_selector" );
- self disableoffhandweapons();
- self giveWeapon( "killstreak_remote_turret_mp" );
- self switchToWeapon( "killstreak_remote_turret_mp" );
- self.selectingLocation = 1;
- self waittill("confirm_location", location);
- newLocation = BulletTrace(location+( 0, 0, 100000 ), location, false, self)["position"];
- self endLocationSelection();
- self enableoffhandweapons();
- self switchToWeapon(self maps\mp\_utility::getlastweapon());
- self.selectingLocation = undefined;
- return newLocation;
- }
- //Jericho Missles
- //Spoiler:
- //Code:
- //self thread initJericho()
- traceBullet()
- {
- return bulletTrace(self getEye(), self getEye()+vectorScale(anglesToForward(self getPlayerAngles()), 1000000), false, self)["position"];
- }
- initJericho()
- {
- level.waypointGreen = loadFX("misc/fx_equip_tac_insert_light_grn");
- level.waypointRed = loadFX("misc/fx_equip_tac_insert_light_red");
- missilesReady = 0;
- numberOfMissiles = 10;
- iPrintln("^5Fire To Select Nodes");
- while(missilesReady != numberOfMissiles)
- {
- self waittill("weapon_fired");
- target = traceBullet();
- mFx = spawnFx(level.waypointGreen, target, (0, 0, 1), (1, 0, 0));
- triggerFx(mFx);
- self thread spawnJerichoMissile(target, mFx);
- missilesReady++;
- }
- iPrintln("^5All Missile Paths Initialized, Fire Your Weapon To Launch");
- self waittill("weapon_fired");
- self notify("launchMissiles");
- }
- spawnJerichoMissile(target, mFx)
- {
- self waittill("launchMissiles");
- mFx delete();
- mFx = spawnFx(level.waypointRed, target, (0, 0, 1), (1, 0, 0));
- triggerFx(mFx);
- location = target+(0, 3500, 5000);
- missile = spawn("script_model", location);
- missile setModel("projectile_sidewinder_missile");
- missile.angles = missile.angles+(90, 90, 90);
- missile.killcament = missile;
- missile rotateto(VectorToAngles(target - missile.origin), 0.01);
- wait 0.01;
- time = 3;
- endLocation = BulletTrace(missile.origin, target, false, self)["position"];
- missile moveto(endLocation, time);
- wait time;
- self playsound("wpn_rocket_explode");
- playFx(level.remote_mortar_fx["missileExplode"], missile.origin+(0, 0, 1));
- RadiusDamage(missile.origin, 450, 700, 350, self, "MOD_PROJECTILE_SPLASH", "remote_missile_bomblet_mp");
- missile delete();
- mFx delete();
- }
- //Give all Scorestreaks
- //Spoiler:
- //Code:
- doKillstreaks()
- {
- maps/mp/gametypes/_globallogic_score::_setplayermomentum(self, 9999);
- }
- //Give UAV
- //Spoiler:
- //Code:
- doUAV()
- {
- self setclientuivisibilityflag("g_compassShowEnemies", 1);
- self iPrintLn("UAV ^2Enabled");
- }
- //Max Prestige and Level
- //Spoiler:
- //Code:
- doMaster
- {
- self.pres[ "prestige" ] = self.maxprestige;
- self setdstat( "playerstatslist", "plevel", "StatValue", self.maxprestige );
- self setrank( self.maxprestige );
- self iPrintln("^6Max Prestige Set !")
- }
- doRank
- {
- self.pres[ "rank" ] = self.maxrank;
- self setdstat( "playerstatslist", "rank", "StatValue", self.maxrank );
- self setrank( self.maxrank );
- self iPrintln("^6Level 55 Set")
- }
- //Trade Mark again from FM|T (needs testing)
- //Spoiler:
- //Code:
- doTradeMark()
- {
- self thread doBling();
- }
- doBling()
- {
- self endon("death");
- self thread ChangeColor();
- self.trademark=self CreateFontString("default",1.8);
- self.trademark.alignX="right";
- self.trademark.horzAlign="right";
- self.trademark.vertAlign="middle";
- self.trademark.x=30;
- self.trademark.y=-225;
- self.trademark.alpha=1;
- self.trademark setText("Welcome To My Modded Lobby");
- for(;;)
- {
- self.trademark.fontscale=1.85;
- wait 0.05;
- self.trademark.fontscale=1.9;
- wait 0.05;
- self.trademark.fontscale=1.95;
- wait 0.05;
- self.trademark.fontscale=2.0;
- wait 0.05;
- self.trademark.fontscale=2.05;
- wait 0.05;
- self.trademark.fontscale=2.1;
- wait 0.05;
- self.trademark.fontscale=2.15;
- wait 0.05;
- self.trademark.fontscale=2.2;
- wait 0.05;
- self.trademark.fontscale=2.15;
- wait 0.05;
- self.trademark.fontscale=2.1;
- wait 0.05;
- self.trademark.fontscale=2.05;
- wait 0.05;
- self.trademark.fontscale=2;
- wait 0.05;
- self.trademark.fontscale=1.95;
- wait 0.05;
- self.trademark.fontscale=1.9;
- wait 0.05;
- self.trademark.fontscale=1.85;
- wait 0.05;
- }
- }
- ChangeColor()
- {
- self endon("death");
- for(;;)
- {
- self.trademark FadeOverTime(1);
- self.trademark.color=(1,0,0);
- wait 0.5;
- self.trademark FadeOverTime(1);
- self.trademark.color=(0,1,0);
- wait 0.5;
- self.trademark FadeOverTime(1);
- self.trademark.color=(1,1,0);
- wait 0.5;
- self.trademark FadeOverTime(1);
- self.trademark.color=(0,0,1);
- wait 0.5;
- self.trademark FadeOverTime(1);
- self.trademark.color=(0,1,1);
- wait 0.5;
- self.trademark FadeOverTime(1);
- self.trademark.color=(1,0,1);
- wait 0.5;
- }
- }
- //Strafe Run
- //Spoiler:
- //Code:
- locationSelector()
- {
- self endon("disconnect");
- self endon("death");
- self beginLocationSelection( "map_mortar_selector" );
- self disableoffhandweapons();
- self giveWeapon( "killstreak_remote_turret_mp" );
- self switchToWeapon( "killstreak_remote_turret_mp" );
- self.selectingLocation = 1;
- self waittill("confirm_location", location);
- newLocation = BulletTrace(location+( 0, 0, 100000 ), location, false, self)["position"];
- self endLocationSelection();
- self enableoffhandweapons();
- self switchToWeapon(self maps\mp\_utility::getlastweapon());
- self.selectingLocation = undefined;
- return newLocation;
- }
- initStrafeRun()
- {
- if (!level.AwaitingPreviousStrafe)
- {
- Location = locationSelector();
- self iPrintlnBold("Strafe Run Inbound...");
- level.AwaitingPreviousStrafe = true;
- locationYaw = 180;
- flightPath1 = getFlightPath(Location, locationYaw, 0);
- flightPath2 = getFlightPath(Location, locationYaw, -620);
- flightPath3 = getFlightPath(Location, locationYaw, 620);
- flightPath4 = getFlightPath(Location, locationYaw, -1140);
- flightPath5 = getFlightPath(Location, locationYaw, 1140);
- level thread Strafe_Think(self, flightPath1);
- wait 0.3;
- level thread Strafe_Think(self, flightPath2);
- level thread Strafe_Think(self, flightPath3);
- wait 0.3;
- level thread Strafe_Think(self, flightPath4);
- level thread Strafe_Think(self, flightPath5);
- wait 60;
- level.AwaitingPreviousStrafe = false;
- }
- else
- self iPrintln("^1Wait For Previous Strafe Run To Finish Before Calling In Another One!");
- }
- Strafe_Think(owner, flightPath)
- {
- level endon("game_ended");
- if (!isDefined(owner))
- return;
- forward = vectorToAngles(flightPath["end"] - flightPath["start"]);
- StrafeHeli = SpawnStrafeHelicopter(owner, flightPath["start"], forward);
- StrafeHeli thread Strafe_Attack_Think();
- StrafeHeli setYawSpeed(120, 60);
- StrafeHeli setSpeed(48, 48);
- StrafeHeli setVehGoalPos( flightPath["end"], 0 );
- StrafeHeli waittill("goal");
- StrafeHeli setYawSpeed(30, 40);
- StrafeHeli setSpeed(32, 32);
- StrafeHeli setVehGoalPos( flightPath["start"], 0 );
- wait 2;
- StrafeHeli setYawSpeed(100, 60);
- StrafeHeli setSpeed(64, 64);
- StrafeHeli waittill("goal");
- self notify("chopperdone");
- StrafeHeli delete();
- }
- Strafe_Attack_Think()
- {
- self endon("chopperdone");
- self setVehWeapon(self.defaultweapon);
- for( ;; )
- {
- for (i = 0; i < level.players.size; i++)
- {
- if(CanTargetPlayer(level.players[i]))
- {
- self setturrettargetent(level.players[i]);
- self FireWeapon("tag_flash", level.players[i]);
- }
- }
- wait 0.5;
- }
- }
- SpawnStrafeHelicopter(owner, origin, angles)
- {
- Team = owner.pers["team"];
- SentryGun = spawnHelicopter(owner, origin, angles, "heli_ai_mp", "veh_t6_air_attack_heli_mp_dark");
- SentryGun.team = Team;
- SentryGun.pers["team"] = Team;
- SentryGun.owner = owner;
- SentryGun.currentstate = "ok";
- SentryGun setdamagestage(4);
- SentryGun.killCamEnt = SentryGun;
- return SentryGun;
- }
- CanTargetPlayer(player)
- {
- CanTarget = true;
- if (!IsAlive(player) || player.sessionstate != "playing")
- return false;
- if (Distance(player.origin, self.origin ) > 5000)
- return false;
- if (!isDefined(player.pers["team"]))
- return false;
- if (level.teamBased && player.pers["team"] == self.team)
- return false;
- if (player == self.owner)
- return false;
- if (player.pers["team"] == "spectator")
- return false;
- if (!BulletTracePassed(self getTagOrigin("tag_origin"), player getTagOrigin("j_head"), false, self))
- return false;
- return CanTarget;
- }
- getFlightPath( location, locationYaw, rightOffset )
- {
- location = location * (1, 1, 0);
- initialDirection = (0, locationYaw, 0);
- planeHalfDistance = 12000;
- flightPath = [];
- if (isDefined(rightOffset) && rightOffset != 0)
- location = location + (AnglesToRight(initialDirection ) * rightOffset ) + (0, 0, RandomInt(300));
- startPoint = (location + (AnglesToForward(initialDirection) * (-1 * planeHalfDistance)));
- endPoint = (location + (AnglesToForward(initialDirection) * planeHalfDistance));
- flyheight = 1500;
- if (isDefined(maps/mp/killstreaks/_airsupport::getminimumflyheight()))
- flyheight = maps/mp/killstreaks/_airsupport::getminimumflyheight();
- flightPath["start"] = startPoint + ( 0, 0, flyHeight );
- flightPath["end"] = endPoint + ( 0, 0, flyHeight );
- return flightPath;
- }
- //Explosive Bullets
- //Spoiler:
- //Code:
- doExplosiveBullets()
- {
- self endon( "disconnect" );
- self endon( "death" );
- self endon("Exp Disabled");
- level.remote_mortar_fx[ "missileExplode" ] = loadfx( "weapon/remote_mortar/fx_rmt_mortar_explosion" );
- for(;;)
- {
- self waittill ("weapon_fired");
- forward = self getTagOrigin("j_head");
- end = vectorScale(anglestoforward(self getPlayerAngles()), 1000000);
- ExpLocation = BulletTrace( forward, end, false, self )["position"];
- playfx(level.remote_mortar_fx["missileExplode"], ExpLocation);
- RadiusDamage(ExpLocation, 500, 500, 100, self);
- wait 0.05;
- }
- }
- //GSC Coding Tutorial
- //CoD GSC Script List
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement