🟦sam.Player.get_exclusive

stringarrow-up-right || nil sam.Player.get_exclusive( playerarrow-up-right ply, (optional) playerarrow-up-right admin )

Description

Get exclusive reason for a player if he has one.

Aguments

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

Returns

  1. stringarrow-up-right || nilarrow-up-right

    Exclusive reason if it exists.

Example

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

Last updated