Es keygroupload

From EventScripts Community Encyclopedia


Overview

Syntax: es_keygroupload <keygroup> [location]

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: {{{x}}}

Description

Loades a keygroup from disk into memory.

Parameters

  • keygroup - Name of the keygroup you wish to load into memory.
  • location - Location (relative to cfg/events/) of the file you wish to load.


Examples

Say you have make a file called es_mykeygroup_db.txt (Notice it must be prefixed with es_ and suffixed with _db and it must be a .txt file). We'll put that file in cfg/events/ and then let's just stuck some information in it:

"mykeygroup"
{
	"key1"
	{
		"keyvalue"		"value"
	}
}
es_keygroupload mykeygroup

This will load that keygroup into memory so we can use it to retrieve keyvalues and add/delete keys, etc.


Notes

With the newer script addons Mattie added the possibility of loading keygroups from the addons/eventscripts/scriptname/ directory to do this simply use:

es_keygroupload keygroup |scriptname


If the keygroup file doesn't actually exist in the script folder, ES will create an empty one for you with the name you used. Be sure to save it somewhere else in the script if it is needed to be kept. (see es_keygroupsave)


See also


External links

es_xkeygroupload


{{{category}}}

blog comments powered by Disqus