function DisplayCharacterModel() { $CharacterData = Characters::GetCharacterData($_REQUEST['datatype']); $Inventory = Characters::GetGearForCharacter($CharacterData['guid']); ModelViewer::Initialize(450, 450); ModelViewer::SetCharacterData($CharacterData['race_data']['name'], $CharacterData['gender']); foreach ($Inventory as $Item) { if (isset($Item['data'])) { ModelViewer::EquipItem($Item['slot'], $Item['data']['displayid']); } } echo ModelViewer::GetCharacterHtml(); }