📚
Dusa all scripts documentation
  • Home
  • General Questions
    • Escrow System
    • Error parsing script ... <\1>
    • Failed to verify protected resource
    • You lack the required entitlement
    • If nothing fixed your problems
  • Need Help?
  • Scripts
    • Police Job
      • Installation
      • Configuration
      • Client
        • Exports
        • Events
      • Server
        • Callbacks
      • Common Issues
    • Evidence
      • Installation
      • Configuration
      • Client
        • Events
      • How to add custom weapon compatibility?
      • Common Issues
    • Hud
      • Installation
      • Configuration
      • Client
        • Events
        • Exports
      • Server
        • Events
    • Vehicle Keys
      • Installation
      • How to give keys to player? (e.g on dealerships)
      • Client
        • Exports
        • Events
      • Server
        • Exports
        • Events
    • Billing
      • Installation
      • Configuration & Exports (ESX)
      • Configuration & Exports (QB)
    • Police MDT
      • Installation
      • Configuration & Exports (ESX/QBCore)
    • Dispatch
      • Installation
      • On other resources, how can I integrate dispatch?
      • How to send custom dispatch?
      • Client
        • Exports
        • Events
        • Handlers
      • Server
        • Exports
    • Multicharacter + Spawn Selector
      • Installation
      • Configuration & Exports (ESX)
      • Configuration & Exports (QB)
Powered by GitBook
On this page
  • Export List
  • How to use exports?
  1. Scripts
  2. Police Job
  3. Client

Exports

Export List

export
parameters
return
description

OpenBoss

none

none

Open Boss Menu

OpenJail

none

none

Open Jail Input Menu

OpenFine

none

none

Open Billing Input Menu

OpenService

none

none

Open Public Service Input Menu

IsHandcuffed

none

bool

Returns if player is cuffed or not

SearchPlayer

none

none

Open closest player inventory

SeizeCash

none

none

Seize closest player cash

RobPlayer

none

none

Rob closest player

OpenJobMenu

none

none

Open F6 Police Job Menu

AttachWheelLock

none

none

Attach wheel lock to vehicle wheel

RemoveWheelLock

none

none

Detach wheel lock from wheel

ShowBadge

none

none

Show officer's badge

EditBadge

none

none

Open badge edit input

SetCallsign

callsign: string

none

Set callsign to defined value

OpenRadio

none

none

Open radio

OpenGps

none

none

Open gps device

PlaceGps

none

none

Place gps to nearby vehicle

RemoveGps

none

none

Remove attached gps from nearby vehicle

PanicButton

coords: vec3, name: string

none

Create panic button notification

How to use exports?

Exports are used for different purposes in different places. For example, if I want to turn on the GPS and do it with a command (normally, this is already available in the police job, but I'm explaining it just as a code example), I need to use the following code:

-- Open GPS Command
RegisterCommand('opengps', function()
    exports['dusa_police']:OpenGps()
end)

If the export requires various parameters, we need to provide the correct data. I am writing an

  1. SetCallsign export:

RegisterCommand('setcallsign', function(_, args)
    local callsign = args[1] -- args[1] equals to player's first input after command. Like /setcallsign AAA-111
    exports['dusa_police']:SetCallsign(callsign)
end)
  1. PanicButton export:

RegisterCommand('panic', function()
    local playerPed = PlayerPedId()
    local playerCoords = GetEntityCoords(playerPed)
    local playerName = GetPlayerName()
    exports['dusa_police']:PanicButton(playerCoords, playerName)
end)

If an export returns data and you want to obtain this data, you can refer to the following examples

RegisterCommand('amicuffed', function() -- returns if player is cuffed
    local isCuffed = exports['dusa_police']:IsHandcuffed()
    print(isCuffed) -- prints true or false
end)
PreviousClientNextEvents

Last updated 6 months ago