#How to detect if a player is an admin

1 messages · Page 1 of 1 (latest)

final wigeon
#

i never used adonis before

deft stratus
#

_G.Adonis.CheckAdmin(playerObject)

-> true if level > 0
-> false if non-admin (level <= 0)

#

Or to get a specific admin level use _G.Adonis.GetLevel(playerObject) -> the admin level of a player (number)

final wigeon
#

do i put in inside the plugin thing?

#

@deft stratus

deft stratus
#

if inside of a plug-in just do server.Admin.CheckAdmin

#

If external script use the _G variant

#

This only works on the server btw

final wigeon
#

game.Players.PlayerAdded:Connect(function(player)
end)

#

can i use this ?

final wigeon
final wigeon
# deft stratus
    task.wait()
    if _G.Adonis.CheckAdmin(player) == 1  then
        print("Admin")
    else
        print("No admin")
    end
end)```
#

v

deft stratus
#

_G.Adonis has yet to be set yet

final wigeon
#

🤔

deft stratus
#

you may have to repeat task.wait() until _G and _G.Adonis

final wigeon
#

k

#

well ty

final wigeon
deft stratus
#

Yes