Es keygroupfilter

From EventScripts Community Encyclopedia


Overview

Syntax: es_keygroupfilter <keygroup> <not/only> <part-of-value-name> <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_xkeygroupfilter

Description

Applies a filter to prune a keygroup. You can filter the keygroup such that it includes "only" keys with the valuename/value pair, or you can filter it such that the keygroup only includes keys that do "not" include the valuename/value pair.

Parameters

  • <keygroup> - the name of the keygroup in question
  • <not/only> - only: Include keys that ONLY have specified valuename/value combination in them. not: Include all keys that do NOT have specifed valuename/value in them.
  • <part-of-value-name> - value name of keys to include/exclude in filter.
  • <value> - value of key to include/exclude from the filter.


Examples

// filter for bots only
es_createplayerlist mylist
es_keygroupfilter mylist only isbot 1
 
// filter by team
es_createplayerlist mylist
es_keygroupfilter mylist only teamid 3
 
// filter for players with kills
es_createplayerlist mylist
es_keygroupfilter mylist not kills 0


Notes

  • This function is not something you want to run all the time on medium-to-large keygroups.


See also

blog comments powered by Disqus