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

heartbeat


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-21-2008 , 19:22   Re: heartbeat
Reply With Quote #11

Quote:
Originally Posted by spiderbites View Post
where do i put the sound file?
Where do you see one ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
AlexBreems
Member
Join Date: Feb 2008
Old 03-22-2008 , 03:21   Re: heartbeat
Reply With Quote #12

PHP Code:
/* AMX Mod X Plugin

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

*/ 

#include <amxmodx>

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.11""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_STATICg_heartbeat0.00.0SND_STOPPITCH_NORM)
    
client_cmd(id"spk %s"g_heartbeat)
}

public 
e_DeathMsg()
{
    
emit_sound(read_data(2), CHAN_STATICg_heartbeat0.00.0SND_STOPPITCH_NORM)

The updated version of a plugin

spiderbites: The plugin uses a standard sound "cstrike/sounds/player/heartbeat1.wav"
__________________

Last edited by AlexBreems; 03-23-2008 at 06:02. Reason: updated
AlexBreems is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-22-2008 , 05:01   Re: heartbeat
Reply With Quote #13

This is not an update.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
spiderbites
Senior Member
Join Date: Nov 2007
Old 03-22-2008 , 05:31   Re: heartbeat
Reply With Quote #14

Quote:
Originally Posted by AlexBreems View Post
[php]/* AMX Mod X Plugin
spiderbites: The plugin uses a standard sound "cstrike/sounds/player/heartbeat1.wav"
that's strange because my heartbeat1.wav is located in \valve\sound\player\heartbeat1.wav
spiderbites is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 03-22-2008 , 14:04   Re: heartbeat
Reply With Quote #15

This file is located in gcf package.
Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
AlexBreems
Member
Join Date: Feb 2008
Old 03-22-2008 , 16:45   Re: heartbeat
Reply With Quote #16

Quote:
Originally Posted by connorr View Post
This is not an update.
But works more correctly and the sound of your palpitation is not heard by associates

Quote:
that's strange because my heartbeat1.wav is located in \valve\sound\player\heartbeat1.wav
Plugin I use in cs1.6 and you are visible in HL
__________________
AlexBreems is offline
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 03-22-2008 , 17:00   Re: heartbeat
Reply With Quote #17

Quote:
Originally Posted by spiderbites View Post
that's strange because my heartbeat1.wav is located in \valve\sound\player\heartbeat1.wav
There is no heartbeat1.wav in counter strike.gcf but thare is one in the hl.
When you install counter-strike you get the half-life.gcf enyway so you can use that search path.
Attached Files
File Type: zip heartbeat1.zip (3.0 KB, 368 views)
__________________
If one of my plugins become broken, contact me by mail. [email protected]

Last edited by fxfighter; 03-22-2008 at 17:04.
fxfighter is offline
Send a message via MSN to fxfighter
spiderbites
Senior Member
Join Date: Nov 2007
Old 03-24-2008 , 03:10   Re: heartbeat
Reply With Quote #18

Quote:
Originally Posted by connorr View Post
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)


Quote:
Originally Posted by AlexBreems View Post
PHP Code:
/* AMX Mod X Plugin

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

*/ 

#include <amxmodx>

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.11""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_STATICg_heartbeat0.00.0SND_STOPPITCH_NORM)
    
client_cmd(id"spk %s"g_heartbeat)
}

public 
e_DeathMsg()
{
    
emit_sound(read_data(2), CHAN_STATICg_heartbeat0.00.0SND_STOPPITCH_NORM)

The updated version of a plugin

spiderbites: The plugin uses a standard sound "cstrike/sounds/player/heartbeat1.wav"

what's the difference with
connorr's and AlexBreems's ?
spiderbites is offline
AlexBreems
Member
Join Date: Feb 2008
Old 03-24-2008 , 03:14   Re: heartbeat
Reply With Quote #19

Quote:
Originally Posted by spiderbites View Post






what's the difference with
connorr's and AlexBreems's ?
The sound does not vanish in my version also its surrounding players do not hear (It would be strange to hear palpitation of the player nearby, whether not so? )
__________________

Last edited by AlexBreems; 03-24-2008 at 03:18.
AlexBreems is offline
spiderbites
Senior Member
Join Date: Nov 2007
Old 03-24-2008 , 11:52   Re: heartbeat
Reply With Quote #20

ah ok..btw i found a bug..if a player defuse bomb, and if he fails and die in the bomb explosion, the next time he respawns he can hear the heartbeat sound until he dies in that round
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:11.


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