Skip to main content

Exports

Documented exports for Wasabi Police Job V2 (wasabi_police_v2).


Client exports

getAllStations

Return all active police stations and their configured locations.

local stations = exports['wasabi_police_v2']:getAllStations()

Returns: table[]

OpenJobMenu

Open the configured police job menu for the local player.

exports['wasabi_police_v2']:OpenJobMenu()
openJobMenu

Compatibility alias for OpenJobMenu.

exports['wasabi_police_v2']:openJobMenu()

Player interactions

HandcuffPlayer

Handcuff a nearby player using soft or hard restraint flags.

local success = exports['wasabi_police_v2']:HandcuffPlayer(targetServerId, cuffType)
ParameterTypeRequiredDescription
targetServerIdnumberYesPlayer server ID.
cuffType'soft' | 'hard'NoRestraint type. Defaults to soft.

Returns: booleantrue when the cuff action is accepted; otherwise false.

EscortPlayer

Toggle escorting the nearest canonically restrained player within 2 meters. Calling it again while escorting stops the current escort.

local handled = exports['wasabi_police_v2']:EscortPlayer()

This export is available to all jobs. The server verifies canonical restraint, proximity, and escort ownership.

Returns: booleantrue when the escort state is changed; otherwise false.

searchPlayer

Search a nearby player's inventory through the configured inventory provider.

local handled = exports['wasabi_police_v2']:searchPlayer(targetServerId)
local handledNearest = exports['wasabi_police_v2']:searchPlayer()
ParameterTypeRequiredDescription
targetServerIdnumberNoPlayer server ID. Omit to search the nearest eligible player within 3 meters.

The target must be canonically cuffed or ziptied, or using the Police V2 handsUp or kneel surrender mode. The search runs a cancellable 3-second progress action and is rejected if the target becomes ineligible, leaves range, or is already being searched. This export is available to all jobs.

Returns: booleantrue when the inventory search is opened; otherwise false.

putInVehicle

Put the player currently escorted by the local player into the nearest free rear seat of an unlocked vehicle within 4 meters.

local handled = exports['wasabi_police_v2']:putInVehicle()

The server verifies escort ownership, canonical restraint, proximity, vehicle lock state, and seat availability.

Returns: booleantrue when the escorted player is placed in the vehicle; otherwise false.

takeOutFromVehicle

Remove the nearest canonically restrained rear passenger from the closest vehicle within 4 meters.

local handled = exports['wasabi_police_v2']:takeOutFromVehicle()

The server verifies the passenger, restraint state, vehicle seat, and proximity before removing them.

Returns: booleantrue when the passenger is removed; otherwise false.

Bodycam

ToggleBodyCam
exports['wasabi_police_v2']:ToggleBodyCam(true) -- start
exports['wasabi_police_v2']:ToggleBodyCam(false) -- stop
exports['wasabi_police_v2']:ToggleBodyCam() -- toggle

Pass true to start, false to stop, or omit the argument to toggle the local player's bodycam.

IsBodyCamActive
local active = exports['wasabi_police_v2']:IsBodyCamActive()

Returns: boolean

CCTV and radar

GetCCTVCameras

Return the CCTV cameras currently available on the client.

local cameras = exports['wasabi_police_v2']:GetCCTVCameras()

Each entry includes id, name, coords, broken, and job.

OpenCCTV

Open a CCTV camera feed by database ID.

local opened = exports['wasabi_police_v2']:OpenCCTV(cameraId)

Returns: booleanfalse when the camera is not available locally.

GetRadarPosts

Return synchronized persistent radar posts.

local posts = exports['wasabi_police_v2']:GetRadarPosts()

Each entry includes id, coords, limit, and unit.

Client and server exports

isPlayerCuffed

Check whether a player is currently cuffed.

-- Client: omit playerId to check the local player
local cuffed = exports['wasabi_police_v2']:isPlayerCuffed(playerId)

-- Server: playerId is required and cuffData is also returned
local cuffed, cuffData = exports['wasabi_police_v2']:isPlayerCuffed(playerId)
ParameterTypeRequiredDescription
playerIdnumberClient: No; Server: YesPlayer server ID. The client defaults to the local player.

Client returns: boolean

Server returns: boolean, table? — cuff state and canonical cuff data when available.

Server exports

GetPoliceCount

Return the number of on-duty police officers.

local count = exports['wasabi_police_v2']:GetPoliceCount()

Returns: number

getPoliceCount

Compatibility alias for GetPoliceCount.

local count = exports['wasabi_police_v2']:getPoliceCount()

Returns: number

FinePlayer

Charge a valid online player through the configured default billing bridge.

local success = exports['wasabi_police_v2']:FinePlayer(playerId, amount, reason)
ParameterTypeRequiredDescription
playerIdnumberYesPlayer server ID.
amountnumberYesPositive amount to charge.
reasonstringYesNon-empty fine description.

Returns: boolean

finePlayer

Compatibility alias for FinePlayer.

local success = exports['wasabi_police_v2']:finePlayer(playerId, amount, reason)
ParameterTypeRequiredDescription
playerIdnumberYesPlayer server ID.
amountnumberYesPositive amount to charge.
reasonstringYesFine description.

Returns: boolean

Jail

JailPlayer

Send a valid online player to jail.

local success = exports['wasabi_police_v2']:JailPlayer(playerId, sentence, reason)
ParameterTypeRequiredDescription
playerIdnumberYesPlayer server ID.
sentencenumberYesPositive whole-number sentence duration in seconds, up to the configured maximum.
reasonstringNoBooking reason, up to 255 characters.

Returns: boolean

jailPlayer

Compatibility alias for JailPlayer.

local success = exports['wasabi_police_v2']:jailPlayer(playerId, sentence, reason)
ParameterTypeRequiredDescription
playerIdnumberYesPlayer server ID.
sentencenumberYesSentence duration in seconds.
reasonstringNoBooking reason.

Returns: boolean

ReleasePlayerFromJail

Release a valid online player from jail early.

local success = exports['wasabi_police_v2']:ReleasePlayerFromJail(playerId)

Returns: boolean

releasePlayer

Compatibility alias for ReleasePlayerFromJail.

local success = exports['wasabi_police_v2']:releasePlayer(playerId)

Returns: boolean

GetJailTime

Return a player's remaining jail sentence.

local seconds = exports['wasabi_police_v2']:GetJailTime(playerId)

Returns: number — remaining sentence in seconds, or 0 when not jailed.

isPlayerInJail

Check whether a valid online player has an active jail sentence.

local jailed = exports['wasabi_police_v2']:isPlayerInJail(playerId)
ParameterTypeRequiredDescription
playerIdnumberYesPlayer server ID.

Returns: boolean

getJailTime

Compatibility alias for GetJailTime.

local seconds = exports['wasabi_police_v2']:getJailTime(playerId)

Returns: number — remaining sentence in seconds, or 0 when not jailed.

Player tracker

applyTracker
exports['wasabi_police_v2']:applyTracker(targetId)

Apply a system-owned tracker to a valid online player.

removeTracker
exports['wasabi_police_v2']:removeTracker(targetId)

Remove an active tracker and its persisted record.

isTracked
local tracked = exports['wasabi_police_v2']:isTracked(targetId)

Returns: boolean

MDT and investigation integration

GetLicenses

Return the current license state for an online player identifier.

local licenses = exports['wasabi_police_v2']:GetLicenses(identifier)

Returns: table|nil

GetEvidenceForSuspect

Return police evidence linked to a suspect identifier.

local evidence = exports['wasabi_police_v2']:GetEvidenceForSuspect(identifier)

Returns: table[]

info

Client exports must be called from client code and server exports from server code. Player parameters on server exports are FiveM server IDs unless stated otherwise.