Player::setFaceFeature

From RAGE Multiplayer Wiki
Revision as of 14:32, 17 December 2017 by Splixz (talk | contribs)

Sets the various freemode face features, e.g. nose length, chin shape. Scale ranges from 0.0 to 1.0. Index can be 0 - 19. Index information (thx Mcfloy):

  • 0: Nose width (0 narrow, 1 wide)
  • 1: Nose height (0 top, 1 bottom)
  • 2: Nose length (0 grand, 1 petit)
  • 3: Nose bridge (0 round, 1 hollow)
  • 4: Nose tip (0 upward, 1 downward)
  • 5: Nose bridge shift (-1 to the right, 1 to the left)
  • 6: Brow height (0 top, 1 bottom)
  • 7: Brow width (0 inward, 1 outward)
  • 8: Cheekbone height (0 top, 1 bottom)
  • 9: Cheekbone width (0 narrow, 1 wide)
  • 10: Cheeks width (0 wide, 1 narrow)
  • 11: Eyes (0 opened, 1 closed)
  • 12: Lips (0 wide, 1 narrow)
  • 13: Jaw width (0 narrow, 1 wide)
  • 14: Jaw height (0 top, 1 bottom)
  • 15: Chin length (0 small, 1 long)
  • 16: Chin position (0 inward, 1 outward)
  • 17: Chin width (0 narrow, 1 grand)
  • 18: Chin shape (0 simple chin, 1 double chin)
  • 19: Neck width (0 narrow, 1 wide)


Syntax

player.setFaceFeature(index, scale);

Required Arguments

  • index: int
  • scale: float

Return value

  • Undefined

Example

function updateAppearance(genderChanged) {

    if (genderChanged) {
        mp.players.local.model = characterData.gender ? mp.game.joaat("mp_m_freemode_01") : mp.game.joaat("mp_f_freemode_01");

        setTimeout(sUpdateAppearance, 100);
    }

    else
        sUpdateAppearance();
    }

    function sUpdateAppearance() {
        
        for (var i = 0; i < 20; i++)
            mp.players.local.setFaceFeature(i, characterData.faceFeatures[i]);
    }
}

See also