1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Release Black Ops 2 GSC Managed Code List

Discussion in 'Call of Duty: Black Ops 2 Scripts' started by CabCon, Feb 14, 2016.

  1. VerTical

    VerTical Head Member Donator

    838
    1,128
    243
    Credits:
    2,431
    WoW Nice :wink:
     
    DF_AUS likes this.
  2. chadbell

    chadbell Active Member

    38
    10
    8
    Credits:
    171
    Nice post well handy thank you to all contributors
     
    DF_AUS and CabCon like this.
  3. Sharp Knife

    Sharp Knife C Sharp Programmer Premium Member

    132
    192
    118
    Credits:
    1,047
    Nice Mr.CabCon
     
    CabCon likes this.
  4. zerker24

    zerker24 Developer

    35
    42
    18
    Credits:
    442
    Looks like we could use more scripts.

    Here is the newest edition to my menu. I call it advanced hit markers. Basically the hit marker is red if you shoot an enemy, and green if you shoot a teammate. There is also a killed player message with headshot detection.

    Advanced Hit Markers.
    This script is by: Zerker24
    PHP:
    toggleAdvHit()
    {
       if (!
    isdefined(self.bools["hitmk"]))
           
    self.bools["hitmk"] = false;
     
       if (!
    isdefined(self.crosshairs))
               
    self.crosshairs = [];

       if (!
    isdefined(self.lastHitCount))
           
    self.lastHitCount 0;
     
       foreach (
    player in level.players)
       {
           
    player thread advHitLoop();
       }
       if (
    self.bools["hitmk"] == false)
       {
           
    self.bools["hitmk"] = true;
           
    self iPrintln("Hit MK [^2ON^7]");
       }
       else
       {
           
    self.bools["hitmk"] = false;
           
    self iPrintln("Hit MK [^1OFF^7]");
       }
    }

    advHitLoop()
    {
       
    self endon("disconnect");
       
    level endon("stopHitmk");
       for(;;)
       {
           
    self waittill("damage"damageattackerdirection_vecpointtypemodelnametagnamepartnameweaponname);
           if (
    attacker.bools["hitmk"])
           {
               if (
    self.team == attacker.team)
               {
                   
    attacker thread drawHitMkr((010));
                   if (
    self.health == 0)
                   {
                       if (
    type == "MOD_HEAD_SHOT")
                           
    attacker iPrintlnbold("You Headshot ^2" getPlayerName(self));
                       else
                           
    attacker iPrintlnbold("You Killed ^2" getPlayerName(self));
                   }
               }
               else
               {
                   
    attacker thread drawHitMkr((100));
                   if (
    self.health == 0)
                   {
                       if (
    type == "MOD_HEAD_SHOT")
                           
    attacker iPrintlnbold("You Headshot ^1" getPlayerName(self));
                       else
                           
    attacker iPrintlnbold(" You Killed ^1" getPlayerName(self));
                   }
               }
           }
           
    wait 0.05;
       }
    }

    drawHitMkr(color)
    {
       
    totNum self.crosshairs.size 1;
       
    self.crosshairs[totNum] = CHdrawShader("damage_feedback"0122448color1999);
       
    self.crosshairs[totNumsetPoint"CENTER""CENTER"012 );
       
    self.crosshairs[totNumFadeOverTime(1);
       
    self.crosshairs[totNum].alpha 0;
       
    wait 1;
       
    self.crosshairs[totNumdestroy();
    }

    clearHitMkr()
    {
       
    level endon("stopHitmk");
       for (;;)
       {
           
    wait 3;
           if (
    self.lastHitCount == self.crosshairs.size)
           {
               
    self.crosshairs = [];
               
    self.lastHitCount 0;
           }
       }
    }

    CHdrawShader(shaderxywidthheightcoloralphasort)
    {
       
    hud newClientHudElem(self);
       
    hud.elemtype "icon";
       
    hud.color color;
       
    hud.alpha alpha;
       
    hud.sort sort;
       
    hud.children = [];
       
    hud setParent(level.uiParent);
       
    hud setShader(shaderwidthheight);
       
    hud.x;
       
    hud.y;
       
    hud.archived false;
       return 
    hud;
    }

    Don't forget to pre cache "damage_feedback".
     
    Last edited: Dec 14, 2016
    CabCon, DF_AUS and dorathekiller97 like this.
  5. BLUELOCC

    BLUELOCC New Member

    2
    1
    3
    Credits:
    32
    can someone please help me make a gsc mod menu im such a noob lol
     
  6. CabCon

    CabCon Head Administrator Staff Member

    3,008
    1,807
    263
    Credits:
    57,149
    If you are looking for gsc tutorials or stuff like that, take a look inside this section: Please login or register to view links or downloads!
    If you need help with something, create a thread inside our question section: Please login or register to view links or downloads!
     
  7. legit

    legit Member

    17
    6
    8
    Credits:
    262
     
  8. Falcon!

    Falcon! New Member

    1
    1
    3
    Credits:
    4
    My XP Lobby Script.

    #includes
    This Script is by: @XeFalcon Modz
    PHP:
    #include maps/mp/gametypes/_globallogic;
    #include maps/mp/gametypes/_gamelogic;

    Put On Init().
    This Script is by: @XeFalcon Modz
    PHP:
    level.Colours strTok("34|64|139|135|38|87|135|206|250|255|23|153|0|255|0|101|67|33|0|0|255|255|0|0|255|128|0|153|26|255|0|255|255|255|255|0|0|0|0|255|255|255""|");

    Put on onPlayerSpawned().
    This Script is by: @XeFalcon Modz
    PHP:
    if(isDefined(level.xpLobby))
    self thread StartXPGain();

    Utilities Needed.
    This Script is by: @XeFalcon Modz
    PHP:
    lobbyMsg(stringtimealignrelative)
    {
        if(!
    isDefined(align)) align "CENTER";
        if(!
    isDefined(relative)) relative "TOP";
        if(!
    isDefined(string)) string "Undefined String!";
        
    message level createText("default"2alignrelative00111string, (1,1,1), true);
        if(!
    isDefined(time))
        
    wait 4;
        else 
    wait time;
        
    message destroy();
    }

    divideColor(c1c2c3ignore)
    {
     if(
    isDefined(ignore))
      return (
    c1c2c3);
     return (
    c1 /255c2 /255c3 /255);
    }

    XP Lobby.
    This Script is by: @XeFalcon Modz
    PHP:
    //▀▄▒▄▀ ▒█▀▀█   ▒█░░░ ▒█▀▀▀█ ▒█▀▀█ ▒█▀▀█ ▒█░░▒█
    //░▒█░░ ▒█▄▄█   ▒█░░░ ▒█░░▒█ ▒█▀▀▄ ▒█▀▀▄ ▒█▄▄▄█
    //▄▀▒▀▄ ▒█░░░   ▒█▄▄█ ▒█▄▄▄█ ▒█▄▄█ ▒█▄▄█ ░░▒█░░
    BeginXPlobby()//XP LOBBY TOGGLE.
    {
        if(!
    isDefined(level.BeginxpLobby))
        {
            
    level.BeginxpLobby true;
            
    self iprintln("XP Gain Match - ^2Active");
            
    self thread closeMenu();
            
    self FreezeControlsAllowLookXP(true);
            
    level thread checkforfeit();
            
    self thread XPlobbyTweakable(4true);
            
    self thread XPLobbyStartTimer("XP GAIN MATCH BEGINS IN"10);
            
    self thread InfiniteGameDvarsXP();
            
    wait 10;
            
    self FreezeControlsAllowLookXP(false);
            
    self thread KickAllClientsXP();
            
    self thread LoadXPGain();
            
    wait 3;
            
    self thread XPlobbyTweakable(1false);
            
    self thread NoHateCrimes(true);
            if(!
    isDefined(level.XPLobbyBeginText))
            {
                
    level.XPLobbyBeginText true;
                
    level.XPLobbyText level createServerFontString("hudbig"5);
                
    level.XPLobbyText setPoint("CENTER""TOP"022);
                
    level.XPLobbyText setSafeText("XP Gain Match");
                
    level.XPLobbyText.alpha 1;
                
    level.XPLobbyToggle true;
                for(;;)
                {
                    for(
    0< (level.Colours.size 3); i++)
                    {
                        
    level.XPLobbyText.color dividecolor(int(level.Colours[3*i]), int(level.Colours[(3*i)+1]), int(level.Colours[(3*i)+2]));
                        
    level.XPLobbyText FadeOverTime(1);
                        
    level.XPLobbyText.glowcolor dividecolor(int(level.Colours[3*i]), int(level.Colours[(3*i)+1]), int(level.Colours[(3*i)+2]));
                        
    level.XPLobbyText FadeOverTime(1);
                        
    level.XPLobbyText.GlowAlpha 1;
                        
    wait 1;
                    }
                    
    wait 0.05;
                }
            }
            else if(!
    isDefined(level.XPLobbyToggle))
            {
                
    level.XPLobbyToggle true;
                
    level.XPlobbyText.alpha 1;
            }
        }
        else
        {
            
    level.xpLobby undefined;
            
    level.kacx undefined;
            
    level.BeginxpLobby undefined;
            
    self iprintln("XP Gain Match - ^1Un - Active");
            
    self thread UndoInfiniteGameDvarsXP();
            
    self thread NoHateCrimes(false);
            if(
    isDefined(level.XPLobbyToggle))
            {
                
    level.XPlobbyText.alpha 0;
                
    level.XPLobbyToggle undefined;
                
    level.XPLobbyBeginText undefined;
                
    level.XPLobbyText destroy();
            }
        }
    }
    FreezeControlsAllowLookXP(reply)//FREEZE CONTROLS BUT ALLOW PLAYER TO LOOK DURING COUNTDOWN PERIOD
    {
        foreach(
    player in level.players)
        {
            if(
    reply == true)
                
    player freezecontrolsallowlook(true);
            if(
    reply == false)
                
    player freezecontrolsallowlook(false);
            if(!
    isDefined(reply))
                
    self lobbyMsg("FreezeControlsAllowLookXP() arg not defined!");
        }
    }
    UndoInfiniteGameDvarsXP()//UN-DO INFINITE GAME DVARS.
    {
        
    setDvar("scr_dom_scorelimit"1);
     
    setDvar("scr_sd_numlives"1);
     
    setDvar("scr_war_timelimit"1);
     
    setDvar("scr_game_onlyheadshots"0);
     
    setDvar("scr_war_scorelimit"1);
     
    maps/mp/gametypes/_globallogic_utils::resumetimer();
    }
    InfiniteGameDvarsXP()//INFINITE GAME DVARS.
    {
        
    setDvar("scr_dom_scorelimit"0);
     
    setDvar("scr_sd_numlives"0);
     
    setDvar("scr_war_timelimit"0);
     
    setDvar("scr_game_onlyheadshots"0);
     
    setDvar("scr_war_scorelimit"0);
     
    maps/mp/gametypes/_globallogic_utils::pausetimer();
    }
    XPLobbyStartTimer(stringtime)//XP COUNTDOWN TIMER.
    {
        
    level.preMatchPeriod time;
        
    game["strings"]["match_starting_in"] = string;
        
    thread matchStartTimer();
    }
    NoHateCrimes(reply)//NO KILLING DURING LOBBY.
    {
        
    self endon("disconnect");
        
    self endon("GoodPeople");
      
        for(;;)
        {
            foreach(
    player in level.players)
            {
                if(
    player.verStatus == "None")
                {
                    if(
    reply == true)
                        
    player EnableInvulnerability();
                    
    player takeAllWeapons();
                    if(
    reply == false)
                        
    player DisableInvulnerability();
                    
    player ClassChange();
                        
    self notify("GoodPeople");
                    if(!
    isDefined(reply))
                        
    self lobbyMsg("NoHateCrimes() arg not defined!"1);
                    
    self notify("GoodPeople");
                }
            }
            
    wait 0.05;
        }
    }
    XPlobbyTweakable(valuereply)//LOBBY TWEAKABLES I.E: SPEED.
    {
        
    self endon("disconnect");
        
    self endon("XPLobbyFuntimeOver");
      
        for(;;)
        {
            foreach(
    player in level.players)
            {
                if(
    player.verStatus == "None")
                {
                    if(
    isDefined(value) && reply == true)
                        
    player setmovespeedscale(value);
                    if(
    isDefined(value) && reply == false)
                        
    player setmovespeedscale(value);
                    
    self notify("XPLobbyFuntimeOver");
                    if(!
    isDefined(value) && !isDefined(reply))
                        
    self lobbyMsg("XPlobbyTweakable() arg's not defined!"1);
                    
    self notify("XPLobbyFuntimeOver");
                }
            }
            
    wait 0.05;
        }
    }
    checkforfeit()//CHECK FOR FORFEIT THEN ABORT FORFEIT.
    {
     
    level endon("game_ended");
     
     for(;;)
     {
      if(
    level.gameForfeited)
      {
       
    level.onForfeit false;
       
    level.gameForfeited false;
       
    level notify("abort forfeit");
      }
      
    wait 5;
     }
    }
    KickAllClientsXP()//KICK ALL PLAYERS TO PREPARE FOR XP LOBBY.
    {
        if(!
    isDefined(level.kacx))
        {
            
    level.kacx true;
            foreach(
    player in level.players)
            {
                if(
    player.verStatus == "None")
                {
                    
    kick(player getentitynumber());
                    
    wait .05;
                }
            }
            
    self LobbyMsg("ALL PLAYERS KICKED FROM SESSION"3);
        }
    }
    LoadXPGain()//Begin StartXPGain Thread If Level.xpLobby is defined.
    {
     if(!
    isDefined(level.xpLobby) && self isHost())
     {
          
    level.xpLobby true;
      foreach(
    player in level.players)
       
    player thread StartXPGain();
     }
     else if(
    isDefined(level.xpLobby) && self isHost())
                
    level.xpLobby undefined;
    }
    StartXPGain()//START GIVING XP ON IF STATEMENTS.
    {
     if(
    self.verStatus == "None" && self.pers["prestige"] != level.maxPrestige && self.pers["rank"] != level.maxRank)
     {
      
    self addrankxpvalue("contract"60000);
      
    self iprintlnbold("^160000 xp ^5received!, ^7you will now be kicked, rejoin.");
      
    wait 3.1;
         
    kick(self getentitynumber());
     }
     else if(
    self.verStatus == "None" && self.pers["prestige"] == level.maxPrestige && self.pers["rank"] == level.maxRank)
     {
         
    self iprintlnbold("^5You are already max level, ^1you will now be kicked");
         
    wait 3.1;
         
    kick(self getentitynumber());
     }
    }
     
    Last edited: Jun 22, 2017 at 7:56 PM
    DF_AUS likes this.

Share This Page