Skip to content

Commit

Permalink
fix(esx_skin/menu): wrong max values
Browse files Browse the repository at this point in the history
  • Loading branch information
Mycroft-Studios committed Nov 9, 2024
1 parent e8a16c2 commit 43196b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions [core]/esx_skin/client/modules/menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 43196b6

Please sign in to comment.