Merge pull request #1492 from Kenshiin13/fix-esx-skin

fix(esx_skin/client/modules/menu): clear old menu items before inserting new ones
This commit is contained in:
Kasey Fitton
2024-11-20 19:07:32 +00:00
committed by GitHub
+1 -3
View File
@@ -38,6 +38,7 @@ end
function Menu:InsertElements()
local playerPed = PlayerPedId()
self.elements = {}
for i = 1, #self.components, 1 do
local value = self.components[i].value
local componentId = self.components[i].componentId
@@ -51,9 +52,6 @@ function Menu:InsertElements()
data.type = "slider"
data.max = self.maxValues[self.components[i].name]
if not self.elements then
self.elements = {}
end
self.elements[#self.elements + 1] = data
end
end