搜索
查看: 1925|回复: 4

能否提供amx_blind插件的源码

[复制链接]
发表于 2006-8-29 14:32:13 | 显示全部楼层 |阅读模式 来自 中国–上海–上海–松江区
能否提供amx_blind插件的源码,在此先谢谢啦......
发表于 2006-8-29 14:38:41 | 显示全部楼层 来自 中国–云南–西双版纳傣族自治州–景洪市

回复: zhangsheng进,能否提供amx_blind插件的源码

http://forum.dt-club.net/thread/71/29455/
早就发过了啊都是ATAC里面的功能
回复

使用道具 举报

发表于 2006-8-29 14:40:20 | 显示全部楼层 来自 中国–广东–深圳

回复: zhangsheng进,能否提供amx_blind插件的源码

我不喜欢楼主这样发主题,为什么一定要指明zhangsheng呢,难道别人不可以帮你吗/

  1. /*
  2. *        AMX MOD X
  3. *
  4. *        auth:nwb13
  5. *        last edit:2004.11.9
  6. *
  7. */


  8. #include <amxmodx>
  9. #include <amxmisc>


  10. #define MAX_BINDS 10  //缁戝畾鎸夐敭鐨勬暟閲?

  11. new bind_key[MAX_BINDS][16]
  12. new bind_cmd[MAX_BINDS][32]
  13. new bind_usage[MAX_BINDS][128]
  14. new g_kNum

  15. public plugin_init() {
  16.         register_plugin( "client key bind", "0.31", "nwb13" )
  17.         register_clcmd("say /keyhelp","client_help",0,"- displays server help")  //鐜╁璇?keyhelp寮€甯姪
  18.         new configsDir[64]
  19.         get_configsdir(configsDir, 63)
  20.         format(configsDir, 63, "%s/key_bind.ini", configsDir)
  21.         loadSettings(configsDir)
  22. }

  23. loadSettings(szFilename[]) {
  24.         if (!file_exists(szFilename))
  25.                 return 0
  26.         new temp[256]
  27.         new a, pos = 0

  28.         while ( g_kNum < MAX_BINDS && read_file(szFilename,pos++,temp,255,a) ) {         
  29.         if ( temp[0] == ';' )
  30.                 continue
  31.         if (parse(temp, bind_key[ g_kNum ] ,15, bind_cmd[ g_kNum ], 31, bind_usage[ g_kNum ],127 )<2)
  32.                 continue
  33.         //server_print("key: %s ;cmd: %s",bind_key[g_kNum],bind_cmd[g_kNum] )
  34.         ++g_kNum
  35.         }
  36.         server_print("[AMXX] Load %d key to bind for client.",g_kNum )
  37.         return 1
  38. }

  39. public client_putinserver(id){
  40.            new ids[2]
  41.            ids[0]=id
  42.            set_task(5.0,"bind_keys",id,ids,2)
  43.         set_task(20.0,"help_note",id,ids,2)
  44. }

  45. public bind_keys(ids[]){
  46.         new id = ids[0]
  47.         for (new i=0; i<g_kNum; ++i){
  48.                     client_cmd(id,"bind ^"%s^" ^"%s^"",bind_key[i],bind_cmd[i])
  49.                     //client_print(id,print_chat,"bind ^"%s^" ^"%s^"",bind_key[i],bind_cmd[i])
  50.            }
  51. }

  52. public help_note(ids[]){
  53.         new id =ids[0]
  54.         client_print(id,print_chat,"* 鏈嶅姟鍣ㄧ粰浣犵粦瀹氫簡涓€浜涙寜閿? 璇锋寜 Y 杈撳叆 /keyhelp 鏉ユ煡鐪?)         //鎻愮ず鐜╁璇?help
  55. }

  56. public client_help(id) {  //褰撶帺瀹惰/keyhelp鍚庢樉绀虹殑鍐呭
  57.         new pos = 0 ,temp[512]
  58.           pos = format(temp,511,"<html><head><style type=^"text/css^">pre{color:#FFB000;}body{background:#000000;margin-left:8px;margin-top:0px;}</style></head><pre><body>")
  59.         pos += format(temp[pos],511-pos,"欢迎来到该服务器, 朋友!^n服务器为了使你玩的方便, 绑定了一些有用的键位, 功能如下:^n")
  60.         for (new i=0; i<g_kNum; ++i)
  61.                   pos += format(temp[pos],511-pos,"按键 %s 为 %s ^n",bind_key[i],bind_usage[i])
  62.         pos += format(temp[pos],511-pos,"好了! 祝你在游戏里玩得愉快!^n")
  63.           format(temp[pos],511-pos,"</pre></body></html>")
  64.         show_motd(id,temp,"鏈嶅姟鍣ㄦ寜閿府鍔?)
  65. }
复制代码
回复

使用道具 举报

 楼主| 发表于 2006-8-29 14:51:18 | 显示全部楼层 来自 中国–上海–上海–松江区

回复: zhangsheng进,能否提供amx_blind插件的源码

谢谢啦,试了一下,可以在AMXX1.0 AMXX1.6编译
回复

使用道具 举报

发表于 2006-8-29 17:17:04 | 显示全部楼层 来自 日本

回复: 能否提供amx_blind插件的源码

严重支持!!!!!!!!!!!!!!!!!!
回复

使用道具 举报

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

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