ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. getKeyBoundToCommand

Function

getKeyBoundToCommand

Returns the first key a player has bound to a command.

Syntax

string getKeyBoundToCommand(player thePlayer, string command)

Arguments

thePlayerplayer
The player.Different type in MTA:SA: string command
commandstring
The command name.Not in MTA:SA

Differences from MTA:SA

  • Arguments in a different colour differ from MTA:SA.

In MTA:SA

getKeyBoundToCommand(string command)

Returns

The key or false.

Example

local key = getKeyBoundToCommand(player, "menu")
outputChatBox("Menu otworzysz klawiszem " .. (key or "(brak)"), player)

See also