|
楼主 |
发表于 2010-2-2 02:48:15
|
显示全部楼层
来自 中国–广东–广州
4# 点通粉丝
像这代码..一方胜利欢呼声..他是怎强制完完冢下音效的??- //RoundSound.amxx -by PaintLancer
- #include <amxmodx>
- public plugin_init()
- {
- register_cvar("cl_round_end", "1");
- register_plugin("RoundSound","1.1","PaintLancer&Sha!")
- register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
- register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
- }
- public t_win()
- {
- new no_winsound[32]
- new i=1
- while(i<31)
- {
- get_user_info(i, "no_winsound", no_winsound, 31)
- if(!(str_to_num(no_winsound)))
- {
- new rand = random_num(0,4)
- client_cmd(i,"stopsound")
- switch(rand)
- {
- case 0: client_cmd(i,"spk misc/twinnar1")
- case 1: client_cmd(i,"spk misc/twinnar2")
- case 2: client_cmd(i,"spk misc/twinnar3")
- case 3: client_cmd(i,"spk misc/twinnar4")
- case 4: client_cmd(i,"spk misc/twinnar5")
- }
- }
- i=i+1
- }
- return PLUGIN_HANDLED
- }
- public ct_win()
- {
- new no_winsound[32]
- new i=1
- while(i<31)
- {
- get_user_info(i, "no_winsound", no_winsound, 31)
- if(!(str_to_num(no_winsound)))
- {
- new rand = random_num(0,4)
- client_cmd(i,"stopsound")
- switch(rand)
- {
- case 0: client_cmd(i,"spk misc/ctwinnar1")
- case 1: client_cmd(i,"spk misc/ctwinnar2")
- case 2: client_cmd(i,"spk misc/ctwinnar3")
- case 3: client_cmd(i,"spk misc/ctwinnar4")
- case 4: client_cmd(i,"spk misc/ctwinnar5")
- }
- }
- i=i+1
- }
- return PLUGIN_HANDLED
- }
- public plugin_precache()
- {
- precache_sound("misc/ctwinnar1.wav")
- precache_sound("misc/ctwinnar2.wav")
- precache_sound("misc/ctwinnar3.wav")
- precache_sound("misc/ctwinnar4.wav")
- precache_sound("misc/ctwinnar5.wav")
- precache_sound("misc/twinnar1.wav")
- precache_sound("misc/twinnar2.wav")
- precache_sound("misc/twinnar3.wav")
- precache_sound("misc/twinnar4.wav")
- precache_sound("misc/twinnar5.wav")
- return PLUGIN_CONTINUE
- }
复制代码 |
|