diff --git a/client/functions.lua b/client/functions.lua index e3b1e7ad..33ef31a5 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -530,10 +530,10 @@ ESX.Game.GetVehicleProperties = function(vehicle) local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle) local extras = {} - for id=0, 12 do - if DoesExtraExist(vehicle, id) then - local state = IsVehicleExtraTurnedOn(vehicle, id) == 1 - extras[tostring(id)] = state + for extraId=0, 12 do + if DoesExtraExist(vehicle, extraId) then + local state = IsVehicleExtraTurnedOn(vehicle, extraId) == 1 + extras[tostring(extraId)] = state end end @@ -651,11 +651,11 @@ ESX.Game.SetVehicleProperties = function(vehicle, props) end if props.extras then - for id,enabled in pairs(props.extras) do + for extraId,enabled in pairs(props.extras) do if enabled then - SetVehicleExtra(vehicle, tonumber(id), 0) + SetVehicleExtra(vehicle, tonumber(extraId), 0) else - SetVehicleExtra(vehicle, tonumber(id), 1) + SetVehicleExtra(vehicle, tonumber(extraId), 1) end end end @@ -884,7 +884,7 @@ ESX.ShowInventory = function() }, function(data3, menu3) local quantity = tonumber(data3.value) - if quantity then + if quantity and quantity > 0 and data.current.count >= quantity then TriggerServerEvent('esx:giveInventoryItem', selectedPlayerId, type, item, quantity) menu3.close() menu2.close() @@ -926,7 +926,7 @@ ESX.ShowInventory = function() }, function(data2, menu2) local quantity = tonumber(data2.value) - if quantity then + if quantity and quantity > 0 and data.current.count >= quantity then menu2.close() menu1.close() TaskPlayAnim(playerPed, dict, anim, 8.0, 1.0, 1000, 16, 0.0, false, false, false) @@ -957,8 +957,8 @@ ESX.ShowInventory = function() }, function(data2, menu2) local quantity = tonumber(data2.value) - if quantity then - if pedAmmo >= quantity and quantity > 0 then + if quantity and quantity > 0 then + if pedAmmo >= quantity then TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(closestPlayer), 'item_ammo', item, quantity) menu2.close() menu1.close() diff --git a/client/main.lua b/client/main.lua index e66cce33..4d51a8aa 100644 --- a/client/main.lua +++ b/client/main.lua @@ -477,7 +477,7 @@ Citizen.CreateThread(function() Citizen.Wait(0) local playerPed = PlayerPedId() local playerCoords, letSleep = GetEntityCoords(playerPed), true - local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer(playerCoords) for pickupId,pickup in pairs(pickups) do local distance = #(playerCoords - pickup.coords) diff --git a/config.lua b/config.lua index 888f7e65..97217502 100644 --- a/config.lua +++ b/config.lua @@ -1,5 +1,5 @@ Config = {} -Config.Locale = 'fr' +Config.Locale = 'en' Config.Accounts = { bank = _U('account_bank'), diff --git a/es_extended.sql b/es_extended.sql index c01587aa..b36720c6 100644 --- a/es_extended.sql +++ b/es_extended.sql @@ -1,5 +1,5 @@ -CREATE DATABASE IF NOT EXISTS `essentialmode`; -USE `essentialmode`; +CREATE DATABASE IF NOT EXISTS `es_extended`; +USE `es_extended`; CREATE TABLE `users` ( `identifier` VARCHAR(40) NOT NULL, diff --git a/html/css/app.css b/html/css/app.css index bac47fad..b487523f 100644 --- a/html/css/app.css +++ b/html/css/app.css @@ -84,4 +84,4 @@ html { .menu .menu-items .menu-item.selected { background-color: #ccc; -} \ No newline at end of file +}