- Documentation
- Server functions
- getCommandsBoundToKey
Function
getCommandsBoundToKey
Returns the commands bound to a player's key.
Syntax
table getCommandsBoundToKey(player thePlayer, string key [, string keyState])Arguments
thePlayerplayer- The player.Different type in MTA:SA: string theKey
keystring- The key.
keyStatestring, optional"down","up"; both states without it.Not in MTA:SA
Differences from MTA:SA
- Arguments in a different colour differ from MTA:SA.
In MTA:SA
getCommandsBoundToKey(string theKey, string keyState)Returns
A table of command names.
Example
local list = getCommandsBoundToKey(player, "F1")
outputChatBox("F1: " .. table.concat(list, ", "), player)