Raised This Month: $ Target: $400
 0% 

Sound plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
made.tn
BANNED
Join Date: Nov 2011
Old 11-26-2011 , 09:02   Sound plugin
Reply With Quote #1

Quote:
Description:
If you entered the game a sound was played
If the round was start a sound was played
If the round was end a sound was played
PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "play sound"
#define VERSION "1.0"
#define AUTHOR "made.tn"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_logevent("start",2,"1=Round_Start")
    
register_logevent("end",2,"1=Round_End")
    
register_logevent("welcome",2,"1=entered the game")
}

public 
plugin_precache() {
    
precache_sound("csound/roundstr.wav")
    
precache_sound("csound/roundend.wav")
    
precache_sound("csound/welcome.wav")
    return 
PLUGIN_CONTINUE
}

public 
start(id) {
    
set_hudmessage(025500.20, -1.003.01.21.31.4)
    
show_hudmessage(id"::Round start::")
    
client_cmd(0"spk csound/roundstr.wav")
    return 
PLUGIN_CONTINUE
}

public 
end(id) {
    
set_hudmessage(5520000.20, -1.003.01.21.31.4)
    
show_hudmessage(id"::round end::")
    
client_cmd(0"spk csound/roundend.wav")
    return 
PLUGIN_CONTINUE
}

public 
welcome(id) {
    
set_hudmessage(025500.20, -1.003.01.21.31.44)
    
show_hudmessage(id"Hello client!")
    
client_cmd(0"spk csound/welcome.wav")
    return 
PLUGIN_CONTINUE

and thanks
Attached Files
File Type: sma Get Plugin or Get Source (soundround.sma - 552 views - 1.5 KB)
File Type: zip sound.zip (400.4 KB, 68 views)

Last edited by made.tn; 11-26-2011 at 14:10.
made.tn is offline
 


Thread Tools
Display Modes

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 08:33.


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