Skip to content

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 ​

ModuleAdaptersFallback
Frameworkqbox (qbx_core), ox (ox_core), esx (es_extended), qbcore (qb-core), customnone, the script stops with an error
Inventoryox_inventory, qs-inventory, qb-inventoryframework (the framework's own inventory)
Targetox_target, qb-targetnone (key prompts)
Notificationsox_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 without consume, client.export or server.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 false is treated as a success.
  • ESX: notifications use esx_notify when it is started, the GTA feed otherwise.