Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Killstreaks HUD list
#1
Big Grin 
Hello everybody,this is time for my new relese Big Grin
This is taken from my new upcoming mod (InTime), hope you can find it useful!
Bye! Nyan Cat

Ah, I forgot to say you, when you take all killstreak you can continue your streak and re-earn them again!
[Image: 34rxhc9.jpg]

Quote:How to use:
Call showKillstreaksList( 145 ) when player connect
and
Call monitorCurStreak( 145 ) when player spawn
Note: 145 is the height position of the list, to get the same position of the screenshot you have to keep 145

Code:
showKillstreaksList( inizio )
{    
    killstreak0 = self getPlayerData( "killstreaks", 0 );
    killstreak1 = self getPlayerData( "killstreaks", 1 );
    killstreak2 = self getPlayerData( "killstreaks", 2 );
    streakShader = "MADE BY Puffiamo | Steam: Puffiamo94";
    self.streakCost0 = "MADE BY Puffiamo | Steam: Puffiamo94";
    self.streakCost1 = "MADE BY Puffiamo | Steam: Puffiamo94";
    self.streakCost2 = "MADE BY Puffiamo | Steam: Puffiamo94";
    
    for(index=0;index<4;index++)
    {
        switch( index )
        {
            case 0:
                    streakShader = maps\mp\killstreaks\_killstreaks::getKillstreakIcon( killstreak0 );
                    self.streakCost0 = maps\mp\killstreaks\_killstreaks::getStreakCost( killstreak0 );
                    if( self _hasperk( "" ) )
                        self.streakCost0--;
                    break;
            case 1:
                    streakShader = maps\mp\killstreaks\_killstreaks::getKillstreakIcon( killstreak1 );
                    self.streakCost1 = maps\mp\killstreaks\_killstreaks::getStreakCost( killstreak1 );
                    if( self _hasperk( "" ) )
                        self.streakCost0--;
                    break;
            case 2:
                    streakShader = maps\mp\killstreaks\_killstreaks::getKillstreakIcon( killstreak2 );
                    self.streakCost2 = maps\mp\killstreaks\_killstreaks::getStreakCost( killstreak2 );
                    if( self _hasperk( "" ) )
                        self.streakCost0--;
                    break;
        }
        self.killstreaks_list[index] = self createFontString( "objective", 2 );
        self.killstreaks_list[index].foreground = false;
        self.killstreaks_list[index].hideWhenInMenu = true;
        self.killstreaks_list[index].fontScale = 0.60;
        self.killstreaks_list[index].font = "hudbig";
        self.killstreaks_list[index].alpha = 1;
        self.killstreaks_list[index].glow = 1;
        self.killstreaks_list[index].glowColor = ( 0, 0, 1 );
        self.killstreaks_list[index].glowAlpha = 1;
        self.killstreaks_list[index].color = ( 1.0, 1.0, 1.0 );
        switch( index )
        {
            case 2:
                    self.killstreaks_list[index] setPoint( "RIGHT", "RIGHT", 0, inizio-(25*2) );
                    self.killstreaks_list[index] setShader( streakShader, 20, 20 );
                    break;
            case 1:
                    self.killstreaks_list[index] setPoint( "RIGHT", "RIGHT", 0, inizio-25 );
                    self.killstreaks_list[index] setShader( streakShader, 20, 20 );
                    break;
            case 0:
                    self.killstreaks_list[index] setPoint( "RIGHT", "RIGHT", 0, inizio );
                    self.killstreaks_list[index] setShader( streakShader, 20, 20 );
                    break;
        }
    }
}

monitorCurStreak( inizio )
{
    self endon( "death" );
    self endon( "disconnect" );
    
    giroCompletato = undefined;
    killstreak0 = self getPlayerData( "killstreaks", 0 );
    killstreak1 = self getPlayerData( "killstreaks", 1 );
    killstreak2 = self getPlayerData( "killstreaks", 2 );
    streakCost0 = self.streakCost0;
    streakCost1 = self.streakCost1;
    streakCost2 = self.streakCost2;
    if( self _hasperk( "specialty_hardline" ) )
    {
        streakCost0--;
        streakCost1--;
        streakCost2--;
    }
    self resetList( inizio, streakCost0 );
    for(;;)
    {
        self waittill( "killed_enemy" );
        if( self.pers["cur_kill_streak"] < streakCost0 )
        {
            self.killstreaks_list[3] setPoint( "RIGHT", "RIGHT", -25, inizio );
            self.killstreaks_list[3] setText( streakCost0-self.pers["cur_kill_streak"] );
        }
        else if( self.pers["cur_kill_streak"] < streakCost1 )
        {
            self.killstreaks_list[3] setPoint( "RIGHT", "RIGHT", -25, inizio-25 );
            self.killstreaks_list[3] setText( streakCost1-self.pers["cur_kill_streak"] );
        }
        else if( self.pers["cur_kill_streak"] < streakCost2 )
        {
            self.killstreaks_list[3] setPoint( "RIGHT", "RIGHT", -25, inizio-(25*2) );
            self.killstreaks_list[3] setText( streakCost2-self.pers["cur_kill_streak"] );
        }
        else if( ( self.pers["cur_kill_streak"] == streakCost2 ) )
        {
            if( !isDefined( giroCompletato ) )
                self resetList( inizio, streakCost0 );
            giroCompletato = 1;
        }
        if( isDefined( giroCompletato ) )
        {
            if( self.pers["cur_kill_streak"] == streakCost0 )
            {
                self maps\mp\killstreaks\_killstreaks::giveKillstreak( killstreak0 );
                self maps\mp\gametypes\_hud_message::killstreakSplashNotify( killstreak0, undefined, "pickup" );
            }
            else if( self.pers["cur_kill_streak"] == streakCost1 )
            {
                self maps\mp\killstreaks\_killstreaks::giveKillstreak( killstreak1 );
                self maps\mp\gametypes\_hud_message::killstreakSplashNotify( killstreak1, undefined, "pickup" );
            }
            else if( self.pers["cur_kill_streak"] == streakCost2 )
            {
                self maps\mp\killstreaks\_killstreaks::giveKillstreak( killstreak2 );
                self maps\mp\gametypes\_hud_message::killstreakSplashNotify( killstreak2, undefined, "pickup" );
                self resetList( inizio, streakCost0 );
            }
        }
    }
}

resetList( inizio, streakCost0 )
{
    self.pers["cur_kill_streak"] = 0;
    self.killstreaks_list[3] setPoint( "RIGHT", "RIGHT", -25, inizio );
    self.killstreaks_list[3] setText( streakCost0-self.pers["cur_kill_streak"] );
}
My Reputation is low, help me with +1 rep if i helped you! Big Grin
Reply

#2
Looks gud!
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#3
gudde! +rep
Reply

#4
Nice, maybe the moving killstreak icons look better, they start like this:

dpad_killstreak_NAME
Reply

#5
looks cool Puffiamo
Black Ops Mods:

RPG(rocket launcher) mod
Get the Specials

Old aliasses:

eliteCVDelite
CVD

Reply

#6
(04-06-2012, 22:05)iAegle Wrote: Looks hud!

FIXED
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
Reply

#7
Como fao isso funcionar no servidor?
How do it work on the server?
Reply

#8
can you do monitorCurStreak( inizio ) without reseting killstreaks?
Reply

#9
An update from @banz I did nothing, I'm just copy pasting what he said on the other forum I "work" for.
banz Wrote:Meh, i was so kind to fix it. Was a pain in the ass for round-based gametypes along with hardline class changes...

Changes:
- fixed bugs in round-based gametypes (resetting variables)
- fixed various issues with hardline perk
- removed the resetting of self.pers["cur_kill_streak"] variable - to keep killstreaks vanilla
- fixed multi-kill bugs
- hidden killstreak icons while perks are shown on spawn
- support for 3 killstreaks set, 2 killstreaks set, 1 killstreak set and 0 killstreaks set (for those players it doesn't show anything, well it did display shit before ;>)


source:
_killstreak.gsc: http://pastebin.com/AJCJNRwW

credits: Puffiamo94, banz for fixing (adding round-based support and bug fixes)

Edit: Bug fix http://pastebin.com/23LCqLf8
Do not take life too seriously. You will never get out of it alive.
[Image: UGPjFJa.jpg]
Reply

#10
(06-13-2013, 06:16)DidUknowiPwn Wrote: An update from @banz I did nothing, I'm just copy pasting what he said on the other forum I "work" for.
banz Wrote:Meh, i was so kind to fix it. Was a pain in the ass for round-based gametypes along with hardline class changes...

Changes:
- fixed bugs in round-based gametypes (resetting variables)
- fixed various issues with hardline perk
- removed the resetting of self.pers["cur_kill_streak"] variable - to keep killstreaks vanilla
- fixed multi-kill bugs
- hidden killstreak icons while perks are shown on spawn
- support for 3 killstreaks set, 2 killstreaks set, 1 killstreak set and 0 killstreaks set (for those players it doesn't show anything, well it did display shit before ;>)


source:
_killstreak.gsc: http://pastebin.com/AJCJNRwW

credits: Puffiamo94, banz for fixing (adding round-based support and bug fixes)

Edit: Bug fix http://pastebin.com/23LCqLf8

I have used this mod for a month on a dedicated server and haven't ever notified these bugs. (xrev)
Also this is still on a server what is 24/7 online without problems. (4x1)
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help Server not in list, but people join 99IRock 8 7,093 07-17-2013, 21:26
Last Post: clacki
  List of models that can be spawned? (Looking for C4 model) akillj 5 4,791 06-27-2013, 13:35
Last Post: Yamato
  [Request] mw3 all map list ( aslo DLC) raminr63 5 14,956 06-18-2013, 19:50
Last Post: mn_acer1
  Where can I find a list of scripting commands that correspond to ingame buttons? akillj 2 3,110 06-03-2013, 10:38
Last Post: Yamato
  [Request] List of all weapon models DidUknowiPwn 3 4,623 04-20-2013, 09:13
Last Post: Dominator56
  [Release] Call of Duty Modern Warfare 3 - Airdrops & Killstreaks d0h! 8 11,731 04-03-2013, 06:54
Last Post: USCR
  [Request] list models box [HARD] Tony. 3 3,684 03-01-2013, 14:59
Last Post: 99IRock
  Help Getting list of player id's koro35 9 6,001 01-06-2013, 21:31
Last Post: koro35
  [Release] Predator Killstreaks Puffiamo 13 14,063 10-28-2012, 15:51
Last Post: Arteq
  Moab and killstreaks Jabbavacca 4 4,554 10-27-2012, 23:40
Last Post: korsika

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.