IsPlayerAdmin
Whether the player is an admin.
A player the mode promoted with SetPlayerAdmin this session. It unlocks the server’s admin-only built-in commands
(/give, /tp, /kick, /objectinfo …) and whatever the mode gates on it.
Syntax
Section titled “Syntax”IsPlayerAdmin(pid)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
Returns
Section titled “Returns”boolean
Example
Section titled “Example”function OnPlayerCommandText(pid, cmd, args) if cmd == "arena" then if not IsPlayerAdmin(pid) then SendClientMessage(pid, COLOR_RED, "Admins only.") return true end moveArena(args) return true end return falseendSee also
Section titled “See also”SetPlayerAdmin · the Accounts, admins, bans and the audit group of the index
