xhookLua
Game

config

One config section as an object, so values read by short key.

Functions

config.weapon

config.weapon(weapon [, bot]) -> Section
NameTypeDescription
weaponstringLike "ak47"; "current" is the weapon in hand.
botoptionalstring"rage" or "legit". Default "rage".

A weapon's config section.

Returns nil for "current" without a gun

Half-Life has one weapon config; "current" gives it.

config.section

config.section(prefix) -> Section
NameType
prefixstring

Any section, like "misc.automation" or "visuals.esp".

section[key]

section[key] / section[key] = value

Same as features.get / features.set on prefix .. "." .. key.

  • Keys keep their dots: ak["aim.automatic.penetration.minimum_damage"].
  • An unknown section or key is an error.

section:get

section:get(key) -> any
NameType
keystring

Read a value.

section:set

section:set(key, value)
NameType
keystring
valueany

Write a value.

section:keys

section:keys() -> string[]

Every short key in the section.

section:name

section:name() -> string

The prefix, like "rage.ak47".

config ยท Lua API ยท xhook