This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Sound after a kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DoXe
Junior Member
Join Date: Aug 2005
Location: Sweden!
Old 03-06-2006 , 13:29   Sound after a kill
Reply With Quote #1

Ok, Now its like this, i am making a new hero and it has a strong knife, so i want a sound to play after i kill some one whid my knife!
Its a wav sound and i have put it on:
Code:
public plugin_precache()
{
	precache_sound("jtr/jtr_kill.wav")
}
Like that, but i dont know the rest to do...
__________________
I might be working on something intressting..
DoXe is offline
Belsebub
Senior Member
Join Date: Feb 2005
Location: Sweden
Old 03-06-2006 , 14:51  
Reply With Quote #2

emit_sound
Belsebub is offline
DoXe
Junior Member
Join Date: Aug 2005
Location: Sweden!
Old 03-06-2006 , 16:07  
Reply With Quote #3

Yes, but were to put:
Code:
emit_sound(PlayerID, CHAN_AUTO, "my_sound.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
If i want it to play after i kill some one whid knife?
__________________
I might be working on something intressting..
DoXe is offline
Werewolf
Senior Member
Join Date: Jan 2006
Location: Sweden
Old 03-06-2006 , 17:09  
Reply With Quote #4

Check ultimate_sounds.sma
That's all I can say
Attached Files
File Type: sma Get Plugin or Get Source (ultimate_sound.sma - 766 views - 9.3 KB)
__________________
~~~~~Hawk~~~~~
Werewolf is offline
DoXe
Junior Member
Join Date: Aug 2005
Location: Sweden!
Old 03-07-2006 , 11:23  
Reply With Quote #5

It won't work..
__________________
I might be working on something intressting..
DoXe is offline
Werewolf
Senior Member
Join Date: Jan 2006
Location: Sweden
Old 03-07-2006 , 15:46  
Reply With Quote #6

Hmm... Do you want to play a sound so whole server can hear it or only you?
__________________
~~~~~Hawk~~~~~
Werewolf is offline
yang
Veteran Member
Join Date: May 2005
Location: galoreservers.net
Old 03-07-2006 , 19:16  
Reply With Quote #7

you emit the sound in death event.
__________________
yang is offline
Send a message via AIM to yang
DoXe
Junior Member
Join Date: Aug 2005
Location: Sweden!
Old 03-16-2006 , 13:34  
Reply With Quote #8

i want the whole server to hear the sound, but NOT when i die, when i knife-kill some one
__________________
I might be working on something intressting..
DoXe is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 03-16-2006 , 23:20  
Reply With Quote #9

Read the fourth parameter in the death event, that'll tell you what weapon it is. BTW the fourth parameter is a string, so you'll need to use an array.

Look here for more details.

If the weapon string is "knife" then you emit the sound.
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
guy
Senior Member
Join Date: Apr 2005
Old 03-19-2006 , 10:23  
Reply With Quote #10

Quote:
Originally Posted by DoXe
i want the whole server to hear the sound, but NOT when i die, when i knife-kill some one
Couldn't you just change part of the source code in one of the amx plugins where it does "Humiliation!" when someone gets knifed? You'd have to look around for that though.
__________________
Call it, friendo.
guy 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 22:55.


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