Frameworks and resources
Every Nayretis script talks to your server through the nay_lib bridge. It detects your framework, inventory, target and notifications the first time it is used, so the same script runs on every supported stack.
Supported stacks
| Module | Adapters | Fallback |
|---|---|---|
| Framework | qbox (qbx_core), ox (ox_core), esx (es_extended), qbcore (qb-core), custom | none, the script stops with an error |
| Inventory | ox_inventory, qs-inventory, qb-inventory | framework (the framework's own inventory) |
| Target | ox_target, qb-target | none (key prompts) |
| Notifications | ox_lib, nayretis (only when forced) | framework, then native (GTA feed) |
Detection follows the order of the table. Start nay_lib after your framework, inventory and target resources, otherwise they cannot be detected.
Force an adapter
If detection picks the wrong resource, force it in server.cfg with setr (the client reads it too):
cfg
setr nay:framework "esx"
setr nay:inventory "ox_inventory"
setr nay:target "ox_target"
setr nay:notify "native"Values are the adapter names above, or auto (the default). See Convars.
Running a framework that is not in the list? Write a custom adapter.
Known limitations
- ox_core: there is no duty flag, so the active group is treated as the on-duty job. The highest grade of a group counts as boss.
- ox_inventory (any framework): usable items must exist in
ox_inventory/data/items.lua. ox_inventory only calls the item callback for items withoutconsume,client.exportorserver.export. - qb-inventory: item metadata is ignored when counting items.
- qs-inventory: the results of adding and removing items are undocumented. Any result other than
falseis treated as a success. - ESX: notifications use
esx_notifywhen it is started, the GTA feed otherwise.