# Exports

### Server Exports

**createCard**

```lua
local success, serial, metadata = exports.rm_idcard:createCard(playerId, item)
```

| Parameter | Type   | Description                                     |
| --------- | ------ | ----------------------------------------------- |
| playerId  | number | Server ID of the player                         |
| item      | string | Valid card type from config (e.g., `'id_card'`) |

**getMugshot**

```lua
local mugshotBase64 = exports.rm_idcard:getMugshot(playerId)
```

| Parameter | Type   | Description             |
| --------- | ------ | ----------------------- |
| playerId  | number | Server ID of the player |

### Client Exports

**getMugshot**

```lua
local mugshotBase64 = exports.rm_idcard:getMugshot(ped)
```

| Parameter | Type   | Description                                                                                                          |
| --------- | ------ | -------------------------------------------------------------------------------------------------------------------- |
| ped       | number | The entity ID of the ped to capture the mugshot from. If left empty, it defaults to the current player (LocalPlayer) |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rainmad.com/resources/id-card/exports.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
