> For the complete documentation index, see [llms.txt](https://docs.l2s.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.l2s.dev/assets-and-guides/paint-ball/exports.md).

# Exports

## Get Player State

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

```lua
--- This function checks if a player is in a paint ball game
--- @return boolean - Returns true if the player is in paintball game, false otherwise

-- Client-side: Check if the player is in a property block
exports['l2s-paintball']:IsPlayerInPB()
```

{% endtab %}

{% tab title="Server" %}

```lua
--- This function checks if a player is in a paint ball game
--- @param source integer - The identifier of the player to check
--- @return boolean - Returns true if the player is in paintball game, false otherwise

-- Server-side: Check if the player is in a property block
exports['l2s-paintball']:IsPlayerInPB(source)
```

{% endtab %}

{% tab title="Example" %}
Client:

```lua
if exports['l2s-paintball']:IsPlayerInPB() then
	QBCore.Functions.Notify('You are in paintball match', 'error')
	return
end
```

Server:

```lua
if exports['l2s-paintball']:IsPlayerInPB(source) then
	TriggerClientEvent('QBCore:Notify', source ,'You are in paintball match', 'error' )
	return
end
```

{% endtab %}
{% endtabs %}
