DirkScripts
Docs
Key Prompts
#lib.showKeys
lualib.showKeys({ position = 'bottom-right', direction = 'column', inputs = { { label = 'Open Trunk', key = 'E', icon = 'car', action = function() TriggerEvent('vehicle:openTrunk') end, canInteract = function() return true end }, { label = 'Lock Vehicle', key = 'L', icon = 'lock', action = function() TriggerEvent('vehicle:toggleLock') end }, }, })
| Field | Type | Required | Description |
|---|---|---|---|
| position | string | table | yes | Overlay position |
| direction | string | no | row, column, row-reverse, column-reverse |
| inputs | table[] | yes | Key prompt entries |
#Input Entry Fields
| Field | Type | Required | Description |
|---|---|---|---|
| key | string | yes | Control key name/code (string form) |
| label | string | yes | Prompt label |
| icon | string | yes | Prompt icon |
| action | function | no | Callback when pressed |
| clientEvent | string | no | Trigger client event when pressed |
| serverEvent | string | no | Trigger server event when pressed |
| export | string | no | Call an export when pressed |
| args | table | no | Arguments for event/export |
| delay | number | no | Hold/delay value |
| canInteract | function | no | Dynamically hide/disable input |
#lib.hideKeys
lualib.hideKeys()
#lib.isKeysOpen
lualocal open = lib.isKeysOpen()
