Es.forcevalue

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



Method: forcevalue

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

Method Overview

Table of Contents

Contents


Description

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

This is the Python equivalent of: http://www.eventscripts.com/pages/es_forcevalue

Arguments

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


Examples

This Ends the current map by forcing the timelimit to be very low, then afterwards ending the round

    es.forcevalue("mp_timelimit",1)
    es.server.queuecmd("endround")

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