getKeyBoundToFunction | Multi Theft Auto: Wiki Skip to content

getKeyBoundToFunction

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


getKeyBoundToFunction allows retrieval of the first key bound to a function.

Syntax

getKeyBoundToFunction ( )

Code Examples

server

/key command gives bounded key to our chat function

function chat ()
outputChatBox("Test")
end
bindKey("F2","down",chat)
function key()
local boundKey = getKeyBoundToFunction(chat)
outputChatBox(boundKey)
end
addCommandHandler("key",key)