diff --git a/__resource.lua b/__resource.lua index 3826fd4d..c947865a 100644 --- a/__resource.lua +++ b/__resource.lua @@ -76,9 +76,6 @@ files { 'html/fonts/pdown.ttf', 'html/fonts/bankgothic.ttf', - 'html/img/keys/enter.png', - 'html/img/keys/return.png', - 'html/img/accounts/bank.png', 'html/img/accounts/black_money.png' } diff --git a/client/functions.lua b/client/functions.lua index c453a2c2..5131653e 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -261,7 +261,7 @@ ESX.GetWeaponLabel = function(name) for i=1, #weapons, 1 do if weapons[i].name == name then - return weapons[i].label + return weapons[i].label end end end diff --git a/client/main.lua b/client/main.lua index 6e155de1..6bd986b0 100644 --- a/client/main.lua +++ b/client/main.lua @@ -160,6 +160,7 @@ AddEventHandler('esx:setAccountMoney', function(account) for i=1, #ESX.PlayerData.accounts, 1 do if ESX.PlayerData.accounts[i].name == account.name then ESX.PlayerData.accounts[i] = account + break end end @@ -179,7 +180,7 @@ RegisterNetEvent('esx:addInventoryItem') AddEventHandler('esx:addInventoryItem', function(item, count) for i=1, #ESX.PlayerData.inventory, 1 do if ESX.PlayerData.inventory[i].name == item.name then - ESX.PlayerData.inventory[i] = item + ESX.PlayerData.inventory[i] = item end end @@ -194,7 +195,7 @@ RegisterNetEvent('esx:removeInventoryItem') AddEventHandler('esx:removeInventoryItem', function(item, count) for i=1, #ESX.PlayerData.inventory, 1 do if ESX.PlayerData.inventory[i].name == item.name then - ESX.PlayerData.inventory[i] = item + ESX.PlayerData.inventory[i] = item end end @@ -407,7 +408,6 @@ AddEventHandler('esx:deleteVehicle', function() end end) - -- Pause menu disable HUD display if Config.EnableHud then Citizen.CreateThread(function() @@ -544,7 +544,7 @@ Citizen.CreateThread(function() for k,v in pairs(Pickups) do - local distance = GetDistanceBetweenCoords(coords.x, coords.y, coords.z, v.coords.x, v.coords.y, v.coords.z, true) + local distance = GetDistanceBetweenCoords(coords.x, coords.y, coords.z, v.coords.x, v.coords.y, v.coords.z, true) local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() if distance <= 5.0 then diff --git a/config.lua b/config.lua index 56f912a6..c7a6590b 100644 --- a/config.lua +++ b/config.lua @@ -1,5 +1,5 @@ Config = {} -Config.Locale = 'fr' +Config.Locale = 'sv' Config.Accounts = { 'bank', 'black_money' } Config.AccountLabels = { bank = _U('bank'), black_money = _U('black_money') } @@ -9,7 +9,9 @@ Config.ShowDotAbovePlayer = false Config.DisableWantedLevel = true Config.EnableWeaponPickup = true Config.EnableHud = true -- enable the default hud? Display current job and accounts (black, bank & cash) + Config.RemoveInventoryItemDelay = 5 * 60000 Config.PaycheckInterval = 7 * 60000 Config.MaxPlayers = 32 + Config.EnableDebug = false diff --git a/es_extended.sql b/es_extended.sql index badf8f87..31fa0467 100644 --- a/es_extended.sql +++ b/es_extended.sql @@ -44,7 +44,6 @@ CREATE TABLE `jobs` ( INSERT INTO `jobs` VALUES ('unemployed','Unemployed'); CREATE TABLE `user_accounts` ( - `id` int(11) NOT NULL AUTO_INCREMENT, `identifier` varchar(255) NOT NULL, `name` varchar(255) NOT NULL, @@ -54,7 +53,6 @@ CREATE TABLE `user_accounts` ( ); CREATE TABLE `user_inventory` ( - `id` int(11) NOT NULL AUTO_INCREMENT, `identifier` varchar(255) NOT NULL, `item` varchar(255) NOT NULL, diff --git a/html/css/app.css b/html/css/app.css index e4327c9c..bac47fad 100644 --- a/html/css/app.css +++ b/html/css/app.css @@ -1,11 +1,11 @@ @font-face { font-family: 'Pricedown'; - src: url('../fonts/pdown.ttf')/* TTF file for CSS3 browsers */ + src: url('../fonts/pdown.ttf') } @font-face { font-family: 'bankgothic'; - src: url('../fonts/bankgothic.ttf')/* TTF file for CSS3 browsers */ + src: url('../fonts/bankgothic.ttf') } html { diff --git a/html/img/keys/enter.png b/html/img/keys/enter.png deleted file mode 100644 index 3eb9a1f6..00000000 Binary files a/html/img/keys/enter.png and /dev/null differ diff --git a/html/img/keys/return.png b/html/img/keys/return.png deleted file mode 100644 index a3ca125a..00000000 Binary files a/html/img/keys/return.png and /dev/null differ diff --git a/html/js/app.js b/html/js/app.js index 901e081e..95308dc6 100644 --- a/html/js/app.js +++ b/html/js/app.js @@ -1,65 +1,64 @@ (() => { - ESX = {}; + ESX = {}; ESX.HUDElements = []; - ESX.setHUDDisplay = function(opacity){ + ESX.setHUDDisplay = function (opacity) { $('#hud').css('opacity', opacity); - } - - ESX.insertHUDElement = function(name, index, priority, html, data){ + }; + ESX.insertHUDElement = function (name, index, priority, html, data) { ESX.HUDElements.push({ - name : name, - index : index, - priority : priority, - html : html, - data : data - }) + name: name, + index: index, + priority: priority, + html: html, + data: data + }); - ESX.HUDElements.sort((a,b) => { + ESX.HUDElements.sort((a, b) => { return a.index - b.index || b.priority - a.priority; - }) + }); + }; - } + ESX.updateHUDElement = function (name, data) { - ESX.updateHUDElement = function(name, data){ - - for(let i=0; i { - - switch(data.action){ - - case 'setHUDDisplay' : { + switch (data.action) { + case 'setHUDDisplay': { ESX.setHUDDisplay(data.opacity); break; } - case 'insertHUDElement' : { + case 'insertHUDElement': { ESX.insertHUDElement(data.name, data.index, data.priority, data.html, data.data); break; } - case 'updateHUDElement' : { + case 'updateHUDElement': { ESX.updateHUDElement(data.name, data.data); break; } - case 'deleteHUDElement' : { + case 'deleteHUDElement': { ESX.deleteHUDElement(data.name); break; } - case 'inventoryNotification' : { - ESX.inventoryNotification(data.add, data.item, data.count) + case 'inventoryNotification': { + ESX.inventoryNotification(data.add, data.item, data.count); } - } + }; - } - - window.onload = function(e){ + window.onload = function (e) { window.addEventListener('message', (event) => { - onData(event.data) + onData(event.data); }); - } + }; -})() \ No newline at end of file +})(); \ No newline at end of file