Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Dec 31, 2023
1 parent e2deef0 commit c3150f2
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions server-data/resources/[bpt_addons]/bpt_menu/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ CreateThread(function()
end

local weaponsData = ESX.GetWeaponList()

for i = #weaponsData, 1, -1 do
local weaponData = weaponsData[i]

if weaponData.name == 'WEAPON_UNARMED' then
table.remove(weaponsData, i)
else
weaponData.hash = GetHashKey(weaponData.name)
end
end

PersonalMenu.WeaponData = weaponsData
end
end)
Expand Down Expand Up @@ -661,12 +661,12 @@ getPersonalMenuCategory('wallet').drawer = function()
end
end)

RageUI.Button(_U('wallet_check_idcard_button'), nil, nil, true, function(Hovered, Active, Selected)
RageUI.Button(_U('wallet_check_idcard_button'), nil, nil, true, function(_, _, Selected)
if not Selected then return end
TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()))
end)

RageUI.Button(_U('wallet_show_driver_button'), nil, nil, true, function(Hovered, Active, Selected)
RageUI.Button(_U('wallet_show_driver_button'), nil, nil, true, function(_, _, Selected)
if not Selected then return end

local closestPlayer, closestDistance = GetClosestPlayer()
Expand All @@ -678,12 +678,12 @@ getPersonalMenuCategory('wallet').drawer = function()
end
end)

RageUI.Button(_U('wallet_check_driver_button'), nil, nil, true, function(Hovered, Active, Selected)
RageUI.Button(_U('wallet_check_driver_button'), nil, nil, true, function(_, _, Selected)
if not Selected then return end
TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), 'driver')
end)

RageUI.Button(_U('wallet_show_firearms_button'), nil, nil, true, function(Hovered, Active, Selected)
RageUI.Button(_U('wallet_show_firearms_button'), nil, nil, true, function(_, _, Selected)
if not Selected then return end

local closestPlayer, closestDistance = GetClosestPlayer()
Expand All @@ -695,7 +695,7 @@ getPersonalMenuCategory('wallet').drawer = function()
end
end)

RageUI.Button(_U('wallet_check_firearms_button'), nil, nil, true, function(Hovered, Active, Selected)
RageUI.Button(_U('wallet_check_firearms_button'), nil, nil, true, function(_, _, Selected)
if not Selected then return end
TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), 'weapon')
end)
Expand All @@ -706,7 +706,7 @@ getPersonalMenuCategory('billing').drawer = function()
for i = 1, #PersonalMenu.BillData do
local billData = PersonalMenu.BillData[i]

RageUI.Button(billData.label, nil, { RightLabel = ('$%s'):format(GroupDigits(billData.amount)) }, true, function(Hovered, Active, Selected)
RageUI.Button(billData.label, nil, { RightLabel = ('$%s'):format(GroupDigits(billData.amount)) }, true, function(_, _, Selected)
if not Selected then return end

TriggerServerCallback('esx_billing:payBill', function()
Expand All @@ -720,7 +720,7 @@ getPersonalMenuCategory('clothes').drawer = function()
for i = 1, #PersonalMenu.ClothesButtons do
local clotheId = PersonalMenu.ClothesButtons[i]

RageUI.Button(_U(('clothes_%s'):format(clotheId)), nil, {RightBadge = RageUI.BadgeStyle.Clothes}, true, function(Hovered, Active, Selected)
RageUI.Button(_U(('clothes_%s'):format(clotheId)), nil, {RightBadge = RageUI.BadgeStyle.Clothes}, true, function(_, _, Selected)
if not Selected then return end
setClothes(clotheId)
end)
Expand All @@ -731,7 +731,7 @@ getPersonalMenuCategory('accessories').drawer = function()
for i = 1, #PersonalMenu.AccessoriesButtons do
local accessoryId = PersonalMenu.AccessoriesButtons[i]

RageUI.Button(_U(('accessories_%s'):format(accessoryId)), nil, {RightBadge = RageUI.BadgeStyle.Clothes}, true, function(Hovered, Active, Selected)
RageUI.Button(_U(('accessories_%s'):format(accessoryId)), nil, {RightBadge = RageUI.BadgeStyle.Clothes}, true, function(_, _, Selected)
if not Selected then return end
setAccessory(accessoryId)
end)
Expand All @@ -750,7 +750,7 @@ function DrawAnimationsCategory(animationCfg)
for i = 1, #animationCfg.items do
local animItemCfg = animationCfg.items[i]

RageUI.Button(animItemCfg.name, nil, nil, true, function(Hovered, Active, Selected)
RageUI.Button(animItemCfg.name, nil, nil, true, function(_, _, Selected)
if not Selected then return end

if animItemCfg.type == 'anim' then
Expand Down

0 comments on commit c3150f2

Please sign in to comment.