Add persistent Discord URL to T5 and T6 HUDs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* tws_t5_hud.gsc — bottom-left HUD stack. Timer / zombie count / health bar. */
|
||||
/* tws_t5_hud.gsc — top-left Discord URL, timers, zombie count and health bar. */
|
||||
|
||||
#include maps\_utility;
|
||||
#include common_scripts\utility;
|
||||
@@ -14,6 +14,21 @@ init()
|
||||
level thread game_over_watcher();
|
||||
|
||||
scripts\sp\tws_t5_common::register_spawn_handler(::hud_start);
|
||||
scripts\sp\tws_t5_common::register_connect_handler(::hud_discord);
|
||||
}
|
||||
|
||||
// One static label per connection, including newcomers waiting to spawn.
|
||||
hud_discord()
|
||||
{
|
||||
self endon("disconnect");
|
||||
|
||||
label = scripts\sp\tws_t5_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\sp\tws_t5_common::destroy_on_disconnect(elems);
|
||||
}
|
||||
|
||||
hud_start()
|
||||
|
||||
Reference in New Issue
Block a user