Open methods
We have some open methods on the client and server of esc. These allow you to change keybinds or do checks for when you are allowed to open the esc menu.
OpenMethods = {}
-- Register key mappings
RegisterKeyMapping('+escape', 'Open Pause Menu', 'keyboard', 'escape')
RegisterKeyMapping('+openmap', 'Open Map Menu', 'keyboard', 'm')
function OpenMethods.canOpenEscapeMenu() -- Define if the player can open the escape menu
--[[if exports['ox_inventory']:IsOpen() or exports["lb-phone"]:IsOpen() or exports['qs-inventory']:inInventory() then
return false
end]]
return true
endOpenMethods = {}
function OpenMethods.disconnectPlayer(source) -- Define the disconnect message or if you want to add logs when they quit through the escape menu
DropPlayer(source, 'Disconnected')
endLast updated