Documentation/NEXM PestControl
NEXM PESTCONTROL / PRODUCT DOCUMENTATION

NEXM PestControl

Installation, configuration, gameplay flow, integrations and public client API for the commercial PestControl job.

v1.0.0PaidAsset EscrowPestVan included
Verified documentationBuilt from the supplied NEXM PestControl v1.0.0 release package, public config.lua, README and integration examples.
NEXM PESTCONTROL

Overview

v1.0.0

NEXM PestControl is a commercial pest-control job for FiveM with service calls, detector gameplay, locked-target distance guidance, rat bait-station placement, spray treatment, service completion and bank payouts.

Core dependencyNEXM Core
Work vehicleNEXM PestVan included
Default UI providerNEXM Notify
ProtectionCfx.re Asset Escrow
Gameplay loop

START SHIFT → FIND JOB → TRAVEL → DETECT → TARGET LOCKED → TREAT → PROPERTY CLEARED → BANK PAYOUT → NEXT JOB

NEXM PESTCONTROL

Requirements

nexm_coreRequired. Provides the NEXM abstraction layer, payout handling and temporary appearance recovery.
nexm_pestvanRequired runtime resource and included with the PestControl purchase.
nexm_notifyDefault/recommended notification and prompt provider. PestControl can be configured for custom/native alternatives.
Target resourcesNot required. ox_target and qb-target examples are optional bridge examples only.
NEXM PESTCONTROL

Installation

Install the delivered PestControl resource and the included PestVan resource, ensure NEXM Core is installed, then start resources in this order:

SERVER.CFGcfg
ensure nexm_core
ensure nexm_notify
ensure nexm_pestvan
ensure nexm_pestcontrol

nexm_notify is shown because it is the default/recommended provider. If you configure custom/native UI providers, follow that provider's own start-order requirements.

Buyer configuration

Edit only config.lua for supported customer configuration. Core gameplay, detector/treatment tuning, validation, anti-abuse and development helpers are protected.

NEXM PESTCONTROL

Configuration

The public config.lua exposes the supported customer-facing configuration surface.

Config.LocationsService-call locations, labels, areas and supported infestation types.
Config.Generator.basePayoutBase payout for rat and spray contracts.
Config.SeverityEasy, medium and hard treatment-point counts and payout multipliers.
Config.JobSearchMinimum/maximum job-search delay.
Config.DepotNPC, vehicle spawn/return, vehicle, plate and blip settings.
Config.WorkUniformWorkwear enablement, provider and male/female native clothing components.
Config.Notificationsnexm_notify, custom or native notification provider.
Config.InteractionPromptsnexm_notify, custom, native or none.
Config.Interactions.modeprompt for built-in E interactions or custom for external interaction bridges.
Config.DeviceUI.defaultKeyDefault service-device key. Shipped value: F6.

Custom hooks

CONFIG.LUALua
Config.CustomNotify = nil
Config.CustomPrompt = nil
Config.CustomVehicleKeys = nil
Config.CustomUniformApply = nil

Assign these functions only when integrating your own notification, prompt, vehicle-key or clothing system.

GAMEPLAY

Gameplay Flow

1 · START SHIFTBegin at the Pest Control depot and receive workwear/work vehicle.
2 · FIND JOBUse the service device to search for a service call.
3 · TRAVELGo to the assigned service location.
4 · DETECTUse detector guidance to locate the infestation point.
5 · TREATComplete rat bait-station or spray treatment as required.
6 · COMPLETEClear all required treatment points.
7 · PAYOUTCompleted contracts are paid to the player's bank account through NEXM Core.
GAMEPLAY

Service Device & Job Search

The service device is the player's job-search and detector interface. The public configuration exposes the default device key and the service-search timing window.

Default keyF6
Default search delay8–25 seconds

The shipped gameplay requires an active shift before the service device can be used. When work uniforms are enabled, the native work-uniform state is also part of the device-availability check.

GAMEPLAY

Service Locations

Config.Locations contains the service-call pool. Each entry defines an id, display label, area, center coordinates and supportedTypes.

CONFIG EXAMPLELua
{
    id = 'vespucci_alley',
    label = 'Vespucci Service Alley',
    area = 'Vespucci',
    coords = vector3(124.67, -1047.22, 29.21),
    supportedTypes = { 'rats', 'spray' }
}
Dynamic infestation anchors

The service location is not the final treatment marker. Infestation anchors are generated dynamically from nearby world props.

GAMEPLAY

Treatments

The public release exposes two contract/treatment types through location support and payout configuration:

RatsRat-control workflow with bait-station / trap treatment gameplay.
SpraySpray-treatment workflow.

Severity controls the configured number of treatment points and payout multiplier. Shipped defaults are easy = 2 points / 1.0×, medium = 3 points / 1.25×, hard = 4 points / 1.5×.

GAMEPLAY

Depot & Work Vehicle

The depot configuration controls the NPC location, vehicle spawn/return location, return radius, vehicle model, plate and map blip.

Default vehicle modelnexm_pestvan
Default plateNEXM PC
Vehicle includedYes — NEXM PestVan
Vehicle return radius4.5

Config.CustomVehicleKeys can be used to connect the spawned work vehicle to a server owner's vehicle-key resource.

GAMEPLAY

Work Uniform

Workwear is enabled by default and ships with configurable male/female native component presets. Config.WorkUniform.provider supports native or a custom adapter.

For a custom clothing system, assign Config.CustomUniformApply and return true when the request was handled.

GAMEPLAY

Economy & Payouts

Completed contracts are paid to the player's bank account through NEXM Core.

TypeBase payout
Rats300
Spray260

Severity multipliers are then configured as easy 1.0×, medium 1.25× and hard 1.5× in the shipped public configuration. Server owners may tune these public values.

INTEGRATION

Notifications & Prompts

Notifications

CONFIGLua
Config.Notifications.provider = 'nexm_notify' -- nexm_notify | custom | native
Config.Notifications.fallbackToNative = true

Interaction prompts

CONFIGLua
Config.InteractionPrompts.provider = 'nexm_notify' -- nexm_notify | custom | native | none
Config.InteractionPrompts.position = 'bottom-center'
Config.InteractionPrompts.fallbackToNative = true

Custom notification and prompt adapters are supported through Config.CustomNotify and Config.CustomPrompt.

INTEGRATION

Interaction Integrations

PestControl does not hard-depend on ox_target or qb-target. To use an external interaction system, set:

CONFIGLua
Config.Interactions.mode = 'custom'

Then create the external target options/zones in a separate bridge resource and call PestControl's public client exports. PestControl remains responsible for validating the action and running the actual shift/treatment logic.

Included examples

The purchase includes documented example bridges for ox_target, qb-target and a generic custom interaction system.

INTEGRATION

Public Client Exports

GetDepotPed()Returns the current depot ped entity or nil.
GetWorkVehicle()Returns the active work vehicle entity or nil.
IsShiftActive()Returns whether the PestControl shift is active.
CanStartShift()Returns whether a shift can currently be started.
StartShift()Requests shift start. Returns success state and may return an error message.
IsWorkVehicleReturned()Returns whether the assigned work vehicle is inside the configured return area.
CanEndShift()Returns whether the active shift can currently end.
EndShift()Requests shift end after vehicle-return validation.
GetCurrentTreatmentTarget()Returns current treatment context or nil. Context includes availability, type, coords, distance, radius, pointId and contractId.
CanTreatCurrentInfestation()Returns whether the current treatment target is available/in range.
TreatCurrentInfestation()Starts the current rat or spray treatment when valid.

External target example

CLIENT BRIDGELua
local pest = exports['nexm_pestcontrol']

if pest:CanStartShift() then
    pest:StartShift()
end

local ctx = pest:GetCurrentTreatmentTarget()
if ctx and ctx.available then
    pest:TreatCurrentInfestation()
end
REFERENCE

Appearance Recovery

NEXM Core stores the player's pre-shift appearance before PestControl workwear is equipped and restores it after normal shift end, reconnect and restart recovery.

Manual support command:

CLIENT COMMANDtext
/pestuniform restore
REFERENCE

Asset Escrow

Core Lua gameplay files are protected with Cfx.re Asset Escrow. Buyer-editable config.lua and integration examples remain open. NUI files remain readable because they are browser assets.

What you can edit

Use the public configuration and integration hooks rather than modifying protected core gameplay files.

REFERENCE

Troubleshooting

Device not availableConfirm the player has an active shift; when work uniforms are enabled, confirm workwear was equipped successfully.
Cannot end shiftThe assigned work vehicle must be returned inside the configured return radius before ending the shift.
Custom target does nothingSet interaction mode to custom, use the public exports from a separate bridge and respect the Can* checks.
Prompt/notify missingCheck the configured provider and fallback settings. nexm_notify is the default/recommended provider.
Uniform did not restoreUse /pestuniform restore to retry pending PestControl clothing recovery.
PestVan missingEnsure the included nexm_pestvan resource starts before nexm_pestcontrol.
SUPPORT

Need help with NEXM PestControl?

Use the NEXM support page for installation, configuration and integration questions.

Open Support