Skip to main content

Installation

Installing TrapNexus, adding item definitions, and confirming it started correctly.

Read Requirements first. In particular, OneSync must be on.

1. Add the resource

Place the trapnexus folder in your resources directory, then add it to server.cfg:

ensure oxmysql
ensure trapnexus

Order matters. oxmysql must start before TrapNexus, and your framework must start before both.

If you use a folder ensure such as ensure [local], be careful about keeping a backup copy of the resource inside that folder. A folder ensure starts every resource inside it, so a second copy will start alongside the first and you will get duplicated pedestrians and duplicated event handlers. Keep backups outside the resources tree.

2. Add the item definitions

Item definitions are provided as three separate packs. Use the one that matches your inventory, and do not copy values between them — the three are on different weight scales, and mixing them makes the resource unusable.

InventoryFile
qb-inventoryinstall/items_qb.sql
esx_inventory (native)install/items_esx.sql
ox_inventoryinstall/items_ox.lua

If items weigh far more than a player can carry, you have used the wrong pack. See Troubleshooting.

3. Database

Tables are created automatically on first start. You can also import the schema yourself before starting — see Database setup.

4. Start and check the console

On a successful start, the console reports the framework and inventory it detected. Confirm both are what you expect before going further: detection failing quietly is the most common cause of everything else behaving strangely.

5. Run the loop once

On a development server, and in this order:

  1. Harvest an ingredient from a zone.
  2. Craft it into a product.
  3. Sell some on the street.
  4. Take a bulk contract through to delivery.

Each one should leave a row in the transactions table. If a step produces no row, stop there and check the console rather than continuing.

A note on restarting

If you add or remove files inside the resource, run refresh before restart trapnexus. The server caches its list of resource files at start, so a plain restart will not pick up a file that did not previously exist — the symptom is a feature that reports an unknown action even though the code is on disk.