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.
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 Support — Auto-detects ESX or QB-Core on both client and server.
- •30+ Strains — Pre-configured with a wide catalog of raw flower and pre-rolled joint items.
- •Realistic Rolling — Convert raw flower into joints using Backwoods or Grabba Leaf.
- •Interactive Vape System — Refillable vape with juice flavors and liquid tracking.
- •Player-to-Player Giving — Hand off joints or vapes to nearby players with a confirmation prompt.
- •Dynamic Effects — Timecycle modifiers, motion blur, facial overrides, and movement clipsets that scale with usage.
- •Speed Multipliers — Certain strains apply temporary sprint speed boosts.
- •Particle Effects — Networked smoke particles for both prop and mouth exhale states.
- •Combat Disabling — Optional restriction of melee and aim controls while smoking.
- •Vehicle Integration — Automatically rolls down the driver window while smoking in a car.
- •Death & Water Cleanup — Props and effects are safely destroyed if the player dies or enters water.
Requirements
| Dependency | Purpose | Required |
|---|---|---|
ox_lib | Progress bars, context menus, callbacks, notifications | Yes |
oxmysql | MySQL wrapper (loaded by server) | Yes |
| ESX or QB-Core | Framework for items, players, and inventory | Yes |
| OX Inventory or QB-Inventory | Item storage and images | Yes |
Note
/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:
ensure flake_smokingStep 2 — Add Items
Depending on your framework and inventory, add the provided item definitions:
- •OX Inventory — Paste the contents of
[install]/ox-install - readme.mdintoox_inventory/data/items.lua. - •QB-Core — Paste the contents of
[install]/qb-install - readme.mdintoqb-core/shared/items.lua.
Step 3 — Add Images
Copy all images from [install]/images/ into your inventory's image folder:
- •OX Inventory —
ox_inventory/web/build/images/ - •QB-Inventory —
qb-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
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 Key | Default | Action |
|---|---|---|
SmokeButton | 144 (F) | Take a puff / inhale |
ThrowButton | 73 (X) | Drop / throw the item |
MouthButton | 10 (Page Up) | Move item to mouth |
HandButton | 11 (Page Down) | Move item to hand |
GiveButton | 121 (Insert) | Initiate give to nearby player |
ConfirmGiveButton | 38 (E) | Confirm giving the item |
CancelGiveButton | 73 (X) | Cancel giving |
RefillVapeButton | 10 (Page Up) | Open vape refill menu |
Control Collision
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:
{
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
| Setting | Default | Description |
|---|---|---|
MaxLiquid | 10 | Maximum liquid capacity per vape |
AddLiquidInVape | 3 | Liquid added per juice item used |
VapeSizeRemove | 0.5 | Liquid 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:
- •Smoke — Press the configured smoke key to take a puff. Joints burn down over time; vapes consume liquid.
- •Hand / Mouth — Toggle where the item is held. Joints can sit in the mouth or hand. Vapes stay in hand.
- •Give — Target a nearby player and hand off the item. They receive it with the current burn/liquid level preserved.
- •Throw — Drop the item on the ground and exit the smoking state.
- •Refill Vape — Open 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
Pre-Rolled Joints
Each raw flower has a matching _joint suffix (e.g. white_runtz_joint).
Vape & Juice
Leaf & Lighters
Troubleshooting
| Issue | Fix |
|---|---|
| Items not usable | Ensure items are added to your framework and the resource is ensured after the framework. |
| Images not showing | Verify image paths match your inventory's expected directory and clear browser cache. |
| No particle effects | Make sure core particle asset is valid on your game build. The script requests and loads it automatically. |
| Stress not reducing | Implement StressTrigger in config/edits.lua to wire to your HUD or status resource. |
| Prop not attaching | Check that the prop model exists in your server build. Most use base-game props. |
| Can't roll joints | Confirm leaf items exist in inventory and are listed in Config.LeafItems. |
Developed by Flake Development. For support, open a ticket in our Discord.
