mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-19 12:42:54 +00:00
launchers_weapons_rewards 1.0.3
Add score and time limit configuration
This commit is contained in:
parent
4b8814c744
commit
3c53ebc7ed
@ -14,8 +14,13 @@ Main()
|
|||||||
|
|
||||||
Init()
|
Init()
|
||||||
{
|
{
|
||||||
|
kills_limit = 120; // Override score limit
|
||||||
|
time_limit = 10; // Override time limit
|
||||||
|
|
||||||
level.killstreakSpawnShield = 0; // Disable anti killstreak protection on player spawn
|
level.killstreakSpawnShield = 0; // Disable anti killstreak protection on player spawn
|
||||||
|
|
||||||
|
SetLimits(kills_limit, time_limit); // This is optional
|
||||||
|
|
||||||
level thread OnPlayerConnect();
|
level thread OnPlayerConnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,6 +121,33 @@ WeaponIsValid(weapon)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetLimits(kills_limit, time_limit)
|
||||||
|
{
|
||||||
|
score_multiplier = 0;
|
||||||
|
|
||||||
|
switch (level.gameType)
|
||||||
|
{
|
||||||
|
case "dm":
|
||||||
|
score_multiplier = 50;
|
||||||
|
break;
|
||||||
|
case "war":
|
||||||
|
score_multiplier = 100;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
score_multiplier = 50;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetDvar("scr_" + level.gameType + "_scorelimit", kills_limit * score_multiplier);
|
||||||
|
SetDvar("scorelimit", kills_limit * score_multiplier);
|
||||||
|
|
||||||
|
if (time_limit != undefined)
|
||||||
|
{
|
||||||
|
SetDvar("scr_" + level.gameType + "_timelimit", time_limit);
|
||||||
|
SetDvar("timelimit", time_limit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Allow the AC-130 kills to be counted in player.pers["cur_kill_streak"]
|
// Allow the AC-130 kills to be counted in player.pers["cur_kill_streak"]
|
||||||
WhitelistKillstreaksInKillsCount( weapon )
|
WhitelistKillstreaksInKillsCount( weapon )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user