> For the complete documentation index, see [llms.txt](https://piotreq-scripts.gitbook.io/piotreq-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://piotreq-scripts.gitbook.io/piotreq-scripts/assets-and-guides/mechanic-mdt/licenses-system.md).

# Licenses System

1. Get Worker Licenses

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

```lua
ESX.TriggerServerCallback('piotreq_lst:GetPlayerLicenses', function(licenses)
    print(licenses) -- table
end, playerId)
```

{% endtab %}

{% tab title="Second Tab" %}

```lua
exports['piotreq_lst']:GetPlayerLicenses(playerId) -- table
```

{% endtab %}
{% endtabs %}

2. Check Worker License

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

```lua
ESX.TriggerServerCallback('piotreq_lst:CheckPlayerLicense', function(state)
    print(state) -- true or false
end, licenseName, playerId)
```

{% endtab %}

{% tab title="Server Side" %}

```lua
exports['piotreq_lst']:CheckPlayerLicense(playerId, licenseName)
```

{% endtab %}
{% endtabs %}
