Raised This Month: $ Target: $400
 0% 

play a sound.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
neogeo
Senior Member
Join Date: Jul 2005
Old 06-30-2008 , 13:07   play a sound.
Reply With Quote #1

hi.
i'm looking for a plugin that :
-play a sound when a player is hited.
-play a sound when a player die.

thanks for your help.
neogeo is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 06-30-2008 , 13:13   Re: play a sound.
Reply With Quote #2

This will play a sound to evryone on the server

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Grim"

#define wavfile "misc/soundname"
#define mp3file "sound/misc/soundname"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("DeathMsg""eDeath""a"
    
register_event("Damage""damage""b""2!0""3=0""4!0")
}

public 
eDeath()
{
    
client_cmd(0"spk %s"wavfile)
    
client_cmd(0"mp3 play %s"mp3file)
}

public 
damage()
{
    
client_cmd(0"spk %s"wavfile)
    
client_cmd(0"mp3 play %s"mp3file)

__________________
I am out of order!
grimvh2 is offline
neogeo
Senior Member
Join Date: Jul 2005
Old 06-30-2008 , 13:20   Re: play a sound.
Reply With Quote #3

Quote:
Originally Posted by grimvh2 View Post
This will play a sound to evryone on the server

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Grim"

#define wavfile "misc/soundname"
#define mp3file "sound/misc/soundname"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("DeathMsg""eDeath""a"
    
register_event("Damage""damage""b""2!0""3=0""4!0")
}

public 
eDeath()
{
    
client_cmd(0"spk %s"wavfile)
    
client_cmd(0"mp3 play %s"mp3file)
}

public 
damage()
{
    
client_cmd(0"spk %s"wavfile)
    
client_cmd(0"mp3 play %s"mp3file)

thanks but is it possible to add different sounds when a player die and when a player is hited ?
neogeo is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-30-2008 , 14:00   Re: play a sound.
Reply With Quote #4

http://www.cs-amx.com/forum/index.ph...html#msg111104
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
neogeo
Senior Member
Join Date: Jul 2005
Old 06-30-2008 , 14:04   Re: play a sound.
Reply With Quote #5

Quote:
Originally Posted by connorr View Post
merci ,pouvez voir le message que je vous ai laisse. merci
neogeo is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-30-2008 , 14:54   Re: play a sound.
Reply With Quote #6

Sorry ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
neogeo
Senior Member
Join Date: Jul 2005
Old 06-30-2008 , 15:00   Re: play a sound.
Reply With Quote #7

Quote:
Originally Posted by connorr View Post
Sorry ?
is it possible to add differents sounds and to play it randomly ?
thanks.
neogeo 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 19:19.


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