Exports

Available exports for you to utilise from Possible Armoured Trucks.

The police chase functionality is available to be utilised in external scripts through exports. Below are the available exports and their usage.

startPoliceChase

This export is used to start a comprehensive police chase with customisable options. It activates the full police response system with waves, helicopters, roadblocks, and more based on your armoured trucks config.

Lua
exports['possible_armoured_trucks']:startPoliceChase(options)

📥 Parameters

NameTypeRequiredDescription
optionstable❌Configuration table for the police chase. All options default to true if not specified.

Options Table

OptionTypeDefaultDescription
enableRegularbooleantrueWhether to spawn regular police cars
enableSwatbooleantrueWhether to spawn SWAT vehicles (after configured wave delay)
enableBikesbooleantrueWhether to spawn police motorcycles
enableHelicopterbooleantrueWhether to spawn police helicopter (after configured delay)
enableRoadblocksbooleantrueWhether to create roadblocks ahead of player
enableWavesbooleantrueWhether to spawn additional waves of reinforcements

🧩 Example

Lua
exports['possible_armoured_trucks']:startPoliceChase({    enableRegular = true,    enableSwat = true,    enableBikes = true,    enableHelicopter = true,    enableRoadblocks = true,    enableWaves = true})

stopPoliceChase

This export stops and cleans up all active police chase entities including vehicles, peds, helicopters, and roadblocks.

Lua
exports['possible_armoured_trucks']:stopPoliceChase()

🧩 Example

Lua
exports['possible_armoured_trucks']:stopPoliceChase()

clearPoliceWantedLevel

This export clears the player's wanted level and optionally disables dispatch services based on your configuration.

Lua
exports['possible_armoured_trucks']:clearPoliceWantedLevel()

🧩 Example

Lua
exports['possible_armoured_trucks']:clearPoliceWantedLevel()

spawnPoliceVehicles

This export spawns a specific number of police vehicles with the option to include SWAT units.

Lua
exports['possible_armoured_trucks']:spawnPoliceVehicles(numVehicles, includeSwat)

📥 Parameters

NameTypeRequiredDescription
numVehiclesnumber❌Number of vehicles to spawn. Defaults to 2 if not specified.
includeSwatboolean❌Whether to spawn SWAT vehicles instead of regular police. Defaults to false.

🧩 Example

Regular Police:

Lua
exports['possible_armoured_trucks']:spawnPoliceVehicles(3, false)

SWAT Units:

Lua
exports['possible_armoured_trucks']:spawnPoliceVehicles(2, true)

Default:

Lua
exports['possible_armoured_trucks']:spawnPoliceVehicles()

spawnPoliceBikes

This export spawns police motorcycles for pursuit.

Lua
exports['possible_armoured_trucks']:spawnPoliceBikes(numBikes)

📥 Parameters

NameTypeRequiredDescription
numBikesnumber❌Number of police bikes to spawn. Defaults to 2 if not specified.

🧩 Example

Lua
exports['possible_armoured_trucks']:spawnPoliceBikes(3)

spawnPoliceHelicopter

This export spawns a police helicopter for aerial pursuit. Only one helicopter can be active at a time.

Lua
exports['possible_armoured_trucks']:spawnPoliceHelicopter()

🧩 Example

Lua
local success = exports['possible_armoured_trucks']:spawnPoliceHelicopter()if not success then    print("Helicopter already active or failed to spawn")end

createPoliceRoadblock

This export creates a police roadblock ahead of the player's current position and direction.

Lua
exports['possible_armoured_trucks']:createPoliceRoadblock()

🧩 Example

Lua
local success = exports['possible_armoured_trucks']:createPoliceRoadblock()if not success then    print("Maximum roadblocks already active")end
JDB-NET Logo
Partner Service

Self-hosted unlimited logs with managed Grafana

JDB-NET provides a self-hosted solution with unlimited logs, a fully managed Grafana instance, and unlimited users. Perfect for FiveM servers that need comprehensive logging and monitoring.

Check out JDB-NET