搜索
查看: 1782|回复: 1

[AMXX 带源码] 一个进F后 语音欢迎的插件 大家看看有错误没

[复制链接]
发表于 2009-9-29 23:54:14 | 显示全部楼层 |阅读模式 来自 中国–湖北–武汉

  1. #include <amxmod>
  2. #include <amxmisc>

  3. public JoinSND

  4. new snd[32], s[32]

  5. public plugin_precache(){
  6.         precache_sound( "misc/hello2.wav")
  7.         precache_sound( "misc/goodtoseeyou.wav")
  8.         return PLUGIN_CONTINUE
  9. }


  10. public client_putinserver(id) {
  11.         if(JoinSND || get_cvar_num("amx_join_snden")) set_task(5.0, "play_joinsnd", id)
  12.         return PLUGIN_CONTINUE

  13. }


  14. public play_joinsnd(id)
  15. {
  16.         get_cvar_string("amx_join_sound",s,31)
  17.         format(snd,31,"spk ^"%s^"",s)
  18.         client_cmd(id,snd)

  19. }

  20. public plugin_init() {
  21.         register_plugin("Join Sound","0.2","_KaszpiR_")
  22.         register_cvar("amx_join_sound","misc/hello2 goodtoseeyou") //thanks goes to HerrFlik for givimg me this fantastic .wav file :D
  23.         register_cvar("amx_join_snden","1") //0 disable, 1 enable
  24. }

  25. public plugin_cfg(){
  26. //should add to statscfg menu
  27.   new g_addStast[] = "amx_statscfg add ^"%s^" %s"
  28.   server_cmd(g_addStast,"Join Sound","JoinSND")

  29. }

复制代码
好象太烦琐了  请高手修改下
发表于 2009-10-3 23:17:26 | 显示全部楼层 来自 中国–广东–汕尾
……
这个……我还看不大明白……
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表