Customization
Behaviour is in config.lua. Anything that touches your framework, your notifications or what an effect actually does is in the bridge/ folder, which is left open for exactly that reason.
Which file decides what
Section titled “Which file decides what”| File or folder | What it decides | Open? |
|---|---|---|
config.lua | Every setting on this page, and the list of vapes | Open |
locales/*.lua | Notification texts, one file per language | Open |
bridge/client_bridge.lua | Framework detection on the client, notifications, the progress bar, and what every effect does | Open |
bridge/server_bridge.lua | Framework detection on the server, removing an empty vape, the inventory check, and the stress hook OnVapePuff | Open |
bridge/stress.lua | An older copy of the stress hook. It is not loaded by the manifest; edit server_bridge.lua instead | Open |
client/client.lua | Taking the vape out, the puff, the smoke and its sync | Escrowed |
server.lua | Registers every vape as a usable item and relays the smoke | Escrowed |
html/ | The progress bar: index.html, style.css, script.js | Plain files |
stream/ | The ten vape models and def_props.ytyp | Assets |
inventory_items/ | Ready-made item definitions for ESX, ox_inventory and QBCore | Reference |
inventory_images/ | One icon per item | Assets |
General settings
Section titled “General settings”| Option | What it does | Default |
|---|---|---|
Config.Locale | Language of the notifications | en |
Config.ShowNotifications | Show notifications at all. Off means no “took out”, “on cooldown”, “empty” or power messages | false |
Config.EnableMaxPuffs | Vapes run out after their puffs count | true |
Config.RemoveVapeCommand | Chat command that puts the vape away | vape |
Config.PuffKey | Default key for the puff | E |
Config.DisableCombatButtons | Blocks the combat buttons (attack and aim) while the smoke comes out | true |
Config.Stress | Calls the stress hook on every puff (see Stress) | true |
Config.PuffKey is a default. The puff is a FiveM key binding called “Vape Puff”, so each player can change it under Settings › Key Bindings › FiveM, and once a player has the binding saved, changing Config.PuffKey no longer changes it for them.
Health, armour and speed
Section titled “Health, armour and speed”| Option | What it does | Default |
|---|---|---|
Config.SpeedVapeInfiniteStamina | Stamina does not drain during the speed effect | true |
Config.StaticHealth | false: every health puff adds Config.Health. true: a puff raises health to Config.Health if it is below it | false |
Config.Health | Amount added, or the level to raise to. On the static setting use 101–200, the game’s health scale | 10 |
Config.StaticArmor | Same idea for armour: add, or raise to | false |
Config.Armor | Amount added, or the level to raise to (up to 100) | 10 |
Health is always kept between 100 and 200, armour at or below 100.
| Option | What it does | Default |
|---|---|---|
Config.VapeExhale | Size of the smoke particle | 0.4 |
Config.SmokeOpacity | How solid the smoke is, 0.0 to 1.0 | 1.0 |
Config.SmokeDelay | Seconds between the puff animation and the smoke appearing | 1.5 |
Config.Particle | Which particle is used: a dict and a name. Ships as the burnout smoke from scr_recartheft | scr_recartheft / scr_wheel_burnout |
Config.SmokeOffset | Where the smoke starts relative to the head: PosX, PosY, PosZ, RotX, RotY, RotZ | 0.05, 0.0, 0.5, 0, 0, 0 |
Each cloud lasts 1.5 seconds and is shown to players within 30 metres.
The vapes — Config.Vapes
Section titled “The vapes — Config.Vapes”Each entry is item name → settings. The full shipped list is on 🎒 Items.
| Field | What it does |
|---|---|
prop | Which model is held: mic_black, mic_blue, mic_green, mic_lightblue, mic_orange, mic_pink, mic_purple, mic_red, mic_white, mic_yellow |
Label | Name used on the progress bar |
SmokeColor | An R, G, B colour, or the word Rainbow for cycling colours |
Cooldown | Seconds before this vape can be puffed again |
puffs | Puffs before it runs out and one is taken from the inventory |
EffectDuration | Seconds the power lasts. 0 for flavours |
ShowProgress | Show the progress bar while the power lasts. Off on every shipped vape |
SpeedMultiplier | For speed_vape (sprint) and carspeed_vape (engine) only |
power | Optional. A list of effects to run together, each with its own number (see below) |
Which effect a vape has
Section titled “Which effect a vape has”The item name decides the effect. invisibility_vape makes you invisible because it is called invisibility_vape; any other name without a power list is a flavour.
The effect names the bridge understands: invisibility_vape, speed_vape, superjump_vape, teleport_vape, invincibility_vape, health_vape (or health), armor_vape (or armor), carspeed_vape, freeze_vape, gravity_vape — plus random_vape, which picks one of the others.
Combining effects with power
Section titled “Combining effects with power”Give a vape a power list and it runs every effect in it on each puff, whatever the vape is called. The number next to each effect is its duration in seconds, except for health and armor, where it is the amount. vape_custom in the config is a working example: health 10, armour 10, speed for 10 seconds.
Adding a vape
Section titled “Adding a vape”- Copy an existing entry in
Config.Vapesand give it a new item name. - Choose a
prop, aSmokeColor,puffsandCooldown. For a power, either use one of the effect names above as the item name or add apowerlist. - Add the item to your inventory the same way as the others, with an icon.
refresh, thenrestart mic_vape.
Extra effects the bridge understands
Section titled “Extra effects the bridge understands”freeze_vape (you cannot move) and gravity_vape (low gravity, slower movement) are handled in bridge/client_bridge.lua, and their item definitions are already in inventory_items/, but they have no entry in Config.Vapes. Add an entry for each — copy superjump_vape and rename it — and they work.
transform_vape is in the item files too, but it needs a Config.TransformAnimals list that the shipped config does not have. Leave it out unless you are ready to write that list and test it.
Stress
Section titled “Stress”With Config.Stress = true, every puff calls OnVapePuff in bridge/server_bridge.lua with the player’s server ID. Out of the box that function only prints a line to the server console. Commented examples for QBCore metadata and esx_status sit inside it: uncomment the one that fits, or call your own HUD or stress resource there.
If you do not use stress, set Config.Stress = false and the console stays quiet.
Languages
Section titled “Languages”Nine files ship in locales/: en, de, es, fr, it, pl, pt, ru, tr. Pick one with Config.Locale.
The car_speed line — shown when the car speed vape kicks in — reads “No waypoint set!” in the shipped files. Reword it in your language file.
To add a language: copy locales/en.lua, change the key at the top to your code, translate, and add the file to both client_scripts and server_scripts in fxmanifest.lua. Set Config.Locale, refresh and restart.
The bridge
Section titled “The bridge”Everything that depends on your server is in bridge/.
| File | What to change there |
|---|---|
bridge/client_bridge.lua | ShowNotification — route messages to your own notify resource. The effect code — change what a power does, or add a new effect name. ShowProgressBar / HideProgressBar for the bar |
bridge/server_bridge.lua | OnVapePuff for stress. Removing an empty vape and checking whether the player still carries it — adapt these two for an inventory that does not go through ESX or QBCore’s own item functions |
Both files find the framework the same way: es_extended if it is started, otherwise qb-core — which is also how QBox is found, through its QBCore compatibility. For another framework, add a branch there and in the two item functions next to it.
Commands and keys
Section titled “Commands and keys”| Command or key | What it does | Set in |
|---|---|---|
| Use the item | Takes the vape out; using it again puts it away | Inventory |
| E (“Vape Puff”) | Takes a puff | Config.PuffKey, then each player’s key bindings |
/vape | Puts the vape away | Config.RemoveVapeCommand |
A vape is also put away when the player no longer carries the item; the resource checks every 2.5 seconds.