AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   player low than 50 hp (https://forums.alliedmods.net/showthread.php?t=264301)

Eviatar Mor 06-13-2015 09:59

player low than 50 hp
 
hello,
i need a plugin that when player low then 50hp will be played sound.
tnx

Depresie 06-13-2015 17:07

Re: player low than 50 hp
 
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)
}


ANTICHRISTUS 06-13-2015 17:17

Re: player low than 50 hp
 
Quote:

Originally Posted by Depresie (Post 2307589)
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.

Depresie 06-14-2015 17:25

Re: player low than 50 hp
 
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

ANTICHRISTUS 06-14-2015 18:12

Re: player low than 50 hp
 
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.

Saggyen 06-14-2015 18:19

Re: player low than 50 hp
 
Little help, Thanks.

ANTICHRISTUS 06-14-2015 18:28

Re: player low than 50 hp
 
Quote:

Originally Posted by Saggyen (Post 2307950)
Little help, Thanks.

Quote:

Originally Posted by ANTICHRISTUS (Post 2307952)
STOP spaming other people requests while having correct answers and knowing that you are IN THE WRONG SECTION !!!



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

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