Oxide Drugselling
Ambient NPC drug dealing system for FiveM servers.
Oxide Drugselling adds street-level NPC drug sales to your FiveM server. Players can approach ambient pedestrians, offer configured drugs from their inventory, negotiate price through a packaged NUI panel, and deal with police calls, rejections, or robberies depending on the NPC and your server settings.
Key Features
- Ambient NPC selling - Sell to world pedestrians through a global ped interaction.
- Config-driven pricing - Base prices, grade multipliers, metadata bonuses, and trait bonuses are all defined in config.
- Negotiation flow - NPCs can accept, counter, reject, or rob the player based on pricing and risk rolls.
- Dirty money support - Payouts can use either an account-based or item-based dirty money model.
- Gang NPC risk - Configured gang models can attempt robberies instead of normal deals.
- Police pressure - Optional minimum police checks and dispatch alerts through
o-link.dispatch. - Optional progression hooks - Integrates with source drug resources for level checks, XP, and sold tracking.
- Packaged NUI - Included Vue-based sell panel with grouped inventory display and fair-price feedback.
Requirements
| Resource | Purpose |
|---|---|
ox_lib | Locale, callbacks, animations, and utility helpers |
| o-link | Framework, inventory, target, notify, dispatch, money, and character abstraction |
Optional Integrations
| Resource | Purpose |
|---|---|
oxide-weed | Weed level checks, XP/sold tracking, and strain trait bonus pricing |
oxide-meth | Meth level checks and XP/sold tracking |
Quick Start
- Place
oxide-drugsellingin your resources folder. - Start
ox_lib, your framework/inventory stack,o-link, any optional source drug resources, thenoxide-drugselling. - Review
shared/config.lua,shared/config/selling.lua, andshared/config/drugs.lua. - Make sure the configured drug item names exist in your inventory system.
- Join the server with a configured item and verify the NPC sell interaction appears on ambient pedestrians.
ensure ox_lib
# your framework and inventory dependencies
ensure o-link
ensure oxide-weed # optional
ensure oxide-meth # optional
ensure oxide-drugselling
Core Systems
Sale flow
The resource registers a global ped interaction through o-link.target. When the target and player pass all runtime checks, the NPC approaches, a scripted camera is created, and the sell panel opens with grouped sellable inventory data.
Pricing pipeline
Each configured drug type defines its own sellable items, metadata grouping, and pricing modifiers. The fair price per unit is calculated from the base item price plus any configured multipliers and bonuses, then scaled by the selected quantity when the player submits an offer.
Risk outcomes
Every sale can trigger:
- a police dispatch roll
- a flat rejection roll
- a robbery roll for gang NPCs
- price-based accept, counter, or reject behavior
See Features for the full flow.
Documentation
- Installation Guide - Full setup and verification steps
- Configuration Reference - Settings, pricing, and metadata reference
- Features - Sale flow, pricing, risk, and lifecycle behavior
- API Reference - Callbacks, helper behavior, and integration expectations
- Troubleshooting - Common setup and runtime checks