HomeDocumentationScriptsFlake Smoking & Vaping

Flake Smoking & Vaping

A premium smoking and vaping script for FiveM. Built for ESX and QB-Core with dual inventory support, realistic particle effects, joint rolling, and a fully configurable item ecosystem.

FiveMESX & QB-CoreOX InventoryLua 5.4
Purchase Script
flakedev.com

Overview

Flake Smoking is a standalone resource that brings a fully interactive smoking and vaping experience into your FiveM server. It handles everything from lighting a joint with a lighter, passing it to another player, rolling raw flower into blunts, to managing vape liquid refills through an OX Lib context menu.

The script is framework-agnostic at its core — it auto-detects whether you're running ESX or QB-Core and adapts inventory and notification calls accordingly. All configuration lives in config/ and is marked as escrow-ignored, meaning you can modify items, keybinds, effects, and animations without touching the core logic.

Features

  • Dual Framework SupportAuto-detects ESX or QB-Core on both client and server.
  • 30+ StrainsPre-configured with a wide catalog of raw flower and pre-rolled joint items.
  • Realistic RollingConvert raw flower into joints using Backwoods or Grabba Leaf.
  • Interactive Vape SystemRefillable vape with juice flavors and liquid tracking.
  • Player-to-Player GivingHand off joints or vapes to nearby players with a confirmation prompt.
  • Dynamic EffectsTimecycle modifiers, motion blur, facial overrides, and movement clipsets that scale with usage.
  • Speed MultipliersCertain strains apply temporary sprint speed boosts.
  • Particle EffectsNetworked smoke particles for both prop and mouth exhale states.
  • Combat DisablingOptional restriction of melee and aim controls while smoking.
  • Vehicle IntegrationAutomatically rolls down the driver window while smoking in a car.
  • Death & Water CleanupProps and effects are safely destroyed if the player dies or enters water.

Requirements

DependencyPurposeRequired
ox_libProgress bars, context menus, callbacks, notificationsYes
oxmysqlMySQL wrapper (loaded by server)Yes
ESX or QB-CoreFramework for items, players, and inventoryYes
OX Inventory or QB-InventoryItem storage and imagesYes

Note

The script uses /assetpacks as a dependency in the manifest for prop streaming. Ensure your server is configured to handle asset packs if you plan to use custom models.

Installation

Step 1 — Drop the Resource

Place the flake_smoking folder into your server's resources directory. Add the following to your server.cfg:

server.cfg
ensure flake_smoking

Step 2 — Add Items

Depending on your framework and inventory, add the provided item definitions:

  • OX Inventory — Paste the contents of [install]/ox-install - readme.md into ox_inventory/data/items.lua.
  • QB-Core — Paste the contents of [install]/qb-install - readme.md into qb-core/shared/items.lua.

Step 3 — Add Images

Copy all images from [install]/images/ into your inventory's image folder:

  • OX Inventoryox_inventory/web/build/images/
  • QB-Inventoryqb-inventory/html/images/

Step 4 — Configure (Optional)

Edit the files in config/ to adjust keybinds, item stats, notifications, and rolling behavior. These files are escrow-ignored and safe to modify.

Done

Restart your server and players can begin using smokable items immediately. No database setup is required.

Configuration

All tunables are split across three config files. You should not need to edit anything outside of config/ for normal usage.

Controls & Keybinds

Located in config/config.lua. Each value is a control index used by the native IsControlJustPressed.

Config KeyDefaultAction
SmokeButton144 (F)Take a puff / inhale
ThrowButton73 (X)Drop / throw the item
MouthButton10 (Page Up)Move item to mouth
HandButton11 (Page Down)Move item to hand
GiveButton121 (Insert)Initiate give to nearby player
ConfirmGiveButton38 (E)Confirm giving the item
CancelGiveButton73 (X)Cancel giving
RefillVapeButton10 (Page Up)Open vape refill menu

Control Collision

By default, ThrowButton and CancelGiveButton share 73 (X). If you want separate binds, change one of them to a different control index.

Smoke Items Schema

Every smokable item is defined as a table entry inside Config.Smoke:

config/config.lua
{
    Item            = "item_name",       -- Inventory item name
    Prop            = "prop_model",      -- GTA prop model name
    Health          = 25,                -- Health restored per puff
    Armor           = 50,                -- Armor restored per puff
    Stress          = 5,                 -- Stress relieved per puff
    Size            = 20,                -- Starting durability (joints)
    Type            = "joint",           -- "joint" | "vape"
    SpeedMultiplier = 1.50,              -- Optional sprint multiplier
    SpeedTime       = 120,               -- Multiplier duration (seconds)
    Time            = 120                -- Auto-burn countdown (joints only)
}

Joints consume Size per puff based on Config.SizeRemove (randomized min/max). Vapes consume a fixed Config.VapeSizeRemove per puff and must be refilled with juice items.

Vape Settings

SettingDefaultDescription
MaxLiquid10Maximum liquid capacity per vape
AddLiquidInVape3Liquid added per juice item used
VapeSizeRemove0.5Liquid consumed per puff

Vape juice flavors are defined in Config.VapeJuices. These must exist as inventory items and are consumed on refill.

Rolling System

Located in config/rolling.lua. Players use raw flower items to craft rolled joints. Each recipe requires:

  • 1× raw flower item (e.g. white_runtz)
  • 1× leaf item (Backwood or Grabba Leaf)

The output amount defaults to Config.JointsGiven (2) but can be overridden per-recipe with the amount field. Rolling plays a progress bar and animation before awarding the joint items.

Notifications

config/edits.lua contains the notification function and all user-facing strings. To swap ox_lib for another notification system, replace Config.Notify here. All messages can be localized or reworded via Config.Notifications.


Usage & Controls

When you use a joint or vape, the script enters a smoking loop. While active, you have full control over the item:

  • SmokePress the configured smoke key to take a puff. Joints burn down over time; vapes consume liquid.
  • Hand / MouthToggle where the item is held. Joints can sit in the mouth or hand. Vapes stay in hand.
  • GiveTarget a nearby player and hand off the item. They receive it with the current burn/liquid level preserved.
  • ThrowDrop the item on the ground and exit the smoking state.
  • Refill VapeOpen the OX Lib context menu to select a juice flavor from your inventory.

Effects stack with each puff. Once the effect level hits the threshold, the player will feel "stoned enough" and refuse to smoke more until the level decays. Effects fade automatically over time.

Technical Notes

The client tracks smoking state with isSmoking, inHand, inMouth, and isGivingMode. Props attach to different bones depending on state (hand: 64097, mouth: 47419, vape hand: 18905). All props are network-synced so other players see them.

Smoke particles use the core asset and exp_grd_bzgas_smoke effect. Prop smoke loops on the joint itself; mouth smoke loops on a hidden prop during exhale. All particle events are broadcast through the server so every client sees the same timing.

When giving an item, the giver's client deletes the local prop and sends a server event to award the item metadata to the receiver. The receiver then spawns their own prop and re-enters the smoking loop.


Items

The script ships with 30+ strains, 11 vape juices, 5 leaf types, and 2 lighter variants.

Raw Flower

white_runtzcheetah_pissgary_paytongelattigeorgia_piejefewhitecherry_gelatoblueberry_cruffinsnow_manfine_chinapink_sandyzushiapple_gelatobiscotticollins_avemarathonoreozpirckly_pearruntz_ogblue_tomyzetherfrotiesgmo_cookiesice_cream_cake_packkhalifa_kushla_confidentialmarshmallow_ogmoon_rocksour_dieseltahoe_ogcake_mixcereal_milk

Pre-Rolled Joints

Each raw flower has a matching _joint suffix (e.g. white_runtz_joint).

Vape & Juice

vapeblueberry_jam_cookiebutter_cookiecookie_crazeget_figgykey_lime_cookiemarshmallow_crispno_99paris_fogpogoshamrock_cookiestrawberry_jam_cookie

Leaf & Lighters

grabba_leafbackwoods_grapebackwoods_honeybackwoods_russian_creambanana_backwoodslightercheap_lighter

Troubleshooting

IssueFix
Items not usableEnsure items are added to your framework and the resource is ensured after the framework.
Images not showingVerify image paths match your inventory's expected directory and clear browser cache.
No particle effectsMake sure core particle asset is valid on your game build. The script requests and loads it automatically.
Stress not reducingImplement StressTrigger in config/edits.lua to wire to your HUD or status resource.
Prop not attachingCheck that the prop model exists in your server build. Most use base-game props.
Can't roll jointsConfirm leaf items exist in inventory and are listed in Config.LeafItems.

Developed by Flake Development. For support, open a ticket in our Discord.