1
0
mirror of https://github.com/citizenfx/cfx-server-data.git synced 2025-01-08 22:22:57 +08:00

chat: only call RegisterKeyMapping when defined

This commit is contained in:
astatine 2020-04-13 07:45:30 +02:00 committed by blattersturm
parent adfdb89895
commit abb38d4ff1

View File

@ -228,7 +228,9 @@ local chatHideState = kvpEntry and tonumber(kvpEntry) or CHAT_HIDE_STATES.SHOW_W
local isFirstHide = true
if not isRDR then
RegisterKeyMapping('toggleChat', 'Toggle chat', 'keyboard', 'l')
if RegisterKeyMapping then
RegisterKeyMapping('toggleChat', 'Toggle chat', 'keyboard', 'l')
end
RegisterCommand('toggleChat', function()
if chatHideState == CHAT_HIDE_STATES.SHOW_WHEN_ACTIVE then