fix(skinchanger): Add missing export

This commit is contained in:
Kasey FItton
2024-11-09 00:33:23 +00:00
parent ba992442fe
commit 6f08b59e25
2 changed files with 25 additions and 15 deletions
+20 -12
View File
@@ -116,7 +116,7 @@ function SkinChanger:SetHead()
if not self.character["grandparents"] then
self.character["grandparents"] = 0
end
SetPedHeadBlendData(self.playerPed,
self.character["mom"], self.character["dad"], self.character["grandparents"] , self.character["mom"],
self.character["dad"], self.character["grandparents"], face_weight, skin_weight, third_weight, false)
@@ -243,6 +243,19 @@ function SkinChanger:Init()
end
end
function SkinChanger:GetData(noMax)
local components = SkinChanger.components
for k, v in pairs(SkinChanger.character) do
for i = 1, #components, 1 do
if k == components[i].name then
components[i].value = v
end
end
end
return components, noMax and nil or self:MaxValues()
end
--- exports
exports("GetSkin", function()
@@ -257,6 +270,10 @@ exports("LoadSkin", function(skin)
return SkinChanger:LoadSkin(skin)
end)
exports("GetData", function(noMax)
return SkinChanger:GetData(noMax)
end)
exports("LoadClothes", function(playerSkin, clothesSkin)
return SkinChanger:LoadClothes(playerSkin, clothesSkin)
end)
@@ -292,16 +309,7 @@ AddEventHandler("skinchanger:modelLoaded", function()
end)
AddEventHandler("skinchanger:getData", function(cb)
local components = SkinChanger.components
for k, v in pairs(SkinChanger.character) do
for i = 1, #components, 1 do
if k == components[i].name then
components[i].value = v
end
end
end
cb(components, SkinChanger:MaxValues())
cb(SkinChanger:GetData())
end)
SkinChanger:Init()
SkinChanger:Init()
+5 -3
View File
@@ -1,8 +1,10 @@
Locales["en"] = {
["sex"] = "sex",
["mom"] = "mom's face",
["dad"] = "dad's face",
["resemblance"] = "resemblance",
["mom"] = "Face 1",
["dad"] = "Face 2",
["grandparents"] = "Face 3",
["resemblance"] = "Face 1/2 Mix",
["resemblance_g"] = "Face 3 Mix",
["skin_tone"] = "skin tone",
["nose_1"] = "nose width",
["nose_2"] = "nose peak height",