Ok so for everyone that is using krz_personalmenu you’ll need to open the client/main.lua file.
Go around line 78 and copy and paste this line of code:
After you’ve copied this line, go around line 1078-1080 and copy & paste this code:
if RageUI.Visible(RMenu.Get('personal', 'components')) then
RenderComponentsMenu()
end
Then last, but not least, step, go everywhere you want, outside of every function, and copy and paste this function:
function RenderComponentsMenu()
local isArmored = false
local playerArmour = GetPedArmour(GetPlayerPed(-1))
if playerArmour > 0 then
isArmored = true
end
RageUI.DrawContent({header = true, instructionalButton = true}, function()
if isArmored then
RageUI.Button('Smonta corazza (' .. playerArmour .. ')', "", {}, true, function(Hovered, Active, Selected)
if (Selected) then
TriggerServerEvent('atlantis_kevlar:armourRemove', playerArmour)
RageUI.CloseAll()
end
end)
end
end)
end
After you’ve done that, restart the menu and you’re ready to go!
function ComponentiMenu()
RageUI.DrawContent({header = true, instructionalButton = true}, function()
RageUI.Button(‘Rimuovi Tutti i Componenti’, nil, {}, true, function(Hovered, Active, Selected)
if (Selected) then
TriggerEvent(‘esx_access:smontacomp’)
end
end)
RageUI.Button(‘Smonta Silenziatore’, nil, {}, true, function(Hovered, Active, Selected)
if (Selected) then
TriggerEvent(‘esx_access:smontasupp’)
end
end)
RageUI.Button(‘Smonta Torcia’, nil, {}, true, function(Hovered, Active, Selected)
if (Selected) then
TriggerEvent(‘esx_access:smontatorch’)
end
end)
RageUI.Button(‘Smonta Skin’, nil, {}, true, function(Hovered, Active, Selected)
if (Selected) then
TriggerEvent(‘esx_access:smontaskin’)
end
end)
RageUI.Button(‘Smonta Grip’, nil, {}, true, function(Hovered, Active, Selected)
if (Selected) then
TriggerEvent(‘esx_access:smontgrip’)
end
end)
end)
end
function ComponentiMenu()
local isArmored = false
local playerArmour = GetPedArmour(GetPlayerPed(-1))
if playerArmour > 0 then
isArmored = true
end
RageUI.DrawContent({header = true, instructionalButton = true}, function()
RageUI.Button(‘Rimuovi Tutti i Componenti’, nil, {}, true, function(Hovered, Active, Selected)
if (Selected) then
TriggerEvent(‘esx_access:smontacomp’)
end
end)
RageUI.Button(‘Smonta Silenziatore’, nil, {}, true, function(Hovered, Active, Selected)
if (Selected) then
TriggerEvent(‘esx_access:smontasupp’)
end
end)
RageUI.Button(‘Smonta Torcia’, nil, {}, true, function(Hovered, Active, Selected)
if (Selected) then
TriggerEvent(‘esx_access:smontatorch’)
end
end)
RageUI.Button(‘Smonta Skin’, nil, {}, true, function(Hovered, Active, Selected)
if (Selected) then
TriggerEvent(‘esx_access:smontaskin’)
end
end)
RageUI.Button(‘Smonta Grip’, nil, {}, true, function(Hovered, Active, Selected)
if (Selected) then
TriggerEvent(‘esx_access:smontgrip’)
end
end)
if isArmored then
RageUI.Button('Smonta corazza (' .. playerArmour .. ')', "", {}, true, function(Hovered, Active, Selected)
if (Selected) then
TriggerServerEvent('atlantis_kevlar:armourRemove', playerArmour)
RageUI.CloseAll()
end
end)
end
end)
end