From 39df27d1a68323aee75413510b1546df14ccc0ad Mon Sep 17 00:00:00 2001 From: Okkie-NL Date: Sat, 7 May 2022 02:06:24 +0200 Subject: [PATCH 1/2] Updated nl.lua to add missing lines Added missing translations for NL. --- locale/nl.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/locale/nl.lua b/locale/nl.lua index c99d359..fd19d57 100644 --- a/locale/nl.lua +++ b/locale/nl.lua @@ -7,7 +7,10 @@ local Translations = { no_access = 'Geen toegang tot dit commando', company_too_poor = 'Je werkgever is arm', item_not_exist = 'Item bestaat niet', - too_heavy = 'Inventaris is te vol' + too_heavy = 'Inventaris is te vol', + duplicate_license = 'Dubbele Rockstar-licentie gevonden', + no_valid_license = 'Geen geldige Rockstar-licentie gevonden', + not_whitelisted = 'Je staat niet op de whitelist voor deze server' }, success = {}, info = { @@ -15,7 +18,10 @@ local Translations = { job_info = 'Baan: %{value} | Rang: %{value2} | In dienst: %{value3}', gang_info = 'Gang: %{value} | Rang: %{value2}', on_duty = 'Je bent nu in dienst!', - off_duty = 'Je bent nu uit dienst!' + off_duty = 'Je bent nu uit dienst!', + checking_ban = 'Hallo %s. We controleren of je verbannen bent.', + join_server = 'Welkom %s bij {Server Name}.', + checking_whitelisted = 'Hallo %s. We controleren of je op de whitelist staat.' } } From bdd95c074feb5af3c276a964fb9145addd549233 Mon Sep 17 00:00:00 2001 From: almez <57301625+serhatalmez@users.noreply.github.com> Date: Tue, 10 May 2022 21:00:17 +0300 Subject: [PATCH 2/2] Update exports.lua --- server/exports.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/server/exports.lua b/server/exports.lua index 2cfed5a..221f953 100644 --- a/server/exports.lua +++ b/server/exports.lua @@ -65,6 +65,22 @@ end QBCore.Functions.AddItem = AddItem exports('AddItem', AddItem) +-- Single update item +local function UpdateItem(itemName, item) + if type(itemName) ~= "string" then + return false, "invalid_item_name" + end + if not QBCore.Shared.Items[itemName] then + return false, "item_not_exists" + end + QBCore.Shared.Items[itemName] = item + TriggerClientEvent('QBCore:Client:OnSharedUpdate', -1, 'Items', itemName, item) + TriggerEvent('QBCore:Server:UpdateObject') + return true, "success" +end +QBCore.Functions.UpdateItem = UpdateItem +exports('UpdateItem', UpdateItem) + -- Multiple Add Items local function AddItems(items) local shouldContinue = true