IsPlayerAdmin
Whether the player is an admin.
A logged-in owner of a name on [accounts] admins, or a player the mode promoted with SetPlayerAdmin. It unlocks the
server’s admin-only built-in commands 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, COLOUR_RED, "Admins only.") return true end moveArena(args) return true end return falseendSee also
Section titled “See also”SetPlayerAdmin · GetAdminNames · IsPlayerLoggedIn · the Accounts, admins, bans and the audit group of the index
