Merge branch 'main' into main

This commit is contained in:
Kakarot
2022-06-15 17:35:48 -07:00
committed by GitHub
2 changed files with 24 additions and 2 deletions
+8 -2
View File
@@ -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.'
}
}
+16
View File
@@ -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