mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 10:18:54 +00:00
Fixed #35
This commit is contained in:
+2
-2
@@ -44,8 +44,8 @@ function OpenBuyLicenseMenu(zone)
|
||||
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'shop_license', {
|
||||
title = _U('buy_license'),
|
||||
elements = {
|
||||
{ label = _U('yes', ('<span style="color: green;">%s</span>'):format((_U('shop_menu_item', ESX.Math.GroupDigits(Config.LicensePrice)))), value = 'yes' },
|
||||
{ label = _U('no'), value = 'no' }
|
||||
{ label = _U('no'), value = 'no' },
|
||||
{ label = _U('yes', ('<span style="color: green;">%s</span>'):format((_U('shop_menu_item', ESX.Math.GroupDigits(Config.LicensePrice))))), value = 'yes' },
|
||||
}
|
||||
}, function(data, menu)
|
||||
if data.current.value == 'yes' then
|
||||
|
||||
+2
-2
@@ -87,10 +87,10 @@ AddEventHandler('esx_weashop:buyItem', function(weaponName, zone)
|
||||
end)
|
||||
|
||||
function GetPrice(weaponName, zone)
|
||||
local result = MySQL.Sync.fetchAll('SELECT 1 FROM weashops WHERE zone = @zone AND item = @item', {
|
||||
local result = MySQL.Sync.fetchAll('SELECT price FROM weashops WHERE zone = @zone AND item = @item', {
|
||||
['@zone'] = zone,
|
||||
['@item'] = weaponName
|
||||
})
|
||||
|
||||
|
||||
return result[1].price
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user