ConsoleCommand: Difference between revisions
(Added information regarding "cl_protectcvars" and CVARINFO in 3.1.) |
DrinkyBird (talk | contribs) mNo edit summary Tag: Source edit |
||
Line 40: | Line 40: | ||
{{noexamples}} | {{noexamples}} | ||
[[category:ACS | [[category:ACS functions]] |
Revision as of 16:53, 2 July 2022
This article documents a Zandronum-specific ACS feature which may not be supported by ZDoom and its other child ports. |
void ConsoleCommand (str consolecommand)
Usage
ConsoleCommand causes the game server to activate the given console command. This can be used to set mod-specific CVARs and other commands that cannot be executed by pure ACS. Only one command can be executed per function call. If the command is used from a CLIENTSIDE script, the local machine will execute the command.
The following commands cannot be used and will be ignored:
- unbindall
- unbind
- bind
- quit
- exit
- logfile
- alias (including any alias commands)
- screenshot
- dumpmap
- say
- say_team
- sv_banfile
- sv_banexcemptionfile
- sv_adminlistfile
- error
- error_fatal
- crashout
- wait
Aliases and bindings can be managed in a KEYCONF lump.
Notes
As of 3.1, if a user has cl_protectcvars enabled then any changes made to a CVar's value using this function will not be saved permanently and the CVar's original value will be restored upon exiting the game. In addition, it is possible for CVARINFO to redefine any CVars created using the "set" and "archivecvar" CCMDs with this function, so mods don't have to create new names for them anymore. This is also backwards compatible in case an old version of the mod is loaded afterwards.
Examples
This article lists no examples, please add one. |