Installation Guide

Step-by-step setup for Oxide Drugselling and its optional source resource integrations.

Prerequisites

Required Resources

ResourcePurpose
ox_libLocale, callbacks, animation loading, and utility helpers
o-linkFramework and system abstraction used by the resource

Optional Resources

ResourcePurpose
oxide-weedWeed level checks, XP/sold tracking, and strain trait pricing bonuses
oxide-methMeth level checks and XP/sold tracking

This resource depends on your server's o-link setup for:

  • player-ready and player-unload lifecycle events
  • player character identifiers
  • inventory reads, item removal, item addition, and image path resolution
  • dirty money account access when Config.DirtyMoney.mode = 'account'
  • job lookups for police-count checks
  • notifications
  • dispatch alerts
  • global ped targeting

Installation Steps

1. Place the Resource

Place oxide-drugselling inside your server's resources folder.

2. Add Startup Order

Start framework and inventory dependencies before o-link, then start any optional source drug resources before oxide-drugselling.

ensure ox_lib

# your framework, inventory, and any dependencies required by o-link

ensure o-link
ensure oxide-weed          # optional
ensure oxide-meth          # optional
ensure oxide-drugselling

3. Review Configuration

Adjust:

  • shared/config.lua
  • shared/config/selling.lua
  • shared/config/drugs.lua

Important areas:

  • dirty money mode and account/item names
  • player and NPC cooldowns
  • police requirement and dispatch settings
  • blacklisted and gang ped models
  • shipped weed and meth item names
  • pricing modifiers and metadata field names

See Configuration Reference for the full setting breakdown.

4. Confirm Item Support

oxide-drugselling does not register its own item set.

It sells whatever item names you define in Config.Drugs. If you use the shipped weed and meth entries, make sure those items already exist in the inventory system that o-link.inventory is using on your server.

5. Confirm Dirty Money Mode

The payout configuration lives in shared/config.lua:

Config.DirtyMoney = {
    mode = 'account',
    account = 'cash',
    item = 'black_money',
}

Notes:

  • mode = 'account' pays through o-link.money
  • mode = 'item' pays through o-link.inventory
  • if you use item mode, that item must already exist and be addable by your inventory backend

Verification

  1. Start the server and confirm ox_lib, o-link, and oxide-drugselling load without dependency errors.
  2. Join the server with at least one configured sellable item in inventory.
  3. Confirm the player reaches the loaded state and the resource registers its NPC interaction after o-link signals readiness.
  4. Approach an ambient pedestrian and verify the sell interaction appears.
  5. Open the sell panel and confirm grouped items, images, and fair-price data are present.
  6. Complete a test sale and verify payout works in your selected dirty money mode.

Optional Source Resource Behavior

If oxide-weed or oxide-meth are not running, the core selling system still works.

What gets skipped for an unavailable source resource:

  • level gating for that drug type
  • XP awards back into that resource
  • sold-count tracking back into that resource
  • weed trait bonus resolution when the trait export source is unavailable

Base pricing, negotiation, robbery flow, notifications, and dirty money payout still work.

Notes for UI Developers

The packaged web/dist build is already included and referenced by the manifest. Rebuilding the UI is only necessary if you edit files under web/src.

Next Steps