# Exports

### Overview

The `SetupDigiScanner` function sets up the digital scanner specified parameters at the given coordinates. This documentation provides details on how to use the function, its parameters, and their expected values.

***

### Usage

```lua
exports['pengu_digiscanner']:SetupDigiScanner(vector3, parameters)
```

***

### Parameters

{% hint style="info" %}
`The '?'` symbol directly after a parameter means that parameter is not required unless defined otherwise.
{% endhint %}

* `vector3` (vector3): A vector3 coordinate where the digital scanner target will be located.
* `parameters` (table): A table containing parameters for setting up the digital scanner.
  * `event` (string): The event/command/action (function) associated with the digital scanner.
  * `args?` (table): Arguments for the event associated with the digital scanner.
  * `isServer?` (boolean): Specifies if the event type is a server side event or not.
  * `isCommand?` (boolean): Specifies if the event type is a command event or not.
  * `isAction?` (boolean): Specifies if the event type is an action (function) event or not.
  * `blip?` (table): Information for creating a blip for the digital scanner target.
    * `text?` (string): The text to be displayed on the blip.
    * `sprite` (integer): The sprite ID of the blip ([docs](https://docs.fivem.net/docs/game-references/blips/#blips)).
    * `display` (integer): The display ID of the blip ([docs](https://docs.fivem.net/natives/?_0x9029B2F3DA924928)).
    * `scale?` (integer): The scale of the blip (`1.0` is the normal size).
    * `color` (integer): The color ID of the blip ([docs](https://docs.fivem.net/docs/game-references/blips/#blip-colors)).
    * `opacity?` (integer): The opacity of the blip.
  * `interact?` (table): Information for the interaction scaleform.
    * `interactKey` (integer): Keycode Integer ([docs](https://docs.fivem.net/docs/game-references/controls/)).
    * `interactMessage` (string): Message next to the interact button scaleform.

***

### Example

```lua
local function DoAPrint(args)
    print('Good Job Pengu! '..args['bin'])
end

RegisterCommand('test', function ()
    exports['pengu_scaleform']:SetupDigiScanner(vector3(331.2, -1490.94, 29.27), {
        event = DoAPrint,
        isAction = true,
        args = {['bin'] = 'lol'},
        blip = {
            text = "Surprise Location",
            sprite = 9,
            display = 2,
            scale = 0.7,
            color = 2,
            opacity = 65,
        },
        interact = {
            interactKey = 38,
            interactMessage = 'View Print',
        }
    })
end)
```

<figure><img src="https://1478610690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZEMaPr7qM2c172TTI4lt%2Fuploads%2Fhxk7jLQYypEU01Gqzthl%2Fimage.png?alt=media&#x26;token=9e69aea1-3155-43e1-8d53-f9b599306365" alt="" width="375"><figcaption><p>Preview when facing away from target.</p></figcaption></figure>

<figure><img src="https://1478610690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZEMaPr7qM2c172TTI4lt%2Fuploads%2FrTgwYjPJdVzvYiyzwUg7%2Fimage.png?alt=media&#x26;token=1a42a152-8f32-4243-a348-570d3eb403a3" alt="" width="375"><figcaption><p>Preview when facing towards target (outside of target distance).</p></figcaption></figure>

<figure><img src="https://1478610690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZEMaPr7qM2c172TTI4lt%2Fuploads%2FiQTg3ilQtGem8gdVEeoK%2Fimage.png?alt=media&#x26;token=371eab70-9735-4415-8162-fec8fbb2be66" alt="" width="375"><figcaption><p>Preview inside target distance facing any direction.</p></figcaption></figure>

<figure><img src="https://1478610690-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZEMaPr7qM2c172TTI4lt%2Fuploads%2FxjeucbIs4AN9DMu8UfQK%2Fimage.png?alt=media&#x26;token=9bfe4ecc-9aed-4846-ab99-5fb00fae04fd" alt=""><figcaption><p>Preview of the blip created.</p></figcaption></figure>
