Raised This Month: $ Target: $400
 0% 

player low than 50 hp


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Eviatar Mor
Senior Member
Join Date: Jun 2014
Location: israel
Old 06-13-2015 , 09:59   player low than 50 hp
Reply With Quote #1

hello,
i need a plugin that when player low then 50hp will be played sound.
tnx
Eviatar Mor is offline
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
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 06-13-2015 , 17:17   Re: player low than 50 hp
Reply With Quote #3

Quote:
Originally Posted by Depresie View Post
use search button..
Sorry, it's not that easy to find something like this using the search feature, it needs some other clues.
Quote:
if you write on google "low hp" the first auto suggestion is this plugin >.>
Google is rarely efficient in such cases, it's generally useful for massively searched topics, but Yore right, some people do not search at all, it's forbidden in their convictions imo.
__________________
ANTICHRISTUS is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 06-14-2015 , 17:25   Re: player low than 50 hp
Reply With Quote #4

Well, i never use the search function from the forums
I am always using google and i find everything i want every time
If im having difficulties, i just do this, and google will show me results only from the website

Quote:
"name of a thing im searching" site:forums.alliedmods.net

Last edited by Depresie; 06-14-2015 at 17:27.
Depresie is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 06-14-2015 , 18:12   Re: player low than 50 hp
Reply With Quote #5

To use brackets will limit your search result, please read this.

Ps. Tuorial is a bit complicated since the last time I reviewed it, but it's still very useful.
__________________
ANTICHRISTUS is offline
Saggyen
Junior Member
Join Date: Dec 2013
Old 06-14-2015 , 18:19   Re: player low than 50 hp
Reply With Quote #6

Little help, Thanks.
Saggyen is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 06-14-2015 , 18:28   Re: player low than 50 hp
Reply With Quote #7

Quote:
Originally Posted by Saggyen View Post
Little help, Thanks.
Quote:
Originally Posted by ANTICHRISTUS View Post
STOP spaming other people requests while having correct answers and knowing that you are IN THE WRONG SECTION !!!
__________________
ANTICHRISTUS is offline
Reply



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