seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy"\r
seta cl_announcer default "name of the announcer you wish to use from data/sound/announcer"\r
\r
+seta cl_helper 1 "enable helper system"\r
+seta cl_helper_voice default "name of the helper you wish to use from data/sound/helper"\r
+seta cl_helper_pause 2 "number of seconds that must pass before the helper system can be triggered again"\r
+seta cl_helper_health_value 25 "the helper will warn you when going below this amount of health"\r
+\r
seta cl_eventchase_death 1 "camera goes into 3rd person mode when the player is dead"\r
seta cl_eventchase_distance 140 "final camera distance"\r
seta cl_eventchase_speed 1.3 "how fast the camera slides back, 0 is instant"\r
float volume_modify_1, volume_modify_2, volume_modify_default_1, volume_modify_default_2;\r
float volume_modify_changed_1, volume_modify_changed_2;\r
float eventchase_current_distance;\r
+float helper_pause, helper_health;\r
vector myhealth_gentlergb;\r
vector liquidcolor_prev;\r
vector damage_blurpostprocess, content_blurpostprocess;\r
if not(spectatee_status && last_spectatee != spectatee_status) // not if we switched players and that detects a different health\r
respawned = TRUE; // stays true for one frame\r
\r
+ // helper system\r
+ if(cvar("cl_helper"))\r
+ if(helper_pause <= time)\r
+ {\r
+ if(getstati(STAT_HEALTH) <= cvar("cl_helper_health_value"))\r
+ {\r
+ if(!helper_health)\r
+ {\r
+ sound(self, CHAN_VOICE, strcat("helper/", cvar_string("cl_helper_voice"), "/health_low.wav"), VOL_BASEVOICE, ATTN_NONE);\r
+ helper_health = TRUE;\r
+ helper_pause = time + cvar("cl_helper_pause");\r
+ }\r
+ }\r
+ else if(helper_health)\r
+ helper_health = FALSE;\r
+ }\r
+\r
// event chase camera\r
if(cvar("chase_active") <= 0) // greater than 0 means it's enabled manually, and this code is skipped\r
{\r
\r
precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/lastsecond.wav"));\r
precache_sound (strcat("announcer/", cvar_string("cl_announcer"), "/narrowly.wav"));\r
+\r
+ precache_sound (strcat("helper/", cvar_string("cl_helper_voice"), "/health_low.wav"));\r
}\r
\r
void AuditLists()\r