Raised This Month: $51 Target: $400
 12% 

heartbeat


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
netrider
New Member
Join Date: Feb 2008
Old 02-12-2008 , 23:31   heartbeat
Reply With Quote #1

hello is there a plugin that for example when you have 10 health or less you can hear the heartbeating ? or when getting low on health

thanks
netrider is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 02-13-2008 , 07:12   Re: heartbeat
Reply With Quote #2

im sure there is... did you search first?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 02-21-2008 , 22:44   Re: heartbeat
Reply With Quote #3

My searching result also bring no positive results...

EDIT: Ok, i written this plugin ;)

Last edited by Sn!ff3r; 02-22-2008 at 01:41.
Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
AlexBreems
Member
Join Date: Feb 2008
Old 03-07-2008 , 03:48   Re: heartbeat
Reply With Quote #4

very nice idea!
__________________
AlexBreems is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 03-07-2008 , 14:04   Re: heartbeat
Reply With Quote #5

its made Realism Mod I belive..
Styles is offline
Send a message via AIM to Styles
AlexBreems
Member
Join Date: Feb 2008
Old 03-08-2008 , 03:02   Re: heartbeat
Reply With Quote #6

Quote:
Originally Posted by styles View Post
its made Realism Mod I belive..
no
__________________
AlexBreems is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-08-2008 , 07:28   Re: heartbeat
Reply With Quote #7

Try this
PHP Code:
/* AMX Mod X Plugin

* (c) Copyright 2008, ConnorMcLeod 
* This file is provided as is (no warranties). 

*/ 

#include <amxmodx>

#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""ConnorMcLeod")

    
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_pcvar_num(g_pcvarLowHp) )
        return

    
emit_sound(idCHAN_HEARTg_heartbeatVOL_NULLATTN_NONESND_STOPPITCH_NONE)
    
emit_sound(idCHAN_HEARTg_heartbeatVOL_MIDATTN_NORMFLAG_NONEPITCH_NORM)
}

public 
e_DeathMsg()
{
    
emit_sound(read_data(2), CHAN_HEARTg_heartbeatVOL_NULLATTN_NONESND_STOPPITCH_NONE)

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 03-15-2008 at 08:44.
ConnorMcLeod is offline
AlexBreems
Member
Join Date: Feb 2008
Old 03-09-2008 , 01:59   Re: heartbeat
Reply With Quote #8

Quote:
Originally Posted by connorr View Post
Try this
don't work

When I have replaced CHAN_BODY on CHAN_AUTO it became better, but all the same sometimes the plugin works and sometimes is not present
__________________

Last edited by AlexBreems; 03-13-2008 at 03:02.
AlexBreems is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-15-2008 , 08:42   Re: heartbeat
Reply With Quote #9

Fixed.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
spiderbites
Senior Member
Join Date: Nov 2007
Old 03-21-2008 , 17:38   Re: heartbeat
Reply With Quote #10

where do i put the sound file?
spiderbites 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 23:43.


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