# Exports and Events

## CreateDocument

With following event you are able to create document for player.

{% tabs %}
{% tab title="Client Side" %}

* documentType `string`
* photo `string`

```lua
TriggerServerEvent('p_documents:CreateDocument', {
   type = documentType,
   photo = photo
})
```

{% endtab %}
{% endtabs %}

### Example of Usage

<pre class="language-lua"><code class="lang-lua">local documentType = 'idcard' -- idcard / driver / weapon / doj / mechanic
<strong>local photo = exports["MugShotBase64"]:GetMugShotBase64(PlayerPedId(), false)
</strong><strong>TriggerServerEvent('p_documents:CreateDocument', {
</strong>   type = type,
   photo = photo
})
</code></pre>

***

## ShowBusinessCard

With this event you can show business card for nearest players.

{% tabs %}
{% tab title="Client Side" %}

```lua
TriggerServerEvent('p_documents:showBusinessCard')
```

{% endtab %}
{% endtabs %}

***

## ShowBadge

With this event you can show badge for nearest players.

{% tabs %}
{% tab title="Client Side" %}

```lua
TriggerServerEvent('p_documents:showBadge')
```

{% endtab %}
{% endtabs %}
