搜索
查看: 1934|回复: 2

Force CAL Open Settings [fcos] - v2.9错误

[复制链接]
发表于 2008-6-9 16:58:56 | 显示全部楼层 |阅读模式 来自 中国–广东–深圳–福田区
这个错误从2.8版本就存在了.以前我是用的1.76D现在是180
看来和版本不一样.而且显示的这个解释好像和某文件有关!
http://www.dt-club.net/forum/attachment.php?attachmentid=16801&stc=1&d=1213001843
请大家指教!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
发表于 2008-6-9 17:34:06 | 显示全部楼层 来自 中国–福建–龙岩

回复: Force CAL Open Settings [fcos] - v2.9错误

这个问题和http://www.dt-club.net/forum/showthread.php?t=39644一样,关于query_client_cvar函数的使用,看看后面的解释。。
回复

使用道具 举报

 楼主| 发表于 2008-6-12 22:53:01 | 显示全部楼层 来自 中国–广东–深圳–福田区

回复: 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: [test.amxx] Client 1(psychedelic hampster)'s rate is "15000"
回复

使用道具 举报

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

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