This code will check BOTH the primary and secondary usergroups for access...
PHP Code:
if (is_member_of($vbulletin->userinfo, X, X, X)) {
echo "Your usergroup has access to this area";
}
else {
echo "You are not in a usergroup with access";
}
Where X is a usergroup (primary or secondary, it checks them BOTH).
If you only want to check for one value, just use one groupid...multiple values use multiple groupids. You can check for as many as you would like.
Hope it helps,
Steve