https://sm.alliedmods.net/new-api/admin/GetAdminGroup
Returns group information from an admin.
A GroupId index and a name pointer, or INVALID_GROUP_ID and NULL if an error occurred.
PHP Code:
if(GetAdminGroup(ClientAccess, x, GroupName, sizeof(GroupName)) != ADMFLAG_ROOT)
this is so wrong ...
PHP Code:
AdminId admin = GetUserAdmin(index);
if (admin != INVALID_ADMIN_ID) // has flags
{
char group[64];
if (admin.GetGroup(0, group, sizeof(group)) != INVALID_GROUP_ID) // get his first group
{
PrintToChat(client, "%s : %N", group, index);
}
}
__________________