From ed3c2f54c7adf124c995b7c915fc2c26fc245e98 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sun, 11 Nov 2018 11:24:36 +0100 Subject: [PATCH] Fixed #35 --- client/main.lua | 4 ++-- server/main.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/main.lua b/client/main.lua index b9ceb88c..ee6f3740 100644 --- a/client/main.lua +++ b/client/main.lua @@ -44,8 +44,8 @@ function OpenBuyLicenseMenu(zone) ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'shop_license', { title = _U('buy_license'), elements = { - { label = _U('yes', ('%s'):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', ('%s'):format((_U('shop_menu_item', ESX.Math.GroupDigits(Config.LicensePrice))))), value = 'yes' }, } }, function(data, menu) if data.current.value == 'yes' then diff --git a/server/main.lua b/server/main.lua index 54297cab..239d48b5 100644 --- a/server/main.lua +++ b/server/main.lua @@ -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