玩樂天堂 pockyland

 找回密碼
 註冊
搜索
熱搜: lego MOC 聚會 比賽
查看: 1952|回復: 0
打印 上一主題 下一主題

客戶端參數處理es_queryclientvar

[複製鏈接]
跳轉到指定樓層
1篇
發表於 2009-6-22 02:10:19 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
Es queryclientvar
From EventScripts Community Encyclopedia
es_queryclientvar is the correct title for this article. The title you see above is incorrect due to technical limitations.
Overview
Syntax: es_queryclientvar <userid> <varname>

Note: Command parameters are described inside the < and >characters. Optional parameters are contained within [ and ]characters.
Variation of this command that doesn't expand variables: es_xqueryclientvar

Description
Submits a query to the userid for the value of the console variablespecified. It will return the result of the query in the eventes_player_variable.

Parameters
userid - userid of the user whose variable you want to query
varname - name of the network-related client-side variable you'd like to query

  1. event player_activate
  2. {
  3.      es_queryclientvar event_var(userid) rate
  4.      es_queryclientvar event_var(userid) cl_updaterate
  5.      es_queryclientvar event_var(userid) cl_cmdrate
  6. }

  7. event es_player_variable
  8. {
  9.   if (event_var(status) == "success") do
  10.   {
  11.        if (event_var(variable) == "rate") do
  12.        {
  13.            if (event_var(value) < 5000) then kickid event_var(userid)
  14.        }
  15.        if (event_var(variable) in "cl_updaterate cl_cmdrate") do
  16.        {
  17.            if (event_var(value) > 100) then kickid event_var(userid)
  18.        }
  19.   }
  20.   else echo Variable query for event_var(variable) not successfull. Status of the var: event_var(status)
  21. }
複製代碼

cl_updaterate或cl_cmdrate超過100就踢



Notes
Can obtain much more than just network variables from the client. Forexample: cl_restrict_server_commands mat_picmip mat_dxlevel
Quite similar to es_getclientvar, but Valve has introduced a new methodfor querying client variables which is used by this command.
These variables are likely only available at player_activate and later.
The most common use for es_queryclientvar is to detect bad rate values for players.
You cannot read binds for a player.
This command is almost useless for catching cheat programs.
Status you can get by the event_var(status) are: success, not found, not variable, protected



See Also
es_getclientvar
Forum search for Es_queryclientvar
<userComments></userComments>

Retrieved from "http://www.eventscripts.com/pages/Es_queryclientvar"

source:
http://www.eventscripts.com/pages/Es_queryclientvar
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

快速回復 返回頂部 返回列表