> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_tattoos/api/client.md).

# Client

All client-side events for `rcore_tattoos`.

***

## Events

<details>

<summary>setPedTattoos</summary>

Applies tattoos to the ped of the player.

```lua
---@param ped number                        - ped to apply tattoos to
---@param tattoos table                     - table of tattoos to apply (must be in format returned by server event `getPlayerTattoosByIdentifier`)
---@param disableClearCurrentTattoos? bool   - if true, does not clear current tattoos on the ped before applying new ones (default false)

TriggerEvent('rcore_tattoos:setPedTattoos', ped, tattoos, disableClearCurrentTattoos)
```

</details>

<details>

<summary>applyOwnedTattoos</summary>

Resets & re-applies the player's tattoos. Useful when another script resets player tattoos.

From server:

```lua
TriggerClientEvent('rcore_tattoos:applyOwnedTattoos', playerId)
```

From client:

```lua
TriggerEvent('rcore_tattoos:applyOwnedTattoos')
```

You can also add an extra parameter so tattoos will not clear all player decorations and only add new ones.

From server:

```lua
---@param playerId number
---@param withoutClearingTattoos bool

local withoutClearingTattoos = true
TriggerClientEvent('rcore_tattoos:applyOwnedTattoos', playerId, withoutClearingTattoos)
```

From client:

```lua
---@param withoutClearingTattoos bool

local withoutClearingTattoos = true
TriggerEvent('rcore_tattoos:applyOwnedTattoos', withoutClearingTattoos)
```

</details>

<details>

<summary>openTattooMenuForPlayer</summary>

Opens the tattoo menu for the client. Parameters are the same as the [server event](/paid-resources/rcore_tattoos/api/server.md#opentattoomenuforplayer) above.

To open the tattoo menu in default form for the client, call the event without any parameters.

```lua
TriggerServerEvent('rcore_tattoos:openTattooMenuForPlayer')
```

If you want to change parameters but still open the menu for the current client you are calling it from, set `playerId` as `nil`.

```lua
---@param playerId? number  - nil to target yourself
---@param onlyPreview? bool

-- just an example, adjust parameters to your need :)
local onlyPreview = true
TriggerServerEvent('rcore_tattoos:openTattooMenuForPlayer', nil, onlyPreview)
```

</details>

<details>

<summary>reloadBusinessMarkers</summary>

Manually reloads business bossmenu markers - checks player job, whether they are boss of a certain business, and whether to render the business bossmenu marker.

```lua
TriggerEvent('rcore_tattoos:reloadBusinessMarkers')
```

{% hint style="info" %}
You can also use `Config.JobReloadDelay` to do this automatically after a set delay when the script loads. More info in the [Config](/paid-resources/rcore_tattoos/configs/config.md) section.
{% endhint %}

</details>

<details>

<summary>resetPedDecorationsExtra (hook)</summary>

If you need to run code after this script resets all ped decorations (tattoos, hair fades...), take a look at `rcore_tattoos/client/api/helper.lua` at the function `resetPedDecorationsExtra`.

This is not an event, but a function you can extend directly in the file. It's useful for example to reapply hair fades from another script that gets cleared when tattoos reset.

If you do not understand what this means, you can simply ignore it.

</details>
