Instead of only returning true if the player has EXACT flags as GroupFlagsValue[], using & would return true if the player has any of the flags or combo of flags found in GroupFlagsValue[] (a,b,i,ai,ab,bi)
If you're not familiar with bit-wise operators, read this:
https://forums.alliedmods.net/showthread.php?t=139916
PHP Code:
//Instead of
if(get_user_flags(iPlayer) == GroupFlagsValue[p_of_pw])
//try
if(get_user_flags(iPlayer) & GroupFlagsValue[p_of_pw])
__________________