Add persistent Discord URL to T5 and T6 HUDs

This commit is contained in:
2026-10-12 19:42:39 -04:00
parent 664e8da81b
commit eda2c7e76d
8 changed files with 86 additions and 12 deletions
+16 -1
View File
@@ -1,4 +1,4 @@
/* tws_t6_hud.gsc - configurable HUD stack: timers, zombie count, health bar. */
/* tws_t6_hud.gsc - top-left Discord URL, timers, zombie count and health bar. */
#include maps\mp\_utility;
#include common_scripts\utility;
@@ -16,6 +16,21 @@ init()
level thread game_over_watcher();
scripts\zm\tws_t6_common::register_spawn_handler(::hud_start);
scripts\zm\tws_t6_common::register_connect_handler(::hud_discord);
}
// One static label per connection, including newcomers waiting to spawn.
hud_discord()
{
self endon("disconnect");
label = scripts\zm\tws_t6_common::make_text_elem(
self, 10, 10, "left", level.hud_font_small, level.hud_c_label);
label SetText("https://discord.thewrightserver.net");
elems = [];
elems[elems.size] = label;
self thread scripts\zm\tws_t6_common::destroy_on_disconnect(elems);
}
hud_start()