Es forcevalue

From EventScripts Community Encyclopedia


Overview

Syntax: es_forcevalue <var> <value>

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_xforcevalue

Description

Attempts to vorce the variable to a particular value. Useful primarily for sv_cheats without notification.

Parameters

  • var - The name of the variable to force value upon
  • value - Value you wish to set


Examples

// change cheats without informing people
es_forcevalue sv_cheats 1
es_sexec event_var(userid) noclip
es_forcevalue sv_cheats 0
// take off server password silently
es_xforcevalue sv_password ""
// that would not work with es_forcevalue as the double-quotes would get removed 


Notes

  • Check corelib cheatexec for an example of this command.
  • es_forcevalue will set the sv_cheats variable however client cheats will not work(i.e. r_* cl_* mat_* commands).


See also


blog comments powered by Disqus