What about setting the avatar to the player's prefs? Is there a function for that?
If you're using a player though, look at gameConnection::applyBodyColors.
applyCharacterPrefs(%obj);
applyDefaultCharacterPrefs(%obj);