- Documentation
- Shared functions
- getControlNames
Function
getControlNames
Returns the game control names accepted by toggleControl, setControlState and isControlEnabled.
Syntax
table getControlNames([string group])Arguments
groupstring, optional"foot"(on foot),"vehicle"(in a vehicle); all without it.
Returns
A table of names, e.g. fire, jump, accelerate.
Example
for _, name in ipairs(getControlNames("vehicle")) do
outputServerLog(name)
end
See also
getControlGroupTells whether a control belongs to walking ("foot") or to a vehicle ("vehicle").isValidControlNameChecks whether a control name is known to the game.toggleControlEnables or disables one game control, e.g. shooting (fire), jumping (jump) or entering vehicles (enter_exit). A disabled control ignores the player's keys. On the server you pass a player orroot.