Installation Guide

Step-by-step setup for oxide-newspaperjob.

Step-by-step setup for oxide-newspaperjob.

Prerequisites

Required resources

ResourcePurpose
ox_libLocale, callbacks, timers, UI helpers
oxmysqlDatabase driver
o-linkFramework and system abstraction used by this resource

This resource depends on your server's o-link setup for:

  • player identity and character lookup
  • notifications
  • phone messaging for shift emails
  • money handling
  • clothing and uniform management
  • vehicle keys
  • targeting for depot interactions
  • menu support when Config.menuStyle = 'menu'
  • progress bars
  • inventory support for weapon_newspaper

The route system gives and removes weapon_newspaper through olink.inventory, so your inventory integration must support that item and ammo metadata.

Installation

Place the resource

Place oxide-newspaperjob inside your server's resources folder.

Add startup order

Start dependencies before the job resource:

server.cfg
ensure ox_lib
ensure oxmysql
ensure o-link
ensure oxide-newspaperjob

Install the SQL table

Run sql/install.sql against your database.

This creates the unified progression table used by current Oxide jobs:

sql/install.sql
CREATE TABLE IF NOT EXISTS `job_progression` (
    `char_id`            VARCHAR(60)      NOT NULL,
    `job`                VARCHAR(40)      NOT NULL,
    `level`              TINYINT          NOT NULL DEFAULT 1,
    `total_count`        INT              NOT NULL DEFAULT 0,
    `daily_streak`       INT              NOT NULL DEFAULT 0,
    `last_activity_date` DATE             NULL,
    `complaints`         TINYINT UNSIGNED NOT NULL DEFAULT 0,
    `timeout_until`      DATETIME         NULL,
    PRIMARY KEY (`char_id`, `job`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

oxide-newspaperjob stores progression rows with job = 'newspaper'.

Migrate old data if needed

If your server is migrating from an older newspaper job install, run sql/migrate_unified_progression.sql once before moving to the unified progression table.

Review configuration

Adjust:

  • shared/config.lua
  • shared/config/job.lua
  • shared/config/levels.lua
  • shared/config/locations.lua
  • shared/config/outfits.lua
  • shared/config/tutorials.lua
  • shared/config/vehicles.lua
  • shared/config/visuals.lua

See the Configuration Reference for the full reference.

Verification

Start the server and confirm ox_lib, oxmysql, o-link, and oxide-newspaperjob all load without dependency errors.
Join the server and verify the newspaper depot blip appears on the map.
Walk to the depot NPC and confirm the third-eye target appears.
Clock in, confirm the BMX spawns, and let the first route auto-start.
Throw a newspaper at a marked house target and verify route progress, ammo tracking, and payout feedback work.

Optional Setup

Phone messaging

When Config.usePhone = true, the resource sends service emails through o-link.phone for shift start, bike loss, out-of-ammo incidents, death or hospitalization, and the detailed clock-out summary. Make sure your o-link phone module is configured for the phone resource your server uses.

Config.shiftSummary controls the immediate on-screen clock-out summary:

Config.shiftSummary = 'nui'   -- popup summary
Config.shiftSummary = 'text'  -- notification summary

Inventory setup

Routes add and remove a weapon_newspaper item through olink.inventory, with ammo passed as item metadata:

olink.inventory.AddItem(source, 'weapon_newspaper', 1, nil, { ammo = routeData.ammoCount })

Make sure:

  • your inventory integration recognizes weapon_newspaper
  • the ammo metadata key is preserved on add
  • the underlying throwable weapon flow works with WEAPON_ACIDPACKAGE

weapon_newspaper is not a real GTA weapon hash, so the inventory entry must point its underlying weapon model at WEAPON_ACIDPACKAGE. In ox_inventory, the model field overrides the key used for joaat(), so the item stays named weapon_newspaper while the game receives the real projectile.

Add to ox_inventory/data/weapons.lua under the Weapons table:

ox_inventory/data/weapons.lua
['WEAPON_NEWSPAPER'] = {
    label = 'Newspaper',
    weight = 50,
    throwable = true,
    model = 'WEAPON_ACIDPACKAGE',
    client = {
        image = 'WEAPON_ACIDPACKAGE.PNG',
    },
},

Notes:

  • Key must be upper-case WEAPON_NEWSPAPER; ox_inventory uppercases any lookup starting with weapon_.
  • throwable = true lets the client throw flow use the metadata ammo count.
  • The client.image line reuses the bundled WEAPON_ACIDPACKAGE.PNG; drop a WEAPON_NEWSPAPER.png into ox_inventory/web/images/ if you want a custom icon.

qb-inventory / qs-inventory / core_inventory: follow the QB Inventory Patch Guide for the stock qb-inventory + qb-weapons flow. Forks (qs, core, ps) follow the same approach but with different field names — consult that inventory's docs for the exact mapping.

Not supported out of the box — the route flow assumes per-item ammo metadata, which the default inventory does not provide.

Whichever inventory you use, confirm o-link's inventory module is pointed at it so olink.inventory.AddItem / RemoveItem reach the correct backend.

Admin permission for the depot builder

The /newspaperbuilder command (for adding your own depots and delivery houses) is admin only. It uses the same admin check as every Oxide resource, so there's nothing extra to set up per resource.

If you're already running QBCore, QBX, or ESX admins, those admins pass automatically — you don't need to do anything.

To make someone an admin, add them to the admin group and grant that group the admin ace by adding these two lines to your server.cfg:

server.cfg
add_principal identifier.license:<their-license> group.admin
add_ace group.admin admin allow

Replace <their-license> with the player's license identifier. See the Admin Tools page for how the builder works.

Uniform customization

Uniform support is disabled by default:

Config.uniformsEnabled = false

If you want the uniform option in the shift menu, enable it and replace the placeholder outfit values in shared/config/outfits.lua.

Notes for UI developers

The packaged web/dist build is already included and referenced by the manifest. Rebuilding the UI is only necessary if you edit files under web/src.

Next Steps