能否提供amx_blind插件的源码
能否提供amx_blind插件的源码,在此先谢谢啦......回复: zhangsheng进,能否提供amx_blind插件的源码
http://forum.dt-club.net/thread/71/29455/早就发过了啊都是ATAC里面的功能
回复: zhangsheng进,能否提供amx_blind插件的源码
我不喜欢楼主这样发主题,为什么一定要指明zhangsheng呢,难道别人不可以帮你吗//*
* AMX MOD X
*
* auth:nwb13
* last edit:2004.11.9
*
*/
#include <amxmodx>
#include <amxmisc>
#define MAX_BINDS 10//缁戝畾鎸夐敭鐨勬暟閲?
new bind_key
new bind_cmd
new bind_usage
new g_kNum
public plugin_init() {
register_plugin( "client key bind", "0.31", "nwb13" )
register_clcmd("say /keyhelp","client_help",0,"- displays server help")//鐜╁璇?keyhelp寮€甯姪
new configsDir
get_configsdir(configsDir, 63)
format(configsDir, 63, "%s/key_bind.ini", configsDir)
loadSettings(configsDir)
}
loadSettings(szFilename[]) {
if (!file_exists(szFilename))
return 0
new temp
new a, pos = 0
while ( g_kNum < MAX_BINDS && read_file(szFilename,pos++,temp,255,a) ) {
if ( temp == ';' )
continue
if (parse(temp, bind_key[ g_kNum ] ,15, bind_cmd[ g_kNum ], 31, bind_usage[ g_kNum ],127 )<2)
continue
//server_print("key: %s ;cmd: %s",bind_key,bind_cmd )
++g_kNum
}
server_print(" Load %d key to bind for client.",g_kNum )
return 1
}
public client_putinserver(id){
new ids
ids=id
set_task(5.0,"bind_keys",id,ids,2)
set_task(20.0,"help_note",id,ids,2)
}
public bind_keys(ids[]){
new id = ids
for (new i=0; i<g_kNum; ++i){
client_cmd(id,"bind ^"%s^" ^"%s^"",bind_key,bind_cmd)
//client_print(id,print_chat,"bind ^"%s^" ^"%s^"",bind_key,bind_cmd)
}
}
public help_note(ids[]){
new id =ids
client_print(id,print_chat,"* 鏈嶅姟鍣ㄧ粰浣犵粦瀹氫簡涓€浜涙寜閿? 璇锋寜 Y 杈撳叆 /keyhelp 鏉ユ煡鐪?) //鎻愮ず鐜╁璇?help
}
public client_help(id) {//褰撶帺瀹惰/keyhelp鍚庢樉绀虹殑鍐呭
new pos = 0 ,temp
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>")
pos += format(temp,511-pos,"欢迎来到该服务器, 朋友!^n服务器为了使你玩的方便, 绑定了一些有用的键位, 功能如下:^n")
for (new i=0; i<g_kNum; ++i)
pos += format(temp,511-pos,"按键 %s 为 %s ^n",bind_key,bind_usage)
pos += format(temp,511-pos,"好了! 祝你在游戏里玩得愉快!^n")
format(temp,511-pos,"</pre></body></html>")
show_motd(id,temp,"鏈嶅姟鍣ㄦ寜閿府鍔?)
}
回复: zhangsheng进,能否提供amx_blind插件的源码
谢谢啦,试了一下,可以在AMXX1.0 AMXX1.6编译回复: 能否提供amx_blind插件的源码
严重支持!!!!!!!!!!!!!!!!!!
页:
[1]