Installation
1. Dependencies
Make sure these are installed and started before the mission system:
- vns-core - separate free download from your Keymaster/cfx Portal. It is not included in the script's zip.
- ox_lib
- Your framework:
qb-core,qbx_coreores_extended - A supported inventory (see vns-core)
The script itself has no database tables and no framework settings. vns-core detects your framework, inventory and notification system.
2. Resource
Copy vns-missionsystem into your resources and add it to server.cfg after vns-core:
ensure ox_lib
ensure oxmysql
# your framework and inventory
ensure vns-core
ensure vns-missionsystem
Ensure order
vns-coremust be ensured after ox_lib, oxmysql (database), your framework, inventory, target system and your other server scripts such as housing, garages and phone.vns-missionsystemmust be ensured aftervns-core.
If vns-core starts too early, VNS scripts can't use your database, items, money or other systems. See Installing vns-core.
Do not rename the folder
The resource checks its own name on start and refuses to run if the folder is not called exactly vns-missionsystem.
3. Items
The script has two kinds of missions.
USB missions (IsItem = true) start when a player uses an inventory item with the same name as the mission key. The default config ships two:
| Item | Used for |
|---|---|
blueusb |
Starts the blueusb mission |
redusb |
Starts the redusb mission (the hardest default mission) |
The USB is removed once a free mission location has been assigned. Add both items to your inventory with exactly these names. Any new USB mission you add in Config.Reward needs a matching inventory item too. The script registers the items as usable through vns-core by itself; you only have to define them in your inventory.
Money missions (IsItem = false) need no item. They cost money and are started by an event from your own scripts (an NPC, a target option, a laptop). The default config ships two:
| Mission | Price |
|---|---|
missionEasy |
300 |
missionHard |
600 |
See Configuration for how to start them.
Also make sure every reward item in Config.Reward exists in your inventory.
4. First start
- Start the server and check the console for errors.
- Give yourself a
blueusband use it. You should get a "follow your GPS" notification and a route to a random location. - Drive there, kill the NPCs, press E at the red marker to steal and collect the rewards.
Escrow note
The encrypted version keeps config.lua, client/client_open.lua and server/server_open.lua editable. Missions, locations, rewards and language strings are in config.lua. The open version is fully editable.
Updating from the previous version
- vns-core is now required. Download it separately from your portal and start it before
vns-missionsystem. - Removed config options:
Config.Framework,Config.FrameworkFolder,Config.Notification,Config.TargetSystemandConfig.Inventory. Framework, inventory and notification handling moved to vns-core; force a system invns-core/config.luaif auto-detection doesn't fit your server. - The QBox manifest step is gone.
fxmanifest.luano longer loads@qbx_core/modules/playerdata.lua, so there is nothing to comment in or out. - oxmysql is no longer a dependency of this script (vns-core still uses it).
- core_inventory and ESX's built-in inventory now work through vns-core. The old
esx_inventoryhudoption no longer exists. - All other options (
Config.Progress,Config.Lang,Config.DrawDistance,Config.Cooldown,Config.Reward,Config.Weapons,Config.MissionPosition, combat tuning) are unchanged. You can copy those sections from your old config. - If you edited
client/client_open.luaorserver/server_open.lua, redo your changes on the new files. They now call vns-core instead of framework code.