diff --git a/README.md b/README.md index ffce8abb..79bc3346 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,6 @@ ## Change Notes -## HUD -* Current zone displayed on bottom left of screen - ## Players * Unlimited sprint * 100% backwards speed, strafe speed, and sprint strafe speed @@ -22,6 +19,10 @@ * Can shoot when looking at other players * Start with semtex on maps that have semtex +## HUD +* Health bar displayed on bottom left of screen +* Current zone displayed on bottom left of screen + ## Zombies * Health capped at 1 million * Removed walkers in high rounds diff --git a/_zm_reimagined.gsc b/_zm_reimagined.gsc index 386da87e..aa0a33c0 100644 --- a/_zm_reimagined.gsc +++ b/_zm_reimagined.gsc @@ -1,3 +1,4 @@ +#include maps/mp/gametypes_zm/_hud_util; #include maps/mp/zombies/_zm_utility; #include common_scripts/utility; #include maps/mp/_utility; @@ -48,6 +49,7 @@ onplayerspawned() self tomb_give_shovel(); + self thread health_bar_hud(); self thread zone_hud(); self thread on_equipment_placed(); @@ -190,6 +192,27 @@ enable_friendly_fire() setDvar( "g_friendlyfireDist", "0" ); } +health_bar_hud() +{ + self endon("disconnect"); + + flag_wait( "initial_blackscreen_passed" ); + + health_bar = self createprimaryprogressbar(); + health_bar setpoint(undefined, "BOTTOM_LEFT", 65, 17.5); + + health_bar_text = self createprimaryprogressbartext(); + health_bar_text setpoint(undefined, "BOTTOM_LEFT", 65, 5); + + while (1) + { + health_bar updatebar(self.health / self.maxhealth); + health_bar_text settext(self.health); + + wait 0.05; + } +} + zone_hud() { self endon("disconnect");