Installation

Dependencies

QBCore Framework


How to install

Drag the script in your folder

Add the following item to yourinventory/data/items.lua QBCore users to qbcore/shared/items.lua Add the item image to your inventory/images

Run the SQL & restart your server.

If you are using a different inventory then literally create the same items for your custom inventory.

-- Drug Phone
drugphone = { 
    name = 'drugphone', 
    label = 'Drug Phone', 
    weight = 0, 
    type = 'item', 
    image = 'drugphone.png', 
    unique = true, 
    useable = false, 
    shouldClose = false, 
    combinable = nil, 
    description = 'What a great Business Phone' 
},

  • StreetDealXP — XP per successful street deal Amount of XP granted each time a player completes (accepts) a street deal. Default: 2.

  • DrugLevel — Level thresholds (cumulative XP) Total XP required to reach each level: 1: 0, 2: 500, 3: 1,500, 4: 3,000, 5: 5,000, 6: 8,000, 7: 12,000, 8: 15,000, 9: 17,500, 10: 20,000 Note: Values are cumulative; add more entries to extend the cap.


  • DrugBuyers — Buyer categories Top-level list of drug buyer setups, grouped by category (e.g., Weed).

  • CategoryName — Display name The category label shown in UI/menus.

  • ItemList — Sellable items Array of items this category buys.

    • Item: Internal item name.

    • Label: UI display name.

    • img: Icon/texture key used in UI.

    • minPrice / maxPrice: Random sell price range per unit.

    • allowStreetDeal: Item can be sold on the street (true/false).

    • allowDealerDeal: Item can be sold to a dealer/NPC (true/false).

  • DrugContacts — Progression contacts NPC contacts unlocked by level; each entry:

    • ContactName: NPC name.

    • Level: Required player level to access.

    • XP: XP granted/used by your contact logic.

  • DrugBuyerLocations — Street buyer spawns List of spawn points as { x, y, z, heading } for street deals.

  • Example (Weed) Includes street items like Joint and 2g strains (AK47, Amnesia, etc.) and a dealer-only Weed Brick 100g with higher price range.


  • DealTuning — Price & tension logic Master settings for street-deal success chance and tension effects.

  • HardCapMult — Price ceiling Max allowed offer = item.maxPrice * 1.10.

  • Tension — Bounds NPC tension scale: 0–100.

  • DealDelays.MaxFailures — Auto-fail attempts Failed/hesitated tries at a spot before auto-fail: 3.

  • UnderMin — Price ≤ minPrice Treated as success; tension drops -2 … -1.

  • WithinRange — minPrice < price ≤ maxPrice Chance = BaseAtMin (85) − floor(pct * DropAcrossRange (20)), with pct = (price−min)/(max−min), +FirstDealBonus (5), clamped by MinBaseChance (40). On success: tension -1 … 0. On fail: tension +2 … +6; show "The buyer hesitates...".

  • OverCap — maxPrice < price ≤ hardCap Chance = AtMaxPrice (10) − floor(overPct * DropPerOverPct (50)), with overPct = (price−max)/max(max,1), min 0. Success: tension +10 … +15. Fail: tension +20 … +35; show "Too expensive...".

  • AboveHardCap — price > hardCap Always fail; tension +30 … +45; show "Ridiculous price!".

Last updated