Skip to content

Commit

Permalink
Merge pull request #1478 from Kenshiin13/fix-skinchanger
Browse files Browse the repository at this point in the history
fix(skinchanger/client/main): fix HeadOverlay not being applied correctly
  • Loading branch information
Kenshiin13 authored Nov 17, 2024
2 parents 20fd65b + e40d487 commit 18b7987
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions [core]/skinchanger/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,17 @@ function SkinChanger:SetFace()
end

function SkinChanger:SetHeadOverlay()
local features = {{"age_1", "age_2"}, {"blemishes_1", "blemishes_2"}, {"beard_1", "beard_2"}, {"eyebrows_1", "eyebrows_2"}, {"makeup_1", "makeup_2"}, {"lipstick_1", "lipstick_2"}, {"blush_1", "blush_2"}, {"complexion_1", "complexion_2"}, {"sun_1", "sun_2"}, {"moles_1", "moles_2"}, {"chest_1", "chest_2"}}
local features = {{"blemishes_1", "blemishes_2"}, {"beard_1", "beard_2"}, {"eyebrows_1", "eyebrows_2"}, {"age_1", "age_2"}, {"makeup_1", "makeup_2"}, {"blush_1", "blush_2"}, {"complexion_1", "complexion_2"}, {"sun_1", "sun_2"}, {"lipstick_1", "lipstick_2"}, {"moles_1", "moles_2"}, {"chest_1", "chest_2"}}
for i = 1, #features, 1 do
local feature = features[i]
SetPedHeadOverlay(self.playerPed, i - 1, self.character[feature[1]], Normalise(self.character[feature[2]], 10))
end
end

function SkinChanger:SetHeadOverlayColour()
local features = {{"beard_3", "beard_4"}, {"eyebrows_3", "eyebrows_4"}, {"makeup_3", "makeup_4"}, {"lipstick_3", "lipstick_4"}, {"blush_3", 0}, {"chest_3", 0}}
for i = 1, #features, 1 do
local feature = features[i]
SetPedHeadOverlayColor(self.playerPed, i - 1, 1, self.character[feature[1]], self.character[feature[2]])
local features = {[1] = {"beard_3", "beard_4"}, [2] = {"eyebrows_3", "eyebrows_4"}, [4] = {"makeup_3", "makeup_4"}, [5] = {"blush_3", 0}, [8] = {"lipstick_3", "lipstick_4"}, [10] = {"chest_3", 0}}
for i, feature in pairs(features) do
SetPedHeadOverlayColor(self.playerPed, i, 1, self.character[feature[1]], self.character[feature[2]])
end
if self.character["bodyb_1"] == -1 then
SetPedHeadOverlay(self.playerPed, 11, 255, (self.character["bodyb_2"] / 10) + 0.0) -- Body Blemishes + opacity
Expand Down

0 comments on commit 18b7987

Please sign in to comment.