bj_crack
Full crack production and consumption loop: a homeless dealer NPC with a dialog and shop, a placeable propane stove with a drag & drop cooking minigame, batch quality, cooling timers, stove explosions, heating and smoking with a synced pipe, a high/phase system with addiction and overdose.
Installation
1. Drop the resource into your server and `ensure bj_crack` (after `ox_lib`, `ox_inventory` and your target resource).
2. Copy the item definitions from `install/items.txt` into `ox_inventory/data/items.lua`, then restart `ox_inventory`.
3. Adjust `config.lua` (dealer position, prices, timings) to taste.
Gameplay loop
1. The dealer (Homeless)
A junkie NPC (`Config.Dealer`) spawns at the configured coords. Target him → Talk opens a cinematic dialog (scripted camera, multi-step conversation with player choices).
2. Cooking
Use the `stove` item (you must also carry a `gas_tank`), place the prop with the preview (`E` place, arrows rotate, `Backspace` cancel). Both items are consumed.
Target the stove → Cook opens the NUI (cinematic camera around the pot). Drag every ingredient into the pot, then hold Space to keep the heat inside the green zone.
3. Overheating
Above the burn threshold for 3s → the batch is scorched, progress resets, and there is a `Config.ExplosionChance` chance the stove explodes.
4. Quality: time spent in the green zone determines the batch quality (1–3 stars, shown on the success screen and stored in item metadata). Quality carries through heating and smoking and affects the high per puff (`Config.QualityHigh`).
5. Cooling: after a successful cook the product is NOT given immediately — the stove enters a 60s cooling phase (`Config.CoolingTime`) with a synced 3D `COOLING m:ss` counter visible to everyone within `Config.CoolingTextDistance`. Afterwards the Collect Crack target option hands over the batch. The stove cannot be picked up or reused while a batch is pending.
3. Heating & smoking
Use the `spoon` item (requires `lighter` + `crack`) → heating animation with props → converts `crack` into `crack_ready` (metadata preserved).
Use the `crack_pipe` item (requires `crack_ready`) → smoke session: `E` smoke, `G` pass the pipe to a nearby player, `X` stop. While puffing, a smoke particle plays at the ped's head — synced to all players via statebag.