Raised This Month: $ Target: $400
 0% 

player low than 50 hp


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Depresie
Veteran Member
Join Date: Nov 2013
Old 06-13-2015 , 17:07   Re: player low than 50 hp
Reply With Quote #2

For zombie plague:
https://forums.alliedmods.net/showpo...75696?p=675696
use search button..

if you write on google "low hp" the first auto suggestion is this plugin >.>

Else:

Code:
#include <amxmod>
#define VOL_NULL   0.0
#define VOL_MID    0.5
#define FLAG_NONE  0
#define PITCH_NONE 0
#define CHAN_HEART CHAN_VOICE
new const g_heartbeat[] = "player/heartbeat1.wav"
new g_pcvarLowHp
public plugin_precache() {
  precache_sound(g_heartbeat)
}
public plugin_init() {
  register_plugin("Low Hp Heart Beat", "0.1", "DokTor")
  g_pcvarLowHp = register_cvar("heartbeat_hp", "25")
  register_event("Damage", "e_Damage", "be", "2>0")
  register_event("DeathMsg", "e_DeathMsg", "a")
}
public e_Damage(id) {
  if( get_user_health(id) > get_cvarptr_num(g_pcvarLowHp) )
    return
  emit_sound(id, CHAN_HEART, g_heartbeat, VOL_NULL, ATTN_NONE, SND_STOP, PITCH_NONE)
  emit_sound(id, CHAN_HEART, g_heartbeat, VOL_MID, ATTN_NORM, FLAG_NONE, PITCH_NORM)
}
public e_DeathMsg() {
  emit_sound(read_data(2), CHAN_HEART, g_heartbeat, VOL_NULL, ATTN_NONE, SND_STOP, PITCH_NONE)
}

Last edited by Depresie; 06-13-2015 at 17:12.
Depresie is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode