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
- event player_activate
- {
- es_queryclientvar event_var(userid) rate
- es_queryclientvar event_var(userid) cl_updaterate
- es_queryclientvar event_var(userid) cl_cmdrate
- }
-
- event es_player_variable
- {
- if (event_var(status) == "success") do
- {
- if (event_var(variable) == "rate") do
- {
- if (event_var(value) < 5000) then kickid event_var(userid)
- }
- if (event_var(variable) in "cl_updaterate cl_cmdrate") do
- {
- if (event_var(value) > 100) then kickid event_var(userid)
- }
- }
- else echo Variable query for event_var(variable) not successfull. Status of the var: event_var(status)
- }
複製代碼
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 |