Closed ynhhoJ closed 4 years ago
You can test it on RAGE MP.
For players works variant from wiki: https://wiki.rage.mp/index.php?title=Player::setHeadOverlay - player.setHeadOverlay(1, 4, 0.99, 1, 1);
But if you try to use that on ped, this way doesn't work.
You need to use 3 arguments, like in native:
And then change color of element with
setHeadOverlayColor
.
Idk why, but for ped costumization we need to use that way.
// Doesn't work
mp.keys.bind(0x71, true, function() { // F2
const ped = mp.peds.new(mp.game.joaat('mp_m_freemode_01'), mp.players.local.position, mp.players.local.getHeading(), mp.players.local.dimension);
setTimeout(() => {
ped.setHeadBlendData(1, 1, 0, 1, 1, 0, 1, 1, 0, false);
ped.setHeadOverlay(1, 4, 0.99, 1, 1);
}, 500);
});
//works
mp.keys.bind(0x71, true, function() { // F2
const ped = mp.peds.new(mp.game.joaat('mp_m_freemode_01'), mp.players.local.position, mp.players.local.getHeading(), mp.players.local.dimension);
setTimeout(() => {
ped.setHeadBlendData(1, 1, 0, 1, 1, 0, 1, 1, 0, false);
ped.setHeadOverlay(1, 4, 0.99);
ped.setHeadOverlayColor(1, 1, 1, 1);
}, 500);
});
Good job so far but you are missing one method setHeadBlendData
.
Just to be sure: Are these changes related to the upcoming v. 1.0 or are these changes also valid for v. 0.3.7.2?
Like i know, It should works in 0.3.7 in the same way. But we need to do some tests to be shure 100%
Please test it, since we would merge directly into master.
Yep, it's also works in 0.3.7!
Where is the changelog source for these changes?