Installation Guide

Setup guide for oxide-landscapingjob.

Prerequisites

Required Resources

ResourceRequiredPurpose
ox_libYesLocale support, shared helpers, and UI utility usage
oxmysqlYesDatabase access
o-linkYesIntegration layer used by this job
xsoundNo3D mower audio

This resource uses o-link for:

  • callbacks
  • character identity lookups
  • notifications
  • phone/email delivery
  • local entity targets
  • help text
  • progress bars
  • context menus
  • clothing appearance changes
  • fuel and vehicle key helpers
  • money transactions
  • player-ready / player-unload lifecycle events

Make sure your o-link installation is working before starting this resource.

Installation Steps

1. Place the Resource

Put oxide-landscapingjob in your server's resources directory.

2. Ensure Dependencies First

Add the resource after its required dependencies in server.cfg:

ensure ox_lib
ensure oxmysql
ensure o-link
ensure xsound
ensure oxide-landscapingjob

xsound is optional. If it is missing, the resource prints a warning and disables mower audio.

3. Import the Database Schema

Import sql/install.sql. The current schema creates a unified job_progression table:

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;

This resource stores progression rows with job = "landscaping".

4. Run the Optional Migration If Needed

If you still have older per-job progression tables from previous Oxide job resources, run sql/migrate_unified_progression.sql once.

That migration:

  • creates job_progression if needed
  • moves old landscaping progression into the unified table
  • drops legacy job-specific progression tables after migration

Do not run the migration blindly on a live production database without backing it up first.

5. Review the Config

The resource is configured from:

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

Core toggles:

Config.Debug = false
Config.usePhone = true
Config.shiftSummary = 'text'
Config.menuStyle = 'nui'
Config.MaxSlotsPerLocation = 3

See the Configuration Guide for the full reference.

Verification

Startup Check

When the resource starts correctly, the server prints:

[oxide-landscapingjob] oxide-landscapingjob initialized

If o-link, ox_lib, or oxmysql are not running, startup prints dependency errors from shared/init.lua.

In-Game Check

  1. Join with a loaded character.
  2. Go to the configured landscaping office.
  3. Interact with the NPC manager.
  4. Open the shift menu.
  5. Clock in and confirm:
    • a van is spawned
    • yards are assigned
    • the yard blips and guidance appear

Mowing Check

  1. Drive to an assigned yard.
  2. Start the yard at the marker.
  3. Unload the mower from the van.
  4. Lower the blades with G.
  5. Confirm patches disappear and obstacle interactions work.

Optional Setup

Phone / Email Shift Messages

When Config.usePhone = true, the job sends service emails through olink.phone.SendEmail(...).

These messages are used for:

  • shift welcome
  • shift summary text output

If you disable Config.usePhone, the resource still uses normal notifications for immediate feedback.

Shift Summary Mode

Config.shiftSummary controls how the end-of-shift summary is delivered:

  • "text": send the summary through the phone/email flow
  • "nui": show the summary in the NUI flow

Config.menuStyle controls the manager UI:

  • "nui": Vue NUI shift menu, default
  • "menu": o-link context menu fallback

Uniforms

Uniform support is controlled in shared/config/outfits.lua:

Config.uniformsEnabled = true

When enabled, players can equip and remove uniforms from the shift menu while clocked in.

ACE Permissions

Builder commands require:

add_ace group.admin admin.landscapingjob allow

See the Admin Commands Reference for the full command list.