Installation Guide
Step-by-step setup for oxide-newspaperjob.
Step-by-step setup for oxide-newspaperjob.
Prerequisites
Required resources
| Resource | Purpose |
|---|---|
ox_lib | Locale, callbacks, timers, UI helpers |
oxmysql | Database driver |
o-link | Framework and system abstraction used by this resource |
o-link expectations
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:
ensure ox_lib
ensure oxmysql
ensure o-link
ensure oxide-newspaperjobInstall the SQL table
Run sql/install.sql against your database.
This creates the unified progression table used by current Oxide jobs:
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.luashared/config/job.luashared/config/levels.luashared/config/locations.luashared/config/outfits.luashared/config/tutorials.luashared/config/vehicles.luashared/config/visuals.lua
See the Configuration Reference for the full reference.
Verification
ox_lib, oxmysql, o-link, and oxide-newspaperjob all load without dependency errors.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 summaryInventory 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
ammometadata 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:
['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 withweapon_. throwable = truelets the client throw flow use the metadata ammo count.- The
client.imageline reuses the bundledWEAPON_ACIDPACKAGE.PNG; drop aWEAPON_NEWSPAPER.pngintoox_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:
add_principal identifier.license:<their-license> group.admin
add_ace group.admin admin allowReplace <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 = falseIf 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.