From 43196b6581a3c3fb69961463a49f3e91a4a0d01e Mon Sep 17 00:00:00 2001 From: Kasey FItton Date: Sat, 9 Nov 2024 05:55:44 +0000 Subject: [PATCH] fix(esx_skin/menu): wrong max values --- [core]/esx_skin/client/modules/menu.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_skin/client/modules/menu.lua b/[core]/esx_skin/client/modules/menu.lua index 7a2249e96..1b796a709 100644 --- a/[core]/esx_skin/client/modules/menu.lua +++ b/[core]/esx_skin/client/modules/menu.lua @@ -49,7 +49,7 @@ function Menu:InsertElements() local data = self.components[i] data.value = value data.type = "slider" - data.max = type(data.max) == "function" and data.max() or data.max + data.max = self.maxValues[self.components[i].name] if not self.elements then self.elements = {} @@ -83,7 +83,8 @@ function Menu:Change(data, menu) if skin[data.current.name] ~= data.current.value then -- Change skin element exports["skinchanger"]:Change(data.current.name, data.current.value) - skin = exports["skinchanger"]:GetSkin() + skin[data.current.name] = data.current.value + local newData = {} for i = 1, #self.elements, 1 do @@ -115,7 +116,6 @@ function Menu:Open(submit, cancel, restrict) Skin.last = exports["skinchanger"]:GetSkin() self.components, self.maxValues = exports["skinchanger"]:GetData() - if restrict then self.components = self:Restrict() end