fix(qb-core): add global CreateUsableItem alias for qs-inventory compatibility

qs-inventory apelează CreateUsableItem ca funcție globală, dar qb-core definea doar QBCore.Functions.CreateUseableItem (cu 'e'). Adăugat alias global + fix 16 stringuri sparte în items.lua care blocau parsarea.
This commit is contained in:
2026-04-02 00:08:19 +03:00
parent 096ccb6399
commit 978c9bc759
827 changed files with 3570 additions and 1015 deletions

View File

@@ -0,0 +1,75 @@
Config = Config or {}
local esxHas = GetResourceState('es_extended') == 'started'
local qbHas = GetResourceState('qb-core') == 'started'
local qbxHas = GetResourceState('qbx_core') == 'started'
Config.Framework = esxHas and 'esx' or qbHas and 'qb' or qbxHas and 'qb' or 'esx'
-- Marker configuration for the shop locations
Config.Marker = {
type = 2, -- Marker type (refer to GTA marker types)
scale = {x = 0.2, y = 0.2, z = 0.1}, -- Marker scale
colour = {r = 71, g = 181, b = 255, a = 120}, -- Marker color with transparency (RGBA)
movement = 1 -- Marker animation (0 = no movement, 1 = with movement)
}
-- Shop configuration
Config.Shops = {
[1] = {
name = 'id_card', -- Unique identifier for the item
text = "[E] - Identity License", -- Interaction text
label = 'ID', -- Item label
type = "Document", -- Item type
progbar = "Purchasing license...", -- Progress bar text
price = 150, -- Item price
isjob = false, -- Required job to access this shop (false = no job required)
timer = 2500, -- Interaction duration (milliseconds)
location = vec3(-545.08, -204.13, 38.22), -- Shop location (vector3 format)
blip = { -- Blip configuration for the map
enable = true, -- Enable or disable the blip
name = 'Identity License', -- Blip name
sprite = 409, -- Blip sprite (icon)
color = 0, -- Blip color
scale = 0.7 -- Blip size
},
},
[2] = {
name = 'weaponlicense', -- Unique identifier for the item
isjob = false, -- Required job to access this shop (false = no job required)
text = "[E] - Weapons License", -- Interaction text
label = 'License', -- Item label
type = "Weapons License", -- Item type
price = 10, -- Item price
progbar = "Purchasing license...", -- Progress bar text
timer = 2500, -- Interaction duration (milliseconds)
location = vec3(14.01, -1106.11, 29.8), -- Shop location (vector3 format)
blip = { -- Blip configuration for the map
enable = false, -- Enable or disable the blip
name = 'Weapons License', -- Blip name
sprite = 89, -- Blip sprite (icon)
color = 1, -- Blip color
scale = 0.5 -- Blip size
},
},
[3] = {
name = 'driver_license', -- Unique identifier for the item
isjob = false, -- Required job to access this shop (false = no job required)
text = "[E] - Driving License", -- Interaction text
label = 'Driving License', -- Item label
type = "License", -- Item type
price = 10, -- Item price
progbar = "Purchasing license...", -- Progress bar text
timer = 2500, -- Interaction duration (milliseconds)
location = vec3(239.78, -1380.27, 33.74), -- Shop location (vector3 format)
blip = { -- Blip configuration for the map
enable = true, -- Enable or disable the blip
name = 'Driving License', -- Blip name
sprite = 67, -- Blip sprite (icon)
color = 3, -- Blip color
scale = 0.6 -- Blip size
},
},
}

View File

@@ -0,0 +1,27 @@
Config = Config or {}
Config.Language = 'en'
Config.Languages = {
['en'] = {
['LICENSES_PROGRESS'] = 'Getting licensed...',
['LICENSES_SUCCESS'] = 'Thanks for waiting, here is your new',
['LICENSES_NO_MONEY'] = "You don't have enough money",
['LICENSES_WOMEN_LABEL'] = 'Female',
['LICENSES_MAN_LABEL'] = 'Man',
['LICENSES_DIALOG_HEADER'] = 'Do you want to buy this license?',
['LICENSES_DIALOG_CONTENT'] = 'This license will cost you ${price} and will take {timer} seconds to complete.',
},
['es'] = {
['LICENSES_PROGRESS'] = 'Obteniendo licencia...',
['LICENSES_SUCCESS'] = 'Gracias por esperar, aquí tienes tu nueva',
['LICENSES_NO_MONEY'] = 'No tienes dinero suficiente',
['LICENSES_WOMEN_LABEL'] = 'Mujer',
['LICENSES_MAN_LABEL'] = 'Hombre',
['LICENSES_DIALOG_HEADER'] = '¿Quieres comprar esta licencia?',
['LICENSES_DIALOG_CONTENT'] = 'Esta licencia costará ${price} y tardará {timer} segundos en completarse.',
},
}