一个进F后 语音欢迎的插件 大家看看有错误没
#include <amxmod>
#include <amxmisc>
public JoinSND
new snd, s
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")
}
好象太烦琐了请高手修改下 ……
这个……我还看不大明白……
页:
[1]