prp-nicotine

Copperline nicotine pouches for FiveM, version 1.3.0. Open a tin for pouches, chew one for stress relief with a live calm meter. Works with ox_inventory, qb-family and ESX inventories; usable items register automatically.

Copperline Spearmint Can

Spearmint Can

Copperline Mint Can

Mint Can

Copperline Wintergreen Can

Wintergreen Can

What's in the Package

Highlights

Open cans for pouches — Use a Copperline can to receive pouches (configurable yield, default 15).

Consume pouches — Upper-body chewing animation, screen effect, gradual stress relief and the calm meter HUD (flavour, slowing pulse line, countdown, stress removed).

Three flavors — Spearmint, Mint, Wintergreen. Each has a can and pouch item.

Multi-inventory — ox_inventory directly; qb-inventory, ps-inventory and lj-inventory on QBCore; the default ESX inventory; qs, codem, tgiann, origen and core inventories through their QBCore / ESX compatibility. Use the tabs below for copy-paste ready definitions.

Notifications & languages — ox_lib, QBCore, ESX, okokNotify, brutal_notify, mythic_notify, pNotify, prp-notify or your own; en, de, es, fr, it, nl, pl, pt-br, tr.

Multi-framework — QBX, QBCore, ESX, standalone. Stress relief requires framework; standalone = visual effects only.

Installation

  1. Place prp-nicotine in your resources folder (e.g. resources/[prp]/prp-nicotine).
  2. Add to server.cfg after dependencies:
    ensure ox_lib
    ensure ox_inventory   # or your inventory
    ensure qbx_core   # or qb-core / es_extended
    ensure prp-nicotine
  3. Copy item definitions using the tabbed definitions below. On non-ox inventories, prp-nicotine registers the usable items itself.
  4. Optional: set Config.Locale and check the startup line [prp-nicotine] framework: … | inventory: … | stress/needs: ….
  5. Copy images from prp-nicotine/images/ to your inventory's image folder:
    • zeen_spearmint_can.png, zeen_spearmint_pouch.png
    • zeen_mint_can.png, zeen_mint_pouch.png
    • zeen_wintergreen_can.png, zeen_wintergreen_pouch.png
    (ox_inventory: ox_inventory/web/images/; other inventories: their image folder.)
  6. Add cans to your shop (see Configuring Shops).

Item Definitions

Choose your inventory system below and copy the complete definitions.

Navigate to ox_inventory/data/items.lua and add the following to the return table:

['zeen_spearmint_can'] = {
    label = 'Copperline Spearmint Can',
    weight = 100,
    stack = true,
    close = true,
    consume = 0,
    client = {
        image = 'zeen_spearmint_can.png',
        event = 'nicotine:useCan',
    },
},
['zeen_spearmint_pouch'] = {
    label = 'Copperline Spearmint Pouch',
    weight = 5,
    stack = true,
    close = true,
    consume = 0,
    client = {
        image = 'zeen_spearmint_pouch.png',
        event = 'nicotine:usePouch',
    },
},
['zeen_mint_can'] = {
    label = 'Copperline Mint Can',
    weight = 100,
    stack = true,
    close = true,
    consume = 0,
    client = {
        image = 'zeen_mint_can.png',
        event = 'nicotine:useCan',
    },
},
['zeen_mint_pouch'] = {
    label = 'Copperline Mint Pouch',
    weight = 5,
    stack = true,
    close = true,
    consume = 0,
    client = {
        image = 'zeen_mint_pouch.png',
        event = 'nicotine:usePouch',
    },
},
['zeen_wintergreen_can'] = {
    label = 'Copperline Wintergreen Can',
    weight = 100,
    stack = true,
    close = true,
    consume = 0,
    client = {
        image = 'zeen_wintergreen_can.png',
        event = 'nicotine:useCan',
    },
},
['zeen_wintergreen_pouch'] = {
    label = 'Copperline Wintergreen Pouch',
    weight = 5,
    stack = true,
    close = true,
    consume = 0,
    client = {
        image = 'zeen_wintergreen_pouch.png',
        event = 'nicotine:usePouch',
    },
},

For qb-inventory, ps-inventory, lj-inventory, and qs / codem / tgiann / origen / core inventories on QBCore. Add to qb-core/shared/items.lua (or the item list your inventory reads). prp-nicotine registers the usable items automatically; no extra server code is needed.

zeen_spearmint_can = { name = 'zeen_spearmint_can', label = 'Copperline Spearmint Can', weight = 100, type = 'item', image = 'zeen_spearmint_can.png', unique = false, useable = true, shouldClose = true, description = 'A tin of Copperline spearmint pouches.' },
zeen_spearmint_pouch = { name = 'zeen_spearmint_pouch', label = 'Copperline Spearmint Pouch', weight = 5, type = 'item', image = 'zeen_spearmint_pouch.png', unique = false, useable = true, shouldClose = true, description = 'Takes the edge off.' },
zeen_mint_can = { name = 'zeen_mint_can', label = 'Copperline Mint Can', weight = 100, type = 'item', image = 'zeen_mint_can.png', unique = false, useable = true, shouldClose = true, description = 'A tin of Copperline mint pouches.' },
zeen_mint_pouch = { name = 'zeen_mint_pouch', label = 'Copperline Mint Pouch', weight = 5, type = 'item', image = 'zeen_mint_pouch.png', unique = false, useable = true, shouldClose = true, description = 'Takes the edge off.' },
zeen_wintergreen_can = { name = 'zeen_wintergreen_can', label = 'Copperline Wintergreen Can', weight = 100, type = 'item', image = 'zeen_wintergreen_can.png', unique = false, useable = true, shouldClose = true, description = 'A tin of Copperline wintergreen pouches.' },
zeen_wintergreen_pouch = { name = 'zeen_wintergreen_pouch', label = 'Copperline Wintergreen Pouch', weight = 5, type = 'item', image = 'zeen_wintergreen_pouch.png', unique = false, useable = true, shouldClose = true, description = 'Takes the edge off.' },

For the default ESX inventory (inventories that replace it usually keep their own item list; use the QBCore-format entries there). Run against your database; usable items register automatically:

INSERT IGNORE INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
    ('zeen_spearmint_can', 'Copperline Spearmint Can', 1, 0, 1),
    ('zeen_spearmint_pouch', 'Copperline Spearmint Pouch', 0, 0, 1),
    ('zeen_mint_can', 'Copperline Mint Can', 1, 0, 1),
    ('zeen_mint_pouch', 'Copperline Mint Pouch', 0, 0, 1),
    ('zeen_wintergreen_can', 'Copperline Wintergreen Can', 1, 0, 1),
    ('zeen_wintergreen_pouch', 'Copperline Wintergreen Pouch', 0, 0, 1);

Copy images from prp-nicotine/images/ to your inventory's image folder.

Configuring Shops

With prp-shops

Add the can items to your shop item lists:

['zeen_spearmint_can'] = 40,
['zeen_mint_can'] = 40,
['zeen_wintergreen_can'] = 40,

With ox_inventory shops

Add to ox_inventory/data/shops.lua with desired prices.

With qb-shops

Add the Copperline can items to your shop configuration.

Configuration

Edit config.lua:

OptionDefaultDescription
Locale'en'en, de, es, fr, it, nl, pl, pt-br, tr
Framework / Inventory / Notify / Stress'auto'Force a system instead of auto-detecting it
Needs{ hunger = 0, thirst = 0 }Hunger / thirst change per pouch; 0 leaves food systems alone
CalmMeter{ enabled = true, position = 'top' }Calm meter HUD
PouchesPerCan15Pouches given when opening a can
EnableStressReductiontrueEnable stress relief (requires framework)
StressReduction.min12Min stress reduction
StressReduction.max22Max stress reduction
CooldownMs3000Cooldown between uses (ms)
ScreenEffect'DeadlineNeon'GTA screen effect name
EffectDuration10000Effect duration (ms)
Animation{ dict, name, duration, flag = 49 }Chewing animation (49 = upper body, player keeps walking)

Compatibility

FrameworkInventoryStressStatus
QBXox_inventoryYes (metadata + statebags)Tested live
QBCoreox_inventory; qb / ps / lj; qs, codem, tgiann, origen, core via QBCoreYes (metadata + hud:client:UpdateStress)Supported
ESXox_inventory; default ESX inventory; qs, codem, tgiann, origen, core via ESXYes (esx_status)Supported
Standaloneox_inventoryNoVisual effects only

Flavors

Troubleshooting