# 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 %}
