Raised This Month: $ Target: $400
 0% 

playing a wav


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-24-2006 , 21:17  
Reply With Quote #2

The first thing you want to do is register the event.

Code:
register_event("SendAudio", "fnRoundEnd","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")

Next, you want to precache the sound

Code:
new g_szSound[] = "sound.wav" public plugin_precache()        precache_sound(g_szSound)

Next, you want to play it on the event.

Code:
public fnRoundEnd()        client_cmd(0,"spk %s",g_szSound)

So you have something like this:

Code:
#include <amxmodx> #include <amxmisc> new g_szSound[] = "sound.wav" public plugin_init() {     register_plugin("Endround Sound","1.0","Hawk552")         register_event("SendAudio", "fnRoundEnd","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw") } public plugin_precache()     precache_sound(g_szSound) public fnRoundEnd()     client_cmd(0,"spk %s",g_szSound)
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



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 16:30.


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