mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-05-13 07:54:50 +00:00
scr_killstreak_print
This commit is contained in:
parent
1e8c14a1f2
commit
07558c5d3c
@ -21,6 +21,9 @@
|
|||||||
1 - use Puffiamo's killstreak HUD
|
1 - use Puffiamo's killstreak HUD
|
||||||
2 - use NoFate's MW3 killstreak HUD
|
2 - use NoFate's MW3 killstreak HUD
|
||||||
|
|
||||||
|
- scr_killstreak_print <bool>
|
||||||
|
false - (default) enables the CoD4 (10 Kill Streak!) messages
|
||||||
|
|
||||||
- scr_specialist <bool>
|
- scr_specialist <bool>
|
||||||
false - (default) enable specialist from mw3, a player must only have the nuke selected as their killstreak
|
false - (default) enable specialist from mw3, a player must only have the nuke selected as their killstreak
|
||||||
|
|
||||||
@ -77,6 +80,7 @@ init()
|
|||||||
setDvarIfUninitialized( "scr_maxKillstreakRollover", 10 );
|
setDvarIfUninitialized( "scr_maxKillstreakRollover", 10 );
|
||||||
setDvarIfUninitialized( "scr_killstreakHud", false );
|
setDvarIfUninitialized( "scr_killstreakHud", false );
|
||||||
setDvarIfUninitialized( "scr_killstreak_mod", 0 );
|
setDvarIfUninitialized( "scr_killstreak_mod", 0 );
|
||||||
|
setDvarIfUninitialized( "scr_killstreak_print", false );
|
||||||
|
|
||||||
setDvarIfUninitialized( "scr_specialist", false );
|
setDvarIfUninitialized( "scr_specialist", false );
|
||||||
setDvarIfUninitialized( "scr_specialist_perks1", "specialty_scavenger,specialty_fastreload,specialty_marathon" );
|
setDvarIfUninitialized( "scr_specialist_perks1", "specialty_scavenger,specialty_fastreload,specialty_marathon" );
|
||||||
@ -87,6 +91,7 @@ init()
|
|||||||
level.maxKillstreakRollover = getDvarInt("scr_maxKillstreakRollover");
|
level.maxKillstreakRollover = getDvarInt("scr_maxKillstreakRollover");
|
||||||
level.killstreakHud = getDvarInt("scr_killstreakHud");
|
level.killstreakHud = getDvarInt("scr_killstreakHud");
|
||||||
level.killStreakMod = getDvarInt( "scr_killstreak_mod" );
|
level.killStreakMod = getDvarInt( "scr_killstreak_mod" );
|
||||||
|
level.killstreakPrint = getDvarInt( "scr_killstreak_print" );
|
||||||
|
|
||||||
level.allowSpecialist = getDvarInt( "scr_specialist" );
|
level.allowSpecialist = getDvarInt( "scr_specialist" );
|
||||||
level.specialistPerk1 = getDvar("scr_specialist_perks1");
|
level.specialistPerk1 = getDvar("scr_specialist_perks1");
|
||||||
@ -202,6 +207,9 @@ onPlayerChangeKit()
|
|||||||
|
|
||||||
self startSpecialist();
|
self startSpecialist();
|
||||||
self startKSHud();
|
self startKSHud();
|
||||||
|
|
||||||
|
if (level.killstreakPrint)
|
||||||
|
self thread watchNotifyKSMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1372,25 +1380,64 @@ watchSpecialistOnKill()
|
|||||||
self notify("watchSpecialistOnKill");
|
self notify("watchSpecialistOnKill");
|
||||||
self endon("watchSpecialistOnKill");
|
self endon("watchSpecialistOnKill");
|
||||||
|
|
||||||
lastKs = self.pers["cur_kill_streak"];
|
for (lastKs = self.pers["cur_kill_streak"];;)
|
||||||
for (;;)
|
|
||||||
{
|
{
|
||||||
self waittill( "killed_enemy" );
|
self waittill( "killed_enemy" );
|
||||||
curStreak = self.pers["cur_kill_streak"];
|
|
||||||
|
|
||||||
if (curStreak <= lastKs)
|
for (curStreak = lastKs + 1; curStreak <= self.pers["cur_kill_streak"]; curStreak++)
|
||||||
continue;
|
{
|
||||||
|
if (curStreak % 2 == 1)
|
||||||
|
continue;
|
||||||
|
|
||||||
lastKs = curStreak;
|
self thread maps\mp\gametypes\_rank::giveRankXP( "specialist_bonus", 50 );
|
||||||
|
self thread underScorePopup("Specialist Bonus!", (1, 1, 0.5), 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (curStreak % 2 == 1)
|
lastKs = self.pers["cur_kill_streak"];
|
||||||
continue;
|
|
||||||
|
|
||||||
self thread maps\mp\gametypes\_rank::giveRankXP( "specialist_bonus", 50 );
|
|
||||||
self thread underScorePopup("Specialist Bonus!", (1, 1, 0.5), 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watchNotifyKSMessage()
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
self endon("changed_kit");
|
||||||
|
|
||||||
|
for (lastKs = self.pers["cur_kill_streak"];;)
|
||||||
|
{
|
||||||
|
self waittill( "killed_enemy" );
|
||||||
|
|
||||||
|
for (curStreak = lastKs + 1; curStreak <= self.pers["cur_kill_streak"]; curStreak++)
|
||||||
|
{
|
||||||
|
if (curStreak == 5)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (curStreak % 5 == 1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
self thread streakNotify(curStreak);
|
||||||
|
}
|
||||||
|
|
||||||
|
lastKs = self.pers["cur_kill_streak"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
streakNotify( streakVal )
|
||||||
|
{
|
||||||
|
self endon("disconnect");
|
||||||
|
|
||||||
|
streakVal = streakVal + "";
|
||||||
|
|
||||||
|
wait 0.05;
|
||||||
|
waittillframeend;
|
||||||
|
|
||||||
|
notifyData = spawnStruct();
|
||||||
|
notifyData.titleText = streakVal + " Kill Streak!";
|
||||||
|
|
||||||
|
self maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
|
||||||
|
|
||||||
|
iprintln( self.name + " has a killstreak of " + streakVal + "!" );
|
||||||
|
}
|
||||||
|
|
||||||
underScorePopup(string, hudColor, glowAlpha)
|
underScorePopup(string, hudColor, glowAlpha)
|
||||||
{
|
{
|
||||||
// Display text under the score popup
|
// Display text under the score popup
|
||||||
@ -1439,6 +1486,9 @@ underScorePopup(string, hudColor, glowAlpha)
|
|||||||
|
|
||||||
startKSHud()
|
startKSHud()
|
||||||
{
|
{
|
||||||
|
if (level.hardcoreMode)
|
||||||
|
return;
|
||||||
|
|
||||||
if (level.killstreakHud == 1)
|
if (level.killstreakHud == 1)
|
||||||
self thread initKillstreakHud( 145 );
|
self thread initKillstreakHud( 145 );
|
||||||
else if (level.killstreakHud == 2)
|
else if (level.killstreakHud == 2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user