Raised This Month: $ Target: $400
 0% 

hear death sounds and other thing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 05-12-2007 , 19:40   hear death sounds and other thing
Reply With Quote #1

1. ok i have these custom death sounds.
when someone gets killed, i want the other people that are still alive near the person when he/she got killed hear the death sound.

how do i do it because im not that familliar with emit sound


2. i have this code frm VEN's sticky nades. Can some one transfer this into fakemeta?
Code:
#include <amxmodx> #include <amxmisc> #include <engine> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" public plugin_init() {  register_plugin(PLUGIN, VERSION, AUTHOR)    register_touch("grenade", "player", "touch_nade") } public touch_nade(nade, id) {  entity_set_edict(nade, EV_ENT_aiment, id)  entity_set_int(nade, EV_INT_movetype, MOVETYPE_FOLLOW)  entity_set_int(nade, EV_INT_sequence, 0)  return PLUGIN_CONTINUE }
__________________


Last edited by flyeni6; 05-12-2007 at 19:53.
flyeni6 is offline
Send a message via AIM to flyeni6
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 05-13-2007 , 11:36   Re: hear death sounds and other thing
Reply With Quote #2

accually never mind about the second request.

i just need help on the first
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 05-13-2007 , 12:54   Re: hear death sounds and other thing
Reply With Quote #3

hmmm...i can make to play the sound only to alive players...but not near!
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 05-13-2007 , 12:56   Re: hear death sounds and other thing
Reply With Quote #4

yea i know how to do that lol.

im just not familiar with emit_sound
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-13-2007 , 17:46   Re: hear death sounds and other thing
Reply With Quote #5

Check this out...maybe it works:
Code:
emit_sound(PlayerID, CHAN_WEAPON, "weapons/grenade_hit3.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
I use this to emit the sound when a nade bounces of the ground...maybe it is possible to let a player emit a sound...
Or maybe create an invisible entity at the position of the dead player. And let this emit the sound!?

only my 2 cent ;)

greetz regalis
__________________
regalis is offline
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 05-13-2007 , 23:40   Re: hear death sounds and other thing
Reply With Quote #6

no what im doing wouldn't be right if an invisble entity was created
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
djmd378
Senior Member
Join Date: Sep 2004
Old 05-14-2007 , 02:02   Re: hear death sounds and other thing
Reply With Quote #7

Try using this
Code:
  emit_sound(id, CHAN_VOICE, "soundpath/soundtoplay.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
__________________
djmd378 is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 05-14-2007 , 05:09   Re: hear death sounds and other thing
Reply With Quote #8

Quote:
Originally Posted by flyeni6 View Post
no what im doing wouldn't be right if an invisble entity was created
Either you would like to emit a sound or not..
If you want to you have to create a entity...
I have coded something for you, you have to adjust the soundfile to your favour:
Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN "DeathSounds"
#define VERSION "0.1"
#define AUTHOR "regalis"


public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR);
    register_cvar(PLUGIN, VERSION, FCVAR_SERVER);
    
    // Events
    register_event("DeathMsg", "hook_death", "a");
}


public plugin_precache()
{
    precache_sound("misc/affn.wav");
}


public hook_death()
{
    //new Killer = read_data(1); //get the first message parameter
    new Victim = read_data(2); //get the second message parameter
    //new headshot = read_data(3); //was this a headshot?
    //new weapon[32];
    //read_data(4, weapon, 31);  //get the weapon name
    
    new origin[3];
    pev(Victim, pev_origin, origin);
    
    new entity = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));
    engfunc(EngFunc_SetOrigin, entity, origin);
    set_pev(entity, pev_classname, "emitter");
    
    emit_sound(entity, CHAN_VOICE, "misc/affn.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
    
    set_task(5.0, "kill_entity", entity+1337);
}


public kill_entity(ent)
{
    new id = ent-1337;
    
    if(!pev_valid(id)) return;
    
    engfunc(EngFunc_RemoveEntity, id);
}
greetz regalis
__________________
regalis is offline
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 05-16-2007 , 21:44   Re: hear death sounds and other thing
Reply With Quote #9

k ill try it out thx
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
mut2nt
Senior Member
Join Date: Oct 2006
Location: in HELL!
Old 06-24-2007 , 05:55   Re: hear death sounds and other thing
Reply With Quote #10

hy 2 all..
I want a sound to be played on the dead guy...after he got killed...
mut2nt is offline
Send a message via Yahoo to mut2nt Send a message via Skype™ to mut2nt
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 22:05.


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