Core Keybinds is a keybind and menu script for ESX servers. Players bind their own keys to commands, and you define icon menus that open by command, by key or at a spot on the map.
Features
- Players open the keybind screen with
/keybindsand assign keys to the commands you list in the config - Keybinds are saved per player in the
user_keybindstable (matched by Steam identifier) and loaded when the player joins - Default keybinds for players who have not saved any, and a list of blocked keys that cannot be bound
- Menus with icon boxes defined in
config.lua: label, icon, trigger name, optional filler squares and close-on-click - Open a menu by command, by bound key, or at configured map locations with a marker, 3D text, blip and the E key
- Job whitelists per menu and per box, and menus that can only be opened while driving a vehicle
- Included vehicle control menu: front and rear doors, hood, trunk and engine on/off
- Click sound on menu buttons
Requirements
- ESX (
es_extended, loaded through theesx:getSharedObjectevent) andmysql-async - Players need a Steam identifier, because keybinds are stored under it
- Players need internet access: the Font Awesome icons and the click sound load from external hosts
Installation
- Copy the folder
core_keybindsinto yourresourcesdirectory. - Import
core_keybinds.sql. It creates theuser_keybindstable and starts withUSE es_extended;, so change that line if your database has another name. - Add
ensure core_keybindsto yourserver.cfg. - Edit
config.lua: list the commands players can bind, set default and blocked keys and build your menus. For each menu box trigger that is not already handled, add a matchingRegisterNUICallbackinclient/main.lua.