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