Installation Guide
Step-by-step setup for Oxide Drugselling and its optional source resource integrations.
Prerequisites
Required Resources
| Resource | Purpose |
|---|---|
ox_lib | Locale, callbacks, animation loading, and utility helpers |
o-link | Framework and system abstraction used by the resource |
Optional Resources
| Resource | Purpose |
|---|---|
oxide-weed | Weed level checks, XP/sold tracking, and strain trait pricing bonuses |
oxide-meth | Meth level checks and XP/sold tracking |
o-link Expectations
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.luashared/config/selling.luashared/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 througho-link.moneymode = 'item'pays througho-link.inventory- if you use item mode, that item must already exist and be addable by your inventory backend
Verification
- Start the server and confirm
ox_lib,o-link, andoxide-drugsellingload without dependency errors. - Join the server with at least one configured sellable item in inventory.
- Confirm the player reaches the loaded state and the resource registers its NPC interaction after
o-linksignals readiness. - Approach an ambient pedestrian and verify the sell interaction appears.
- Open the sell panel and confirm grouped items, images, and fair-price data are present.
- 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.