OK, I kind of figured it out, but it's not perfect. First create a menu with choices that are just the numbers 1 to 10 (or however many player slots you have). Then create a plugin using hook
profile_fetch_profilefields and this code:
Code:
$menufield = 16; // id of menu field
$firstplayerfield = 6; // id of first player field
$numplayers = 10;
if ($profilefield['profilefieldid'] == $menufield)
{
global $vbulletin;
$players = array();
for ($i = 0; $i < $numplayers; $i++)
{
$fld = 'field' . ($i + $firstplayerfield);
if (!empty($vbulletin->userinfo[$fld]))
{
$players[$i] = $vbulletin->userinfo[$fld];
if (intval($vbulletin->userinfo['field' . $menufield]) == ($i + 1))
{
$vbulletin->userinfo['field' . $menufield] = $players[$i];
}
}
}
if (count($players))
{
$profilefield['data'] = serialize($players);
}
}
This makes the settings page look OK, but the value being stored in the database is just a number 1-10. And when you go to view a user's profile, that number is displayed (although you get the right menu of choices if it's your profile and you edit the field by clicking the pencil). If you need the player name to be displayed in the profile instead of the number, it can probably be fixed using more plugins (but I don't have time to figure it out right now).