Try this out. I modified another stock that I wrote to handle flag strings instead of just bitflags.
PHP Code:
/**
* Checks to see if a client has all of the specified admin flags
*
* @param client Player's index.
* @param flagString String of flags to check for.
* @return True on admin having all flags, false otherwise.
*/
stock bool:CheckAdminFlagsByString(client, const String:flagString[])
{
new AdminId:admin = GetUserAdmin(client);
if (admin != INVALID_ADMIN_ID)
{
new count, found, flags = ReadFlagString(flagString);
for (new i = 0; i <= 20; i++)
{
if (flags & (1<<i))
{
count++;
if (GetAdminFlag(admin, AdminFlag:i))
{
found++;
}
}
}
if (count == found)
{
return true;
}
}
return false;
}