|
- #include <amxmod>
- #include <amxmisc>
- public JoinSND
- new snd[32], s[32]
- public plugin_precache(){
- precache_sound( "misc/hello2.wav")
- precache_sound( "misc/goodtoseeyou.wav")
- return PLUGIN_CONTINUE
- }
- public client_putinserver(id) {
- if(JoinSND || get_cvar_num("amx_join_snden")) set_task(5.0, "play_joinsnd", id)
- return PLUGIN_CONTINUE
- }
- public play_joinsnd(id)
- {
- get_cvar_string("amx_join_sound",s,31)
- format(snd,31,"spk ^"%s^"",s)
- client_cmd(id,snd)
- }
- public plugin_init() {
- register_plugin("Join Sound","0.2","_KaszpiR_")
- register_cvar("amx_join_sound","misc/hello2 goodtoseeyou") //thanks goes to HerrFlik for givimg me this fantastic .wav file :D
- register_cvar("amx_join_snden","1") //0 disable, 1 enable
- }
- public plugin_cfg(){
- //should add to statscfg menu
- new g_addStast[] = "amx_statscfg add ^"%s^" %s"
- server_cmd(g_addStast,"Join Sound","JoinSND")
- }
复制代码 好象太烦琐了 请高手修改下 |
|