Skip to content

Installation

1. Dependencies

Make sure these are installed and started before the newspaper job:

  • 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_core or es_extended
  • A supported inventory and target system (see vns-core)

The script has no database tables and no framework, inventory, target or notification settings of its own. vns-core detects all of these.

2. Resource

Copy vns-newspaperjob into your resources and add it to server.cfg after vns-core:

ensure ox_lib
ensure oxmysql
# your framework, inventory and target system

ensure vns-core
ensure vns-newspaperjob

Ensure order

  • vns-core must be ensured after ox_lib, oxmysql (database), your framework, inventory, target system and your other server scripts such as housing, garages and phone.
  • vns-newspaperjob must be ensured after vns-core.

If vns-core starts too early, VNS scripts can't use your database, items, money or other systems. See Installing vns-core.

Folder name

The folder must be named vns-newspaperjob. Both the client and server script check the resource name on start and refuse to run under any other name.

3. Newspaper item

The script hands out the newspaper as the throwable item weapon_acidpackage (the GTA acid package weapon). Players throw it at the drop markers to deliver. Make sure this item exists in your inventory as a usable weapon item, otherwise players cannot receive or throw their newspapers. Players receive two per drop point when they start a route, and leftovers are removed when they finish.

If you use a bonus item (Config.BonusItem, default mysterious_envelope), that item must exist in your inventory too.

4. Target

The start and finish options on the job ped are created through your target system via vns-core. There is no alternative interaction, so a supported target resource (ox_target, qb-target or qtarget) is required.

5. Job restriction (optional)

By default anyone can work. To restrict the job:

Config.RequireJob = true
Config.JobName    = 'newspaperjob'

Then create that job in your framework (shared/jobs.lua for QBCore, qbx_core/shared/jobs.lua for QBox, the jobs database table for ESX) and assign it to players as usual. The check compares the player's active job name against Config.JobName, on both client and server.

6. Vehicle keys & fuel (optional)

If your server needs keys or a fuel script call for spawned vehicles, add it to Bridge.OnJobVehicleSpawned(vehicle, plate) in client/client_open.lua. It runs for new routes and for resumed routes. The script already sets the fuel level to 100 with the native.

7. First start

  1. Start the server and check the console for errors.
  2. Head to a start ped (marked with a newspaper blip on the map) and start a route.

Escrow note

config.lua, client/client_open.lua and server/server_open.lua stay editable in the encrypted version. Everything on this page and the Configuration page can be changed in both versions.

Updating from the previous version

  • vns-core is now required. Download it separately from your portal and start it before vns-newspaperjob.
  • Removed config options: Config.Framework, Config.ESXExport, Config.QBExport, Config.Target, Config.TargetSystem, Config.Inventory, Config.Notification and Config.MustDeliverAll. Framework, inventory, target and notification selection moved to vns-core (vns-core/config.lua).
  • Standalone mode was removed. The script now needs QBCore, QBox or ESX.
  • Target is always used. There is no Config.Target = false anymore; the start ped always uses your target system.
  • Bonus chance default fixed. Config.BonusItem.chance now defaults to 1 (1 in 1000). The old default of 1000 gave the bonus on every completed route. If you copy your old config, check this value.
  • Renamed bridge files: client/open_client.lua / server/open_server.lua are now client/client_open.lua / server/server_open.lua. If you edited them, redo your changes on the new files; they now call vns-core.
  • New hook: Bridge.OnJobVehicleSpawned for vehicle keys and fuel scripts.
  • Supported inventories changed. ps-inventory and lj-inventory are no longer listed; origen_inventory, codem-inventory, tgiann-inventory and ESX's built-in inventory were added through vns-core.
  • oxmysql is no longer a dependency of this script (vns-core still uses it).
  • Routes, blips, payment options and Config.Lang are unchanged and can be copied over.