diff --git a/client/job.lua b/client/job.lua index fc94c41..9fdde78 100644 --- a/client/job.lua +++ b/client/job.lua @@ -21,7 +21,7 @@ local FingerPrintSessionId = nil function CreatePrompts() for k,v in pairs(Config.Locations['duty']) do - exports['qbr-core']:createPrompt('duty_prompt_' .. k, v, 0xF3830D8E, 'Toggle duty status', { + exports['qbr-core']:createPrompt('duty_prompt_' .. k, v, 0xF3830D8E, Lang:t('prompt.toggle_duty_status'), { type = 'client', event = 'qb-policejob:ToggleDuty', args = {}, @@ -29,7 +29,7 @@ function CreatePrompts() end for k,v in pairs(Config.Locations['evidence']) do - exports['qbr-core']:createPrompt('evidence_prompt_' .. k, v, 0xF3830D8E, 'Open Evidence Stash', { + exports['qbr-core']:createPrompt('evidence_prompt_' .. k, v, 0xF3830D8E, Lang:t('prompt.open_evidence_stash'), { type = 'client', event = 'police:client:EvidenceStashDrawer', args = { k }, @@ -37,7 +37,7 @@ function CreatePrompts() end for k,v in pairs(Config.Locations['stash']) do - exports['qbr-core']:createPrompt('stash_prompt_' .. k, v, 0xF3830D8E, 'Open Personal Stash', { + exports['qbr-core']:createPrompt('stash_prompt_' .. k, v, 0xF3830D8E, Lang:t('prompt.open_personal_stash'), { type = 'client', event = 'police:client:OpenPersonalStash', args = {}, @@ -45,7 +45,7 @@ function CreatePrompts() end for k,v in pairs(Config.Locations['armory']) do - exports['qbr-core']:createPrompt('armory_prompt_' .. k, v, 0xF3830D8E, 'Open Armory', { + exports['qbr-core']:createPrompt('armory_prompt_' .. k, v, 0xF3830D8E, Lang:t('prompt.open_armory'), { type = 'client', event = 'police:client:OpenArmory', args = {}, @@ -91,13 +91,18 @@ local function IsArmoryWhitelist() -- being removed end local function SetWeaponSeries() - for k, v in pairs(Config.Items.items) do + for k, v in ipairs(Config.Items.items) do if k < 6 then - Config.Items.items[k].info.serie = tostring(exports['qbr-core']:RandomInt(2) .. exports['qbr-core']:RandomStr(3) .. exports['qbr-core']:RandomInt(1) .. exports['qbr-core']:RandomStr(2) .. exports['qbr-core']:RandomInt(3) .. exports['qbr-core']:RandomStr(4)) + local randomInt = exports['qbr-core']:RandomInt + local randomStr = exports['qbr-core']:RandomStr + + local serie = tostring(randomInt(2) .. randomStr(3) .. randomInt(1) .. randomStr(2) .. randomInt(3) .. randomStr(4)) + Config.Items.items[k].info.serie = serie end end end + RegisterNetEvent('police:client:ImpoundVehicle', function(fullImpound, price) local vehicle = exports['qbr-core']:GetClosestVehicle() local bodyDamage = math.ceil(GetVehicleBodyHealth(vehicle)) diff --git a/locales/en.lua b/locales/en.lua index e0d0548..e82ee3e 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -180,6 +180,12 @@ local Translations = { place_object = 'Placing object..', remove_object = 'Removing object..', }, + prompt = { + toggle_duty_status = 'Toggle duty status', + open_evidence_stash = 'Open Evidence Stash', + open_personal_stash = 'Open Personal Stash', + open_armory = 'Open Armory', + }, } Lang = Locale:new({ diff --git a/locales/es.lua b/locales/es.lua index 0bc3c3c..0669281 100644 --- a/locales/es.lua +++ b/locales/es.lua @@ -180,6 +180,12 @@ local Translations = { place_object = 'Colocando objeto..', remove_object = 'Eliminando objeto..', }, + prompt = { + toggle_duty_status = 'Alternar estado de servicio', + open_evidence_stash = 'Abrir inventario de pruebas', + open_personal_stash = 'Abrir inventario personal', + open_armory = 'Armería Abierta', + }, } if GetConvar('qbr_locale', 'en') == 'es' then