Immersion

Shadow Cigarette

A complete and immersive cigarette system, from the pack to hand-rolling.

Version
1.3.1
Resource
SF-Smoke
Version 1.3.1 Resource SF-Smoke Frameworks ESX Bundled languages 1 Store page View

Overview#

SF-Smoke adds the whole chain around cigarettes: singles, packs, cartons, rolling tobacco, papers, filters and a lighter. You cannot light a cigarette without a lighter in your inventory, and the lighter can break. Animations work on foot and inside a vehicle, where the cigarette prop is attached to the mouth.

Full item chain

Cigarette, pack, carton and hand-rolled cigarette, each with its own behaviour.

Lighter required

Without a lighter in the inventory, the cigarette cannot be lit.

Lighter wear

A five percent chance the lighter breaks after each cigarette smoked.

Contextual animations

A smoking emote on foot, and the cigarette prop attached to the mouth while driving.

Opening packs and cartons

A pack gives twenty cigarettes, a carton gives ten packs, each behind a progress bar.

Hand-rolling

Combine papers, filters and tobacco to roll your own, in eight seconds.

Simple control

Press X to stop smoking at any time.

Lightweight

No permanent loop: the resource only runs while a cigarette is lit.

Dependencies#

ResourceRequiredWhy
ox_libYesProgress circles and notifications, declared in the manifest.
es_extendedYesFramework used by the client and server sides.
ox_inventoryYesHolds the item definitions and their images.
dpemote / rpemotesYesProvides the smoke emote used on foot.

Installation#

  1. Drop the SF-Smoke folder into your server resources directory.
  2. Add the eight items listed below to the data/items.lua file of ox_inventory, keeping the names exactly as they are.
  3. Copy the item images into the ox_inventory web images folder.
  4. Add the ensure lines below to your server.cfg.
  5. Restart the server, then ox_inventory so it picks up the new items.
server.cfg
ensure ox_lib
ensure ox_inventory
ensure SF-Smoke

Configuration#

KeyDefaultWhat it does
Config.SmokeTimeโ€”How long a cigarette lasts.
Config.LighterBreakChance5Percentage chance the lighter breaks after a cigarette.
Config.PackAmount20Number of cigarettes obtained by opening a pack.
Config.CartonAmount10Number of packs obtained by opening a carton.

Items#

Declare these in your inventory using exactly these names: they are hard-coded in the resource.

Item nameDescription
cigaretteA single cigarette. Needs a lighter to be lit.
paquetcigaretteA pack, gives twenty cigarettes when opened.
cartoucheA carton, gives ten packs when opened.
cigarette_rouleeA hand-rolled cigarette, made from tobacco, papers and a filter.
tabac_roulerRolling tobacco, a rolling ingredient.
feuilles_roulerRolling papers, a rolling ingredient.
filtresFilters, a rolling ingredient.
briquetThe lighter, required to light any cigarette.

Good to know#

The item names above are the ones the server actually registers. They must match your ox_inventory definitions character for character, otherwise the items simply do nothing when used.
Some older copies of the readme call the resource shadow-cigarette and shorten a few item names. Follow the names on this page: they are read from the source.