Force CAL Open Settings [fcos] - v2.9错误
这个错误从2.8版本就存在了.以前我是用的1.76D现在是180看来和版本不一样.而且显示的这个解释好像和某文件有关!
http://www.dt-club.net/forum/attachment.php?attachmentid=16801&stc=1&d=1213001843
请大家指教!
回复: Force CAL Open Settings [fcos] - v2.9错误
这个问题和http://www.dt-club.net/forum/showthread.php?t=39644一样,关于query_client_cvar函数的使用,看看后面的解释。。回复: Force CAL Open Settings [fcos] - v2.9错误
在官网找到这段话query_client_cvar
Core (amxmodx.inc) Description
query_client_cvar - Dispatches a client cvar query Syntax
query_client_cvar ( id, const cvar[], const resultFunc[], paramlen=0, const params[] = "" ) Type
Native Notes
* id is a player entid from 1 to 32. Must be connected and may not be a bot
* cvar is the cvar name
* resultFunc is the name of the public function in your plugin that will be called when the response arrives
* paramlen cells from the params array will be passed to the result function as its fourth parameter if paramlen is specified.
The result function has the following form:
public callbackCvarValue(id, const cvar[], const value[])
or, if you use the optional array parameter (paramlen + params):
public callbackCvarValue(id, const cvar[], const value[], const param[])
* id is the player id
* cvar and value are self explaining
The function uses a pretty new engine function (added around Aug 11, 2005). Therefore it may cause a native error on out-of-date servers.
It also uses newdll functions; metamod (at least 1.18) doesn't provide newdll function table hooking for plugins if the mod gamedll doesn't export newdll functions.
This is fixed in metamod-1.18p26 by ghost_of_evilspy (hullu). [ http://sourceforge.net/projects/metamod-p ]
! This function is only available in the CVS at the moment; it will be available in the next official AMX Mod X release.
**********************************
Example plugin:
Log the value of the rate cvar of all connecting users
#include <amxmodx>
public plugin_init()
register_plugin("test", "1", "PM");
}
public client_connect(id)
if (!is_user_bot(id))
query_client_cvar(id, "rate", "cvar_result_func");
}
public cvar_result_func(id, const cvar[], const value[])
new name[32];
get_user_name(id, name, 31);
log_amx("Client %d(%s)'s rate is ^"%s^"", id, name, value);
}
Logged output:
L 09/07/2005 - 11:42:25: Client 1(psychedelic hampster)'s rate is "15000"
页:
[1]