Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Releases & Resources
  3. [MP] HUD Killstreak Counter

[MP] HUD Killstreak Counter

Scheduled Pinned Locked Moved BO2 Modding Releases & Resources
6 Posts 4 Posters 2.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined Offline
    undefined Offline
    Resxt Plutonium Staff
    wrote on Nov 13, 2021, 5:19 PM last edited by Resxt Oct 23, 2022, 12:11 PM
    #1

    A simple killstreak counter that displays the player's current kill streak on top of the screen.

    26b278db-d42e-41fa-95d2-53a623b53815-image.png

    All the credits for this script go to Kalitos.
    I just slightly modified and then compiled his IW5 killstreak counter script for T6 and reposted it.

    Download
    Instructions to load the script

    :::

    Source code

    #include maps\mp\gametypes\_hud_util;
    
    Init()
    {
        level thread OnPlayerConnected();
    }
    
    OnPlayerConnected()
    {
        for(;;)
        {
            level waittill("connected", player);
            
            // Don't thread DisplayPlayerKillstreak() on bots
            if (isDefined(player.pers["isBot"]))
            {
                if (player.pers["isBot"])
                {
                    continue; // skip
                }
            }
    
            player thread DisplayPlayerKillstreak();
        }
    }
    
    
    DisplayPlayerKillstreak()
    {
        self endon ("disconnect");
        level endon("game_ended");
    
        self.killstreak_text = createFontString( "DEFAULT" , 1 );
        self.killstreak_text setPoint( 0, "TOP", 0, -25 );
        self.killstreak_text.label = &"^1KILLSTREAK: ";
    
        while(true)
        {
            if(!IsDefined(self.playerstreak) || self.playerstreak != self.pers["cur_kill_streak"])
            {
                self.playerstreak = self.pers["cur_kill_streak"];
                self.killstreak_text setValue(self.pers["cur_kill_streak"]);
            }
    
            wait 0.01;
        }
    }
    

    :::

    undefined 1 Reply Last reply Nov 19, 2021, 10:58 PM
    7
    • undefined Offline
      undefined Offline
      IxColdxI Contributor
      replied to Resxt on Nov 19, 2021, 10:58 PM last edited by
      #2

      @lResxt This is nice. Thank you Monke King!

      1 Reply Last reply
      0
      • undefined Offline
        undefined Offline
        ItsLevel
        wrote on Oct 11, 2022, 7:26 AM last edited by
        #3

        Sorry for necro'ing but does anyone got this still

        undefined 1 Reply Last reply Oct 11, 2022, 4:11 PM
        0
        • undefined Offline
          undefined Offline
          Resxt Plutonium Staff
          replied to ItsLevel on Oct 11, 2022, 4:11 PM last edited by
          #4

          @Embolden sorry I forgot to update my post link after deleting my Google account.
          The topic and the download link are updated

          1 Reply Last reply
          1
          • undefined Offline
            undefined Offline
            FutureRave VIP
            wrote on Jan 19, 2024, 3:24 PM last edited by
            #5

            I think the & is overkill since KILLSTREAK is not a localized string.

            1 Reply Last reply
            0
            • undefined Offline
              undefined Offline
              FutureRave VIP
              wrote on Jan 19, 2024, 3:39 PM last edited by
              #6

              Nevermind, apparently the game goes schizo without &

              1 Reply Last reply
              0

              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Donate