> For the complete documentation index, see [llms.txt](https://docs.rainmad.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rainmad.com/resources/id-card/exports.md).

# 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) |
