🟦sam.Player.get_exclusive

string || nil sam.Player.get_exclusive( player ply, (optional) player 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. string || nil

    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