VNS Mission System
A combat mission script for FiveM. Players start a mission from a usable item (a "USB") or a paid trigger, get a GPS route to a random location, fight off a group of armed NPCs and steal the loot for randomized item rewards.
Framework and inventory compatibility comes from vns-core, a separate free download:
- Frameworks: QBCore, QBox, ESX
- Inventories: ox_inventory, qb-inventory, qs-inventory, origen_inventory, codem-inventory, tgiann-inventory, core_inventory, ESX's built-in inventory
- Requires vns-core and ox_lib
Feature overview
- Two ways to start - a mission is either a usable inventory item (the item is consumed) or an event other scripts can trigger, with an optional cash price.
- Random locations - each mission draws a random spot from its location pool. Spots in use by another player are skipped and synced across all clients, so two players don't get the same one.
- Configurable enemies - per mission: bot count, health, armor, accuracy, vision range, combat ability and movement style, firing pattern, ped models and a weapon tier from 4 predefined pools (pistols up to Mk2 rifles).
- Two spawn modes - bots either spawn at random positions around the loot, or at hand-placed coordinates per location for scripted defensive setups.
- Randomized rewards - each mission rolls a number of reward attempts, each with a configurable chance and a min/max amount per item.
- Per-player cooldown - one shared cooldown across all missions, enforced server side.
- Translatable - all player-facing strings live in
Config.Lang.
How a mission plays out
- The player uses the mission item (or your script triggers the start event).
- A blip with a GPS route appears at a random free location from the mission's pool.
- When the player gets within 350m, the area is cleared of ambient peds and the NPCs spawn.
- At the red marker, the player presses E and steals for 15 seconds (ox_lib progress bar).
- The NPCs despawn, the location is freed and the server rolls the reward items.
Open vs Encrypted
The script is sold in an open and an encrypted variant. In both versions config.lua, client/client_open.lua and server/server_open.lua are editable. All balancing, locations, rewards and texts live in config.lua; the two open files contain the calls to vns-core (notifications, items, money, usable items). See Open Source & Encrypted Versions.