# sam.Player.get\_exclusive

> #### [string](https://wiki.facepunch.com/gmod/string) || nil sam.Player.get\_exclusive( [player](https://wiki.facepunch.com/gmod/player) ply,  *(*[*optional*](https://sam.goobie.me/info-read/optional)*)* [player](https://wiki.facepunch.com/gmod/player) admin )

## Description

Get exclusive reason for a player if he has one.

## Aguments

1. #### [string](https://wiki.facepunch.com/gmod/string) id
2. #### *(*[*optional*](https://sam.goobie.me/info-read/optional)*)* [player](https://wiki.facepunch.com/gmod/player) admin

   If used inside a command then pass the player/admin who ran the command to it.

## Returns

1. [**string**](https://wiki.facepunch.com/gmod/string) **||** [**nil**](https://wiki.facepunch.com/gmod/nil)

   Exclusive reason if it exists.

## Example

```lua
local ply = Player(1)
sam.Player.set_exclusive(ply, "jailed")

local exclusive = sam.Player.get_exclusive(ply)
if exclusive then
    print(exclusive) -- prints "Player is jailed!"
    return
end
```
