gms_self_admin_rights

Usage: gms_self_admin_rights ( )

Description

Returns what the player is allowed to do.

The following flags can be returned:

ar_kick: Allowed to kick
ar_ban: Allowed to ban
ar_owner: The player owns the game

Example

//Note the notation: & instead of =
if(gms_self_admin_rights() & ar_ban)
{
    //Player is allowed to ban
}else if(gms_self_admin_rights() & ar_kick)
{
    //Player allowed to kick
}

Replies (3)

Last message on 26 Nov 2017

Gamewolf10 on 26 Jun 2015, 22:39:39
Can you use just gms_self_admin_rights instead of the notation mark?
JamSnack on 26 Nov 2017, 16:39:06
The if statement is looking to prove if the player has the ability to do one of the three initially stated flags that may be returned (gms_self_admin_right()) and if the player is able to ban people. If gms_self_admin_rights() does not return with ar_ban than the player may not ban people, thus activating the else if statement in which it checks the player's permission to kick.

Correct me if I am wrong. This is only what I believe this code is stating.
Size43 (Administrator) on 27 Jun 2015, 12:33:30
I don't think I fully understand what you're asking. You'll have to use & because the value returned can contain multiple permissions, not just one.