Urban Supply v2
Urban Supply v2
A full street economy for FiveM: NPC buyers, a weekly fluctuating drug market, heat, per-zone reputation, leveling with rewards, and zones with their own prices and risk. It's also the host for the Distribution wholesale addon and the level source for Halo Backrooms.
Requires ox_lib, ox_inventory and oxmysql. Framework is set in
config.lua (ESX, QBCore or QBox).Compatibility
ESX LegacyQBCoreQBoxox_inventoryoxmysqlox_libwasabi_notifywasabi_policedh_mdtcd_dispatchrcore_dispatchaty_dispatchak4y-dispatchdh_garagevms_garagesv2jg_advancedgarages
Features
- NPC buyers spawn around you while you trap (up to
Config.MaxCustomerin the pool). They walk up and you press E to sell - Weekly drug market. Fluctuating drugs get a random multiplier every Sunday at 12:00 PM EST, saved to the database so it survives restarts
- Drug prices are set per brick (1 brick = 1,000 units), so
price = 500means $500,000 per 1,000 - Dynamic pricing: more police online means a higher sale price
- Heat per zone. Each sale adds heat, heat raises the chance of a police alert, and it decays over time
- Per-zone street reputation with 7 ranks (Unknown → Living Legend), each giving a price bonus. Reputation decays if you stop selling in a zone
- 8-level progression with XP, level labels and a configurable reward at any level (cash, dirty money, items, weapons or a vehicle in the player's garage)
- Robbery protection that grows with level
- Zones with their own price modifier, XP multiplier, minimum level, police/robbery chance and drug whitelist
- Buyers can reject an offer or try to rob you, both configurable
- Dispatch alerts with a timed blip through dh_mdt, cd_dispatch, rcore_dispatch, aty_dispatch, ak4y-dispatch, wasabi or your own
- Read-only exports for other resources:
GetLevel,GetReputation, plus price exports used by Distribution
Player Commands
| Command | Description |
|---|---|
| /trap | Start a sell session. Buyers begin spawning around you |
| /stoptrap | End your session and despawn buyers |
| /checkmarket | Open the market UI with this week's prices |
| /rep | Open your street reputation panel (per-zone sales and rank) |
/trap and /stoptrap can be renamed with Config.StartSell and Config.StopSell.Exports
| Export | Side | Returns |
|---|---|---|
| GetLevel(source) | server | The player's level index from Config.Levels |
| GetReputation(source) | server | { zones = { [zone] = sales }, total, highest } or nil |
| getDrugBasePrice(item) | server | Base price of a drug from Config.DrugList (used by Distribution) |
| getDrugMarketMult(item) | server | This week's market multiplier for a drug (used by Distribution) |
| distroSendNUI / distroSetFocus | client | Lets Distribution draw its panels inside the market UI |
Dependencies
| Resource | Required | Notes |
|---|---|---|
| ox_lib | required | UI, callbacks |
| ox_inventory | required | Items and dirty money |
| oxmysql | required | Progression, market and reputation tables |
| es_extended / qb-core / qbx_core | one of | Set Config.Framework |
| wasabi_police | optional | Live police count for dynamic pricing |
| Dispatch resource | optional | Set Config.Dispatch to match |
| Garage resource | optional | Only for vehicle level rewards. Set Config.GarageScript |