ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. isValidControlName

Function

isValidControlName

Server and clientInput and controlsTrilogy Hub only

Checks whether a control name is known to the game.

Syntax

bool isValidControlName(string control)

Arguments

controlstring
The control name.

Returns

true for a valid name.

Example

addCommandHandler("zablokuj", function(player, _, control)
    if not isValidControlName(control or "") then
        outputChatBox("Nie ma takiego sterowania.", player)
        return
    end
    toggleControl(player, control, false)
end)

See also