From 679b1a0c0194b8dd53a796b525d600a17bd8885a Mon Sep 17 00:00:00 2001 From: Resxt <55228336+Resxt@users.noreply.github.com> Date: Wed, 9 Mar 2022 23:36:34 +0100 Subject: [PATCH] small_scripts 1.1 --- small_scripts/README.md | 6 +++++- small_scripts/change_team_names.gsc | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 small_scripts/change_team_names.gsc diff --git a/small_scripts/README.md b/small_scripts/README.md index 4ceef79..496b8f9 100644 --- a/small_scripts/README.md +++ b/small_scripts/README.md @@ -4,4 +4,8 @@ Simple drag and drop scripts ## display_player_stats.gsc -Display the player's killstreak, total kills and deaths on top of the screen \ No newline at end of file +Display the player's killstreak, total kills and deaths on top of the screen + +## change_team_names.gsc + +Change the team names to custom names depending on the game mode \ No newline at end of file diff --git a/small_scripts/change_team_names.gsc b/small_scripts/change_team_names.gsc new file mode 100644 index 0000000..f57d3cc --- /dev/null +++ b/small_scripts/change_team_names.gsc @@ -0,0 +1,21 @@ +Init() +{ + switch (GetDvar("g_gametype")) + { + case "infect": + ReplaceTeamNames("^1Infected", "^2Survivors"); + break; + case "dm": + ReplaceTeamNames("^1Solo", ""); + break; + default: + ReplaceTeamNames("^1Team #1", "^1Team #2"); + break; + } +} + +ReplaceTeamNames(axis_name, allies_name) +{ + SetDvar("g_TeamName_Axis", axis_name); + SetDvar("g_TeamName_Allies", allies_name); +} \ No newline at end of file