integrations
Inventory, notify, hint and target in one file.
All integrations are chosen in integrations.lua. Wrong values print an error with the accepted options.
| Setting | Options | Default |
|---|---|---|
Integrations.Inventory | 'auto', 'ox_inventory', 'esx', 'custom' | 'auto' |
Integrations.Notify | 'ko_notify', 'ox_lib', 'esx', 'custom' | 'ko_notify' |
Integrations.Hint | 'helpnotify', 'textui' | 'helpnotify' |
Integrations.HelpNotify | 'ko_helpnotify', 'esx', 'native', 'custom' | 'ko_helpnotify' |
Integrations.TextUI | 'esx', 'ox_lib', 'custom' | 'esx' |
Integrations.Target | 'none', 'ox_target', 'custom' | 'none' |
- Inventory `auto`: uses ox_inventory if it is started, otherwise the ESX built-in inventory.
- Hint is only used when
Target = 'none'(marker + key). - Target `none`: players press E at the marker / NPC. Players can change the key in the GTA key bindings.
integrations.lua
Integrations.Inventory = 'auto'
Integrations.Notify = 'ko_notify'
Integrations.Hint = 'helpnotify'
Integrations.HelpNotify = 'ko_helpnotify'
Integrations.Target = 'none'Custom integrations
Set an option to 'custom' and paste your own export / event call into the matching function in integrations.lua, between the >>> paste and <<< markers. Then delete the print() line.
| Function | Side | Used for |
|---|---|---|
Custom.Notify(message, notifyType, duration) | client | notifications |
Custom.ShowTextUI(message) / Custom.HideTextUI() | client | TextUI hint |
Custom.ShowHelpNotify(message) / Custom.HideHelpNotify() | client | help hint |
Custom.AddTarget(data) / Custom.RemoveTarget(id) | client | target zones |
Custom.Inventory.GetLabel / HasItem / CanCarry / AddItem | server | inventory |
Help hint every frame
If your help hint must be called every frame (like the GTA help text), set Integrations.Custom.HelpNotifyEveryFrame = true.
Safe until set up
Until the custom inventory is set up, its functions return false. Purchases then fail safely and the money is refunded.
Was this page helpful?
