Foltone — FiveM Script
Mobile illegal weapons van for FiveM. Random spawn, encrypted phone triangulation, 3D item preview, weapon customization, police & heat dynamics — everything you need to run a credible underground arms market.
Description
Foltone Blackmarket is a mobile illegal weapons van for your FiveM server. A van spawns at random locations across the map and stays for a configurable duration. Players locate it through an encrypted phone with progressive signal triangulation, then trade with the dealer through a modern interface featuring 3D item preview, weapon customization (components + tints) and full police & heat dynamics. The dealer flees when cops approach, and every purchase adds to the van's heat until forced despawn.
Features
Mobile Van & Discovery
- Random spawn cycle – configurable first spawn delay, lifetime & respawn cooldown
- 10 pre-configured locations across Los Santos & the countryside
- Avoid-previous-location logic – the van never spawns twice in a row at the same spot
- Encrypted phone item – burner phone revealing the van's position
- Authentic call animation with phone prop and ring sound
- Progressive signal triangulation – blip starts far & wanders, closes in over time
- Two-phase blip system : flashing search 161 then precise van location
- Optional permanent map blip with contact-item gating
Shop & Items
- Live 3D preview of any item with mouse-wheel zoom and rotation
- 4 categories – Weapons, Items (ammo), Protection, Customs
- Scratched-serial weapons – ox_inventory metadata marker for untraceable
- Stock variance per van (+/-30%) – no two vans are identical
- Price variance per van (+/-10%) – dynamic economy
- Reputation gate (optional hook) for tier-gated weapons
Weapon Customization
- Components – suppressor, scope, extended clip, tactical light
- Tints – standard, green, gold, pink, etc.
- Real-time preview – the component or tint applies live to the 3D model
- Only proposed for weapons the player already owns
- Weapon selector with arrows when the player owns multiple customizable weapons
- ox_inventory metadata persistence – components & tint survive sessions
- Native fallback applies the component on the equipped weapon as well
- Customs list auto-refreshes when buying a new weapon mid-session
Police & Heat
- Random police alerts with configurable per-purchase chance
- Heat system – each purchase accumulates heat on the van
- Automatic despawn + police blip when heat threshold is reached
- Cop-nearby detection – dealer flees if police enter the configured radius
- Heat decay over time – the van cools down between purchases
Modern UI — Dual Menu
- RageUI in-game native menu OR NUI HTML/CSS – same data, your choice
- Two RageUI themes : Classic (GTA V style) & Modern (dark with accent)
- Customizable banner texture (Gun Van, Gun Club, Gunrunning, Gun Mod)
- Customizable accent color & animation speed for the modern theme
- NUI theme – CSS variables exposed in config
Admin & Logging
- /bm_van spawn [idx] – force a van spawn (optional location index)
- /bm_van despawn – force immediate despawn
- /bm_van status – show current van state in console
- ACE permission + group fallback (admin, superadmin, god, owner)
- Discord webhook – embed with player, item & price for every purchase
- Automatic version check at startup with colored console banner
Compatibility
- ESX / QBCore / QBX / Standalone
- ox_inventory / qs-inventory / esx / qb-inventory
- ox_target / qb-target / qtarget / textUI fallback
- Notification hook in one line – plug okokNotify, mythic_notify, NUI custom, etc.
- Localization : English, French, Spanish included
- Fully configurable (config.lua)
Requirements
- ox_lib (required)
- ox_inventory (recommended for metadata persistence on customs)
- ox_target / qb-target / qtarget (optional – textUI fallback included)
Performance & Security
- Single network surface – one callback dispatcher with source/type validation
- Atomic transactions – money taken before custom applied, refund on apply failure
- Server-side distance check on every purchase
- Server-side weapon-ownership check for customs
- Idempotence check – cannot pay twice for the same component or tint
- Cooldown anti-spam on purchases (3s default)
- Quantity forced to 1 for weapons – no over-buy exploit
- Type-checked inputs on all server callbacks
- Optimized native caching client-side
- Automatic entity cleanup (van, ped, props, blips, anims)
- Escrow protected with editable config, locales, bridge & html files