Exports and Events

Use the public exports and events for integrations.

Prefer these over internal hooks.

Client exports

These are the public client exports documented for Pawnshop.

OpenManagementNUI(shopName, context)

Opens the management UI for a specific shop.

Parameters:

  • shopName - shop identifier string

  • context - optional table with extra context data

exports['envi-pawnshop']:OpenManagementNUI('Harrison\'s Pawn Shop')

With context:

exports['envi-pawnshop']:OpenManagementNUI('Harrison\'s Pawn Shop', {
    tab = 'exports',
    source = 'my-resource'
})

CloseManagementNUI()

Closes the management UI if it is open.

IsManagementNUIOpen()

Returns whether the management UI is currently open.

Returns:

  • boolean

GetCurrentShopName()

Returns the current shop name being managed.

Returns:

  • string|nil

SendUINotification(message, type, duration)

Sends a notification into the Pawnshop UI.

If the UI is closed, it falls back to the framework notification path.

Parameters:

  • message - notification text

  • type - success, error, warning, or info

  • duration - optional duration in ms

PlayUISound(sound)

Plays a UI sound effect.

Parameters:

  • sound - sound name string

CleanupExportDelivery()

Cleans up an active export delivery flow.

Use this when your integration cancels or forcibly resets a delivery.

CleanupSupplierMission()

Cleans up an active supplier or collection mission.

IsSupplierMissionActive()

Returns whether the local player currently has an active supplier mission.

Returns:

  • boolean

Example export usage

Open the UI only if it is not already open

Send a UI notification only when the player is inside Pawnshop UI

Get the current managed shop and branch your logic

Reset both mission types during a forced cleanup

Last updated