Hello everybody,this is time for my new relese
This is taken from my new upcoming mod (InTime), hope you can find it useful!
Bye!
Ah, I forgot to say you, when you take all killstreak you can continue your streak and re-earn them again!
This is taken from my new upcoming mod (InTime), hope you can find it useful!
Bye!
Ah, I forgot to say you, when you take all killstreak you can continue your streak and re-earn them again!
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!