So you want wait_entergame() to only be called when a player 1) first joins server 2) has selected a team 3) is spawned into the game? If this is not correct, please try to explain what you want more clearly.
Also, your flags check is incorrect. When you want to check a combination of flags you must OR them and then check if the resulting flags is what you're looking for.
PHP Code:
if ( ( get_user_flags( id ) & ( ADMIN_ACCESS | FL_ONGROUND ) ) == ( ADMIN_ACCESS | FL_ONGROUND ) )
__________________