Es.getclientvar

From EventScripts Community Encyclopedia
This article is a stub. Please help by adding to it.



Method: getclientvar

Module: es
Class: (no class)
EventScripts version: 2.0

Method Overview

Table of Contents

Contents


Description

Obtains a network-related console variable for the particular userid This is the Python equivalent of: http://www.eventscripts.com/pages/es_getclientvar

Arguments

  • Userid - Userid of the player
  • VarName - The name of the variable


Examples

def player_activate (event_var):
	cmdrate_var = es.getplayervar (event_var['userid'], "cl_cmdrate")
	if cmdrate_var != "100": # if the clientvar 'cl_cmdrate' is not 100
		es.server.queuecmd ("kickid %s Bad Cmdrate" % event_var['userid'])

Notes

  • Can only obtain network variables from the client. For example: rate, cl_interp, cl_interpolate, cl_cmdrate, cl_updaterate
  • These variables are likely only available at player_activate and later.
  • The most common use for es_getclientvar is to detect bad rate values for players. Some scripts have used es_cexec to force the client to change the values to something the admin feels is more acceptable for the server.
  • You cannot read binds for a player.
  • This command is almost useless for catching cheat programs.


See Also

blog comments powered by Disqus