Checking a variable/array value is definitely better than calling a native function.
You can do this, too:
PHP Code:
public client_putinserver(id)
{
vipAccess[ id ] = ( get_user_flags( id ) & VipAccess ) ? true : false;
}
If you plan on having multiple-flags then it's safer to do this because using (flags & Access) will return true if it finds only 1 matching flag. So if you have 4 flags, it can return true if the user has only 1, or any number of the Access flags.
PHP Code:
public client_putinserver(id)
{
vipAccess[ id ] = ( ( get_user_flags( id ) & VipAccess ) = VipAccess ) ? true : false;
}
You also want to size your vipAccess array to 33; if a user on slot 32 connects you will get an index out of bounds error.
__________________