Understand i right, that for my problem i only modify this codes:
Code:
// Add or remove user from secondary usergroups
// according to radio button choice in user's profile
// (Choice of one of several forums)
global $vbulletin;
// Enter values in the strings below for your forum
// custom field containing your radio button
$field = 'fieldX'
// membergroup number associated with FIRST radio button choice
$mg[0] = 'XX';
// membergroup number associated with SECOND radio button choice
$mg[1] = 'YY';
// add additional radio button choices as needed
// Derive additional needed variables
$userid = ($vbulletin->userinfo['userid']); // userid of user
$mgarr = explode(',' , (''.$vbulletin->userinfo['membergroupids'])); // current membergroups as array
// Do the work
foreach ($mg as $value)
{
$iii = 0
{
if ($field == pow(2,$iii))
{
InGroup($mgarr, $mg[$iii], $userid);
}
else
{
OutGroup($mgarr, $mg[$iii], $userid);
}
$iii++
}
}