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:
BIN
resources/[framework]/[addons]/[quasar]/qs-backpacks/.fxap
Normal file
BIN
resources/[framework]/[addons]/[quasar]/qs-backpacks/.fxap
Normal file
Binary file not shown.
@@ -0,0 +1,90 @@
|
||||
--[[
|
||||
Hi dear customer or developer, here you can fully configure your server's
|
||||
framework or you could even duplicate this file to create your own framework.
|
||||
If you do not have much experience, we recommend you download the base version
|
||||
of the framework that you use in its latest version and it will work perfectly.
|
||||
]]
|
||||
|
||||
if Config.Framework ~= 'esx' then
|
||||
return
|
||||
end
|
||||
|
||||
ESX = exports['es_extended']:getSharedObject()
|
||||
|
||||
RegisterNetEvent('esx:playerLoaded')
|
||||
AddEventHandler('esx:playerLoaded', function(xPlayer)
|
||||
Wait(10000)
|
||||
StartThread()
|
||||
end)
|
||||
|
||||
AddEventHandler('onClientResourceStart', function(resourceName)
|
||||
if (GetCurrentResourceName() == resourceName) then
|
||||
ESX = exports['es_extended']:getSharedObject()
|
||||
Wait(10000)
|
||||
StartThread()
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
function getSex()
|
||||
local promise = promise.new()
|
||||
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
|
||||
promise:resolve(skin.sex)
|
||||
end)
|
||||
return Citizen.Await(promise)
|
||||
end
|
||||
|
||||
function OpenStash(metadata)
|
||||
local other = {}
|
||||
other.maxweight = metadata.weight
|
||||
other.slots = metadata.slots
|
||||
TriggerServerEvent('inventory:server:OpenInventory', 'stash', 'Backpack_' .. metadata.ID, other)
|
||||
TriggerEvent('inventory:client:SetCurrentStash', 'Backpack_' .. metadata.ID)
|
||||
repeat Wait(1000) until IsNuiFocused() == false
|
||||
TriggerEvent('backpacks:client:close', metadata.ID)
|
||||
end
|
||||
|
||||
function SendTextMessage(msg, type)
|
||||
if type == 'inform' then
|
||||
lib.notify({
|
||||
title = 'Inventory',
|
||||
description = msg,
|
||||
type = 'inform'
|
||||
})
|
||||
end
|
||||
if type == 'error' then
|
||||
lib.notify({
|
||||
title = 'Inventory',
|
||||
description = msg,
|
||||
type = 'error'
|
||||
})
|
||||
end
|
||||
if type == 'success' then
|
||||
lib.notify({
|
||||
title = 'Inventory',
|
||||
description = msg,
|
||||
type = 'success'
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
function Progressbar(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel)
|
||||
if lib.progressCircle({
|
||||
duration = duration,
|
||||
label = label,
|
||||
position = 'bottom',
|
||||
useWhileDead = useWhileDead,
|
||||
canCancel = canCancel,
|
||||
disable = disableControls,
|
||||
anim = {
|
||||
dict = animation.animDict,
|
||||
clip = animation.anim,
|
||||
flag = animation?.flags
|
||||
},
|
||||
prop = prop
|
||||
}) then
|
||||
onFinish()
|
||||
else
|
||||
onCancel()
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,85 @@
|
||||
--[[
|
||||
Hi dear customer or developer, here you can fully configure your server's
|
||||
framework or you could even duplicate this file to create your own framework.
|
||||
If you do not have much experience, we recommend you download the base version
|
||||
of the framework that you use in its latest version and it will work perfectly.
|
||||
]]
|
||||
|
||||
if Config.Framework ~= 'qb' then
|
||||
return
|
||||
end
|
||||
|
||||
QBCore = exports['qb-core']:GetCoreObject()
|
||||
|
||||
RegisterNetEvent('QBCore:Client:OnPlayerLoaded')
|
||||
AddEventHandler('QBCore:Client:OnPlayerLoaded', function(xPlayer)
|
||||
Wait(10000)
|
||||
StartThread()
|
||||
end)
|
||||
|
||||
AddEventHandler('onClientResourceStart', function(resourceName)
|
||||
if (GetCurrentResourceName() == resourceName) then
|
||||
QBCore = exports['qb-core']:GetCoreObject()
|
||||
Wait(10000)
|
||||
StartThread()
|
||||
end
|
||||
end)
|
||||
|
||||
function getSex()
|
||||
return QBCore.Functions.GetPlayerData()?.charinfo?.gender
|
||||
end
|
||||
|
||||
function OpenStash(metadata)
|
||||
local other = {}
|
||||
other.maxweight = metadata.weight
|
||||
other.slots = metadata.slots
|
||||
TriggerServerEvent('inventory:server:OpenInventory', 'stash', 'Backpack_' .. metadata.ID, other)
|
||||
TriggerEvent('inventory:client:SetCurrentStash', 'Backpack_' .. metadata.ID)
|
||||
repeat Wait(1000) until IsNuiFocused() == false
|
||||
TriggerEvent('backpacks:client:close', metadata.ID)
|
||||
end
|
||||
|
||||
function SendTextMessage(msg, type)
|
||||
if type == 'inform' then
|
||||
lib.notify({
|
||||
title = 'Inventory',
|
||||
description = msg,
|
||||
type = 'inform'
|
||||
})
|
||||
end
|
||||
if type == 'error' then
|
||||
lib.notify({
|
||||
title = 'Inventory',
|
||||
description = msg,
|
||||
type = 'error'
|
||||
})
|
||||
end
|
||||
if type == 'success' then
|
||||
lib.notify({
|
||||
title = 'Inventory',
|
||||
description = msg,
|
||||
type = 'success'
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
function Progressbar(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel)
|
||||
if lib.progressCircle({
|
||||
duration = duration,
|
||||
label = label,
|
||||
position = 'bottom',
|
||||
useWhileDead = useWhileDead,
|
||||
canCancel = canCancel,
|
||||
disable = disableControls,
|
||||
anim = {
|
||||
dict = animation.animDict,
|
||||
clip = animation.anim,
|
||||
flag = animation?.flags
|
||||
},
|
||||
prop = prop
|
||||
}) then
|
||||
onFinish()
|
||||
else
|
||||
onCancel()
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,47 @@
|
||||
if Config.Menu ~= 'esx_menu_default' then
|
||||
return
|
||||
end
|
||||
|
||||
function CreateBackpack(ID)
|
||||
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'create_password',
|
||||
{
|
||||
title = Lang('CREATE_PASSWORD'),
|
||||
}, function(data, menu)
|
||||
local length = string.len(data.value)
|
||||
if length <= 0 then
|
||||
SendTextMessage(Lang('BAD_PASSWORD'), 'error')
|
||||
elseif length < Config.PasswordLength.min then
|
||||
SendTextMessage(Lang('MORE_PASSWORD'), 'error')
|
||||
elseif length > Config.PasswordLength.max then
|
||||
SendTextMessage(Lang('LESS_PASSWORD'), 'error')
|
||||
else
|
||||
SendTextMessage(Lang('ADDED_PASSWORD'), 'success')
|
||||
TriggerServerEvent('backpacks:server:add_password', { ID = ID, password = data.value })
|
||||
menu.close()
|
||||
end
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
end)
|
||||
end
|
||||
|
||||
function CheckMeta(backpack_metadata)
|
||||
if backpack_metadata.locked then
|
||||
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'enter_password',
|
||||
{
|
||||
title = Lang('INTRODUCE_PASSWORD'),
|
||||
}, function(data, menu)
|
||||
if backpack_metadata.password == data.value then
|
||||
menu.close()
|
||||
backpack_metadata.trypassword = data.value
|
||||
OpenBackpack(backpack_metadata)
|
||||
else
|
||||
SendTextMessage(Lang('BAD_PASSWORD'), 'error')
|
||||
menu.close()
|
||||
end
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
end)
|
||||
else
|
||||
OpenBackpack(backpack_metadata)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,48 @@
|
||||
if Config.Menu ~= 'ox_lib' then
|
||||
return
|
||||
end
|
||||
|
||||
function CreateBackpack(ID)
|
||||
if not lib then
|
||||
print('You need to uncomment the ox_lib export on line 10 of qs-backpacks/fxmanifest.lua')
|
||||
return
|
||||
end
|
||||
local keyboard1 = lib.inputDialog(Lang('CREATE_PASSWORD') .. ' Min ' .. Config.PasswordLength.min .. ' Max ' .. Config.PasswordLength.max, { Lang('INTRODUCE_PASSWORD_2') })
|
||||
if not keyboard1 then return end
|
||||
|
||||
local pass = tostring(keyboard1[1])
|
||||
local length = string.len(pass)
|
||||
if length <= 0 then
|
||||
SendTextMessage(Lang('BAD_PASSWORD'), 'error')
|
||||
return
|
||||
end
|
||||
if length < Config.PasswordLength.min then
|
||||
SendTextMessage(Lang('MORE_PASSWORD'), 'error')
|
||||
return
|
||||
end
|
||||
if length > Config.PasswordLength.max then
|
||||
SendTextMessage(Lang('LESS_PASSWORD'), 'error')
|
||||
return
|
||||
end
|
||||
|
||||
SendTextMessage(Lang('ADDED_PASSWORD'), 'success')
|
||||
TriggerServerEvent('backpacks:server:add_password', { ID = ID, password = pass })
|
||||
end
|
||||
|
||||
function CheckMeta(backpack_metadata)
|
||||
if backpack_metadata.locked then
|
||||
if not lib then
|
||||
print('You need to uncomment the ox_lib export on line 10 of qs-backpacks/fxmanifest.lua')
|
||||
return
|
||||
end
|
||||
local data = lib.inputDialog(Lang('INTRODUCE_PASSWORD'), { Lang('INTRODUCE_PASSWORD_2') })
|
||||
if not data then
|
||||
SendTextMessage(Lang('BAD_PASSWORD'), 'error')
|
||||
return
|
||||
end
|
||||
backpack_metadata.trypassword = data[1]
|
||||
OpenBackpack(backpack_metadata)
|
||||
else
|
||||
OpenBackpack(backpack_metadata)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,64 @@
|
||||
if Config.Menu ~= 'qb-menu' then
|
||||
return
|
||||
end
|
||||
|
||||
function CreateBackpack(ID)
|
||||
local inputData = exports['qb-input']:ShowInput({
|
||||
header = Lang('CREATE_PASSWORD') .. ' Min ' .. Config.PasswordLength.min .. ' Max ' .. Config.PasswordLength.max,
|
||||
inputs = {
|
||||
{
|
||||
type = 'password',
|
||||
isRequired = true,
|
||||
name = 'pass', -- name of the input should be unique otherwise it might override
|
||||
type = 'password', -- type of the input
|
||||
text = Lang('INTRODUCE_PASSWORD_2'),
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
if inputData then
|
||||
if not inputData.pass then return end
|
||||
local length = string.len(inputData.pass)
|
||||
if length <= 0 then
|
||||
SendTextMessage(Lang('BAD_PASSWORD'), 'error')
|
||||
return
|
||||
end
|
||||
if length < Config.PasswordLength.min then
|
||||
SendTextMessage(Lang('MORE_PASSWORD'), 'error')
|
||||
return
|
||||
end
|
||||
if length > Config.PasswordLength.max then
|
||||
SendTextMessage(Lang('LESS_PASSWORD'), 'error')
|
||||
return
|
||||
end
|
||||
|
||||
SendTextMessage(Lang('ADDED_PASSWORD'), 'success')
|
||||
TriggerServerEvent('backpacks:server:add_password', { ID = ID, password = inputData.pass })
|
||||
end
|
||||
end
|
||||
|
||||
function CheckMeta(backpack_metadata)
|
||||
if backpack_metadata.locked then
|
||||
local inputData = exports['qb-input']:ShowInput({
|
||||
header = Lang('INTRODUCE_PASSWORD'),
|
||||
inputs = {
|
||||
{
|
||||
type = 'password',
|
||||
isRequired = true,
|
||||
name = 'pass',
|
||||
text = Lang('INTRODUCE_PASSWORD')
|
||||
},
|
||||
}
|
||||
})
|
||||
if inputData then
|
||||
if not inputData.pass then
|
||||
SendTextMessage(Lang('BAD_PASSWORD'), 'error')
|
||||
return
|
||||
end
|
||||
backpack_metadata.trypassword = inputData.pass
|
||||
OpenBackpack(backpack_metadata)
|
||||
end
|
||||
else
|
||||
OpenBackpack(backpack_metadata)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,32 @@
|
||||
if Config.SkinScript ~= 'esx_skin' then
|
||||
return
|
||||
end
|
||||
|
||||
function putClothes(backpack)
|
||||
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
|
||||
local clothes = {
|
||||
male = { ['bags_1'] = backpack.cloth['male'].bag['item'], ['bags_2'] = backpack.cloth['male'].bag['texture'] },
|
||||
female = { ['bags_1'] = backpack.cloth['female'].bag['item'], ['bags_2'] = backpack.cloth['male'].bag['texture'] },
|
||||
}
|
||||
|
||||
if skin.sex == 0 then
|
||||
TriggerEvent('skinchanger:loadClothes', skin, clothes.male)
|
||||
elseif skin.sex == 1 then
|
||||
TriggerEvent('skinchanger:loadClothes', skin, clothes.female)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function RemoveClothes()
|
||||
local cloth = {
|
||||
male = { ['bags_1'] = 0 },
|
||||
female = { ['bags_1'] = 0 },
|
||||
}
|
||||
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
|
||||
if skin.sex == 0 then
|
||||
TriggerEvent('skinchanger:loadClothes', skin, cloth.male)
|
||||
elseif skin.sex == 1 then
|
||||
TriggerEvent('skinchanger:loadClothes', skin, cloth.female)
|
||||
end
|
||||
end)
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
if Config.SkinScript ~= 'illenium-appearance' then
|
||||
return
|
||||
end
|
||||
|
||||
function putClothes(backpack)
|
||||
if getSex() == 0 then
|
||||
TriggerEvent('qb-clothing:client:loadOutfit', { outfitData = backpack.cloth['male'] })
|
||||
else
|
||||
TriggerEvent('qb-clothing:client:loadOutfit', { outfitData = backpack.cloth['female'] })
|
||||
end
|
||||
end
|
||||
|
||||
function RemoveClothes()
|
||||
TriggerEvent('qb-clothing:client:loadOutfit', {
|
||||
outfitData = {
|
||||
['bag'] = { item = -1, texture = 0 }
|
||||
}
|
||||
})
|
||||
end
|
||||
@@ -0,0 +1,19 @@
|
||||
if Config.SkinScript ~= 'qb-clothing' then
|
||||
return
|
||||
end
|
||||
|
||||
function putClothes(backpack)
|
||||
if getSex() == 0 then
|
||||
TriggerEvent('qb-clothing:client:loadOutfit', { outfitData = backpack.cloth['male'] })
|
||||
else
|
||||
TriggerEvent('qb-clothing:client:loadOutfit', { outfitData = backpack.cloth['female'] })
|
||||
end
|
||||
end
|
||||
|
||||
function RemoveClothes()
|
||||
TriggerEvent('qb-clothing:client:loadOutfit', {
|
||||
outfitData = {
|
||||
['bag'] = { item = -1, texture = 0 }
|
||||
}
|
||||
})
|
||||
end
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,34 @@
|
||||
fx_version 'adamant'
|
||||
|
||||
game 'gta5'
|
||||
|
||||
lua54 'yes'
|
||||
|
||||
shared_scripts {
|
||||
'@ox_lib/init.lua',
|
||||
'shared/*.lua',
|
||||
'locales/*.lua',
|
||||
'client/shared.lua'
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'server/**/**/**.lua'
|
||||
}
|
||||
|
||||
client_scripts {
|
||||
'client/**/**/**.lua'
|
||||
}
|
||||
|
||||
escrow_ignore {
|
||||
'shared/*.lua',
|
||||
'locales/*.lua',
|
||||
'client/custom/**/*.lua'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
'/server:4752', -- ⚠️PLEASE READ⚠️ This requires at least server build 4700 or higher
|
||||
'/assetpacks',
|
||||
'qs-inventory'
|
||||
}
|
||||
|
||||
dependency '/assetpacks'
|
||||
@@ -0,0 +1,60 @@
|
||||
# FOR QBCore `qb-core/shared/items`
|
||||
```lua
|
||||
['backpack'] = { ['name'] = 'backpack', ['label'] = 'backpack', ['weight'] = 0, ['type'] = 'item', ['image'] = 'backpack.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'No have' },
|
||||
['backpack2'] = { ['name'] = 'backpack2', ['label'] = 'backpack2', ['weight'] = 0, ['type'] = 'item', ['image'] = 'backpack2.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'No have' },
|
||||
['briefcase'] = { ['name'] = 'briefcase', ['label'] = 'briefcase', ['weight'] = 0, ['type'] = 'item', ['image'] = 'briefcase.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'No have' },
|
||||
['paramedicbag'] = { ['name'] = 'paramedicbag', ['label'] = 'paramedicbag', ['weight'] = 0, ['type'] = 'item', ['image'] = 'paramedicbag.png', ['unique'] = true, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'No have' },
|
||||
```
|
||||
|
||||
|
||||
# FOR ESX `qs-inventory/shared/items.lua`
|
||||
```lua
|
||||
['backpack'] = {
|
||||
['name'] = 'backpack',
|
||||
['label'] = 'backpack',
|
||||
['weight'] = 0,
|
||||
['type'] = 'item',
|
||||
['image'] = 'backpack.png',
|
||||
['unique'] = true,
|
||||
['useable'] = true,
|
||||
['shouldClose'] = true,
|
||||
['combinable'] = nil,
|
||||
['description'] = 'No have'
|
||||
},
|
||||
['backpack2'] = {
|
||||
['name'] = 'backpack2',
|
||||
['label'] = 'backpack2',
|
||||
['weight'] = 0,
|
||||
['type'] = 'item',
|
||||
['image'] = 'backpack2.png',
|
||||
['unique'] = true,
|
||||
['useable'] = true,
|
||||
['shouldClose'] = true,
|
||||
['combinable'] = nil,
|
||||
['description'] = 'No have'
|
||||
},
|
||||
['briefcase'] = {
|
||||
['name'] = 'briefcase',
|
||||
['label'] = 'briefcase',
|
||||
['weight'] = 0,
|
||||
['type'] = 'item',
|
||||
['image'] = 'briefcase.png',
|
||||
['unique'] = true,
|
||||
['useable'] = true,
|
||||
['shouldClose'] = true,
|
||||
['combinable'] = nil,
|
||||
['description'] = 'No have'
|
||||
},
|
||||
['paramedicbag'] = {
|
||||
['name'] = 'paramedicbag',
|
||||
['label'] = 'paramedicbag',
|
||||
['weight'] = 0,
|
||||
['type'] = 'item',
|
||||
['image'] = 'paramedicbag.png',
|
||||
['unique'] = true,
|
||||
['useable'] = true,
|
||||
['shouldClose'] = true,
|
||||
['combinable'] = nil,
|
||||
['description'] = 'No have'
|
||||
},
|
||||
```
|
||||
@@ -0,0 +1,14 @@
|
||||
Locales['cs'] = {
|
||||
['INTRODUCE_PASSWORD'] = 'Zadejte heslo',
|
||||
['INTRODUCE_PASSWORD_2'] = 'Heslo',
|
||||
['CREATE_PASSWORD'] = 'Vytvořit heslo',
|
||||
['OPEN'] = 'Otevírám...',
|
||||
['CLOSE'] = 'Zavírám...',
|
||||
['BAD_PASSWORD'] = 'Nesprávné heslo...',
|
||||
['ADDED_PASSWORD'] = 'Přidáno heslo..',
|
||||
['MORE_PASSWORD'] = 'Heslo musí mít více znaků',
|
||||
['LESS_PASSWORD'] = 'Heslo musí mít méně znaků',
|
||||
['EMPLY_PASSWORD'] = 'Musíte něco vložit',
|
||||
['NO_BACKPACK'] = 'Batoh nemáte po ruce.',
|
||||
['FAILED_PASSWORD'] = 'Nepodařilo se přidat heslo.',
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
Locales['de'] = {
|
||||
['INTRODUCE_PASSWORD'] = 'Passwort eingeben',
|
||||
['INTRODUCE_PASSWORD_2'] = 'Passwort',
|
||||
['CREATE_PASSWORD'] = 'Erstelle ein Passwort',
|
||||
['OPEN'] = 'Öffnen...',
|
||||
['CLOSE'] = 'Schließen...',
|
||||
['BAD_PASSWORD'] = 'Falsches Passwort...',
|
||||
['ADDED_PASSWORD'] = 'Passwort hinzugefügt...',
|
||||
['MORE_PASSWORD'] = 'Das Passwort muss länger sein',
|
||||
['LESS_PASSWORD'] = 'Das Passwort muss kürzer sein',
|
||||
['EMPLY_PASSWORD'] = 'Du musst ein Passwort eingeben',
|
||||
['NO_BACKPACK'] = 'Der Rucksack befindet sich nicht in deiner Hand.',
|
||||
['FAILED_PASSWORD'] = 'Passwort konnte nicht hinzugefügt werden.',
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
Locales['en'] = {
|
||||
['INTRODUCE_PASSWORD'] = 'Enter the password',
|
||||
['INTRODUCE_PASSWORD_2'] = 'Password',
|
||||
['CREATE_PASSWORD'] = 'Create a password',
|
||||
['OPEN'] = 'Opening...',
|
||||
['CLOSE'] = 'Closing...',
|
||||
['BAD_PASSWORD'] = 'Incorrect password...',
|
||||
['ADDED_PASSWORD'] = 'Added password..',
|
||||
['MORE_PASSWORD'] = 'The password must have more characters',
|
||||
['LESS_PASSWORD'] = 'The password must have fewer characters',
|
||||
['EMPLY_PASSWORD'] = 'You need to put something',
|
||||
['NO_BACKPACK'] = 'Backpack is not on your hand.',
|
||||
['FAILED_PASSWORD'] = 'Failed to add password.',
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
Locales['es'] = {
|
||||
['INTRODUCE_PASSWORD'] = 'Introduce la contraseña',
|
||||
['INTRODUCE_PASSWORD_2'] = 'Contraseña',
|
||||
['CREATE_PASSWORD'] = 'Crea una contraseña',
|
||||
['OPEN'] = 'Abriendo...',
|
||||
['CLOSE'] = 'Cerrando...',
|
||||
['BAD_PASSWORD'] = 'Contraseña incorrecta...',
|
||||
['ADDED_PASSWORD'] = 'Contraseña incorrecta...',
|
||||
['MORE_PASSWORD'] = 'La contraseña tiene que tener mas caracteres',
|
||||
['LESS_PASSWORD'] = 'La contraseña tiene que tener menos caracteres',
|
||||
['EMPLY_PASSWORD'] = 'Necesitas poner algo',
|
||||
['NO_BACKPACK'] = 'La mochila no esta en tu mano.',
|
||||
['FAILED_PASSWORD'] = 'No pudiste agregar la contraseña.',
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
Locales['fr'] = {
|
||||
['INTRODUCE_PASSWORD'] = 'Entrer un mot de passe',
|
||||
['INTRODUCE_PASSWORD_2'] = 'Mot de passe',
|
||||
['CREATE_PASSWORD'] = 'Créez votre mot de passe',
|
||||
['OPEN'] = 'Ouverture...',
|
||||
['CLOSE'] = 'Fermeture...',
|
||||
['BAD_PASSWORD'] = 'Mot de passe incorrect...',
|
||||
['ADDED_PASSWORD'] = 'Nouveau mot de passe..',
|
||||
['MORE_PASSWORD'] = 'Votre mot de passe est trop court.',
|
||||
['LESS_PASSWORD'] = 'Votre mot de passe est trop long.',
|
||||
['EMPLY_PASSWORD'] = 'Vous devez remplir les champs.',
|
||||
['NO_BACKPACK'] = "Le sac n'est pas dans votre inventaire.",
|
||||
['FAILED_PASSWORD'] = "Erreur lors de l'ajout du mot de passe.",
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
Locales['hu'] = {
|
||||
['INTRODUCE_PASSWORD'] = 'Írja be a jelszót',
|
||||
['INTRODUCE_PASSWORD_2'] = 'Jelszó',
|
||||
['CREATE_PASSWORD'] = 'Hozzon létre egy jelszót',
|
||||
['OPEN'] = 'Nyítás...',
|
||||
['CLOSE'] = 'Zárás...',
|
||||
['BAD_PASSWORD'] = 'hibás jelszó...',
|
||||
['ADDED_PASSWORD'] = 'Hozzáadta jelszót..',
|
||||
['MORE_PASSWORD'] = 'A jelszónak több karakterből kell állnia',
|
||||
['LESS_PASSWORD'] = 'A jelszónak kevesebb karakterből kell állnia',
|
||||
['EMPLY_PASSWORD'] = 'Be kell tenni valamit,',
|
||||
['NO_BACKPACK'] = 'A hátizsák nincs a kezedben.',
|
||||
['FAILED_PASSWORD'] = 'Nem sikerült a jelszó hozzáadása.',
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
Locales['nl'] = {
|
||||
['INTRODUCE_PASSWORD'] = 'Vul wachtwoord in',
|
||||
['INTRODUCE_PASSWORD_2'] = 'Wachtwoord',
|
||||
['CREATE_PASSWORD'] = 'Wachtwoord aanmaken',
|
||||
['OPEN'] = 'Openen...',
|
||||
['CLOSE'] = 'Sluiten...',
|
||||
['BAD_PASSWORD'] = 'Onjuist wachtwoord...',
|
||||
['ADDED_PASSWORD'] = 'Wachtwoord toegevoegd..',
|
||||
['MORE_PASSWORD'] = 'Het wachtwoord voldoet niet aan de hoeveelheid tekens',
|
||||
['LESS_PASSWORD'] = 'Het wachtwoord heeft teveel tekens',
|
||||
['EMPLY_PASSWORD'] = 'Je moet iets ingeven',
|
||||
['NO_BACKPACK'] = 'Je draagt momenteel geen tas in je hand.',
|
||||
['FAILED_PASSWORD'] = 'Wachtwoord toevoegen mislukt.',
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
Locales['pl'] = {
|
||||
['INTRODUCE_PASSWORD'] = 'Wprowadź hasło',
|
||||
['INTRODUCE_PASSWORD_2'] = 'Podaj hasło',
|
||||
['CREATE_PASSWORD'] = 'Utwórz hasło',
|
||||
['OPEN'] = 'Otwarcie...',
|
||||
['CLOSE'] = 'Zamknięcie...',
|
||||
['BAD_PASSWORD'] = 'Nieprawidłowe hasło...',
|
||||
['ADDED_PASSWORD'] = 'Dodane hasło...',
|
||||
['MORE_PASSWORD'] = 'Hasło musi mieć więcej znaków',
|
||||
['LESS_PASSWORD'] = 'Hasło musi mieć mniej znaków',
|
||||
['EMPLY_PASSWORD'] = 'Musisz coś wpisać',
|
||||
['NO_BACKPACK'] = 'Plecak nie jest pod ręką',
|
||||
['FAILED_PASSWORD'] = 'Nie udało się dodać hasła.',
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
Locales['pt'] = {
|
||||
['INTRODUCE_PASSWORD'] = 'Insira a senha',
|
||||
['INTRODUCE_PASSWORD_2'] = 'Senha',
|
||||
['CREATE_PASSWORD'] = 'Criar senha',
|
||||
['OPEN'] = 'Abrindo...',
|
||||
['CLOSE'] = 'Fechando...',
|
||||
['BAD_PASSWORD'] = 'Senha incorreta...',
|
||||
['ADDED_PASSWORD'] = 'Password adicionada.',
|
||||
['MORE_PASSWORD'] = 'Senha muito curta',
|
||||
['LESS_PASSWORD'] = 'Senha muito longa',
|
||||
['EMPLY_PASSWORD'] = 'É necessário inserir algum valor',
|
||||
['NO_BACKPACK'] = 'A mochila não está na sua mão.',
|
||||
['FAILED_PASSWORD'] = 'Erro ao adicionar a senha.',
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,151 @@
|
||||
Config = Config or {}
|
||||
|
||||
-- Clarification if you are going to create more backpacks you have to add the information in these parts:
|
||||
|
||||
-- qs-inventory/config/metadata.js
|
||||
-- Save information
|
||||
--[[
|
||||
} else if (itemData.name == "YOUR_BACKPACK_NAME") {
|
||||
$(".item-info-title").html("<p>" + label + "</p>");
|
||||
$(".item-info-description").html(
|
||||
"<p><strong>ID: </strong><span>" +
|
||||
itemData.info.ID +
|
||||
"</span></p><p><strong>Weight: </strong><span>" +
|
||||
itemData.info.weight +
|
||||
"</span></p><p><strong>Slots: </strong><span>" +
|
||||
itemData.info.slots +
|
||||
"</span></p>"
|
||||
);
|
||||
]]
|
||||
|
||||
-- qs-inventory/server/custom/GiveItemToPlayer.lua
|
||||
-- For giveitem admin
|
||||
--[[
|
||||
elseif itemData["name"] == "YOUR_BACKPACK_NAME" then
|
||||
info.ID = 'backpack_'..math.random(111111,999999)
|
||||
info.weight = 10000
|
||||
info.slots = 10
|
||||
]]
|
||||
|
||||
-- (IMPORTANT INTEGRATION WITH qs-advancedshops or qs-shops)
|
||||
-- If you want to add the backpack to a qs-shop, you must add an ID to the item. this is the example :
|
||||
--[[
|
||||
qs-shops/config/config.lua or qs-advancedshops/config/shops.lua
|
||||
|
||||
[1] = {
|
||||
name = "backpack",
|
||||
label = 'Backpack',
|
||||
price = 250,
|
||||
amount = 100,
|
||||
info = {}, -- If you put here info = {}, it will automatically take the weight of your configuration
|
||||
type = "item",
|
||||
slot = 1,
|
||||
},
|
||||
[2] = {
|
||||
name = "my_custom_backpack",
|
||||
label = 'UwU Backpack',
|
||||
price = 250,
|
||||
amount = 100,
|
||||
info = { ID = 'ID_'..math.random(111111,999999), weight = 10000 , slots = 10}, -- If you put this information, it will take the information you put in it
|
||||
type = "item",
|
||||
slot = 2,
|
||||
},
|
||||
]]
|
||||
|
||||
-- (important) do not use both prop and cloth at same time just one.
|
||||
Config.Items = {
|
||||
['backpack'] = { --- Item name
|
||||
slots = 10, -- Change in `qs-inventory/server/custom/GiveItemToPlayer.lua`
|
||||
weight = 100000, -- Change in `qs-inventory/server/custom/GiveItemToPlayer.lua`
|
||||
locked = false, -- If you want to have a password change false to true
|
||||
prop = {
|
||||
model = 'vw_prop_vw_backpack_01a',
|
||||
animation = {
|
||||
dict = 'amb@world_human_hiker_standing@female@base',
|
||||
anim = 'base',
|
||||
bone = 'Back', -- LeftHand | RightHand
|
||||
attaching_position = {
|
||||
x = -0.20, -- Up - Down
|
||||
y = -0.10, -- Forward Backward
|
||||
z = 0.0, -- Left - Right
|
||||
x_rotation = 10.0,
|
||||
y_rotation = 90.0,
|
||||
z_rotation = 175.0,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
['backpack2'] = {
|
||||
slots = 6, -- Change in `qs-inventory/server/custom/GiveItemToPlayer.lua`
|
||||
weight = 10000, -- Change in `qs-inventory/server/custom/GiveItemToPlayer.lua`
|
||||
cloth = {
|
||||
male = {
|
||||
['bag'] = { item = 45, texture = 0 }
|
||||
},
|
||||
female = {
|
||||
['bag'] = { item = 45, texture = 0 }
|
||||
}
|
||||
}
|
||||
},
|
||||
['briefcase'] = {
|
||||
slots = 3,
|
||||
weight = 5000,
|
||||
locked = true, -- If you want to have a password change false to true
|
||||
prop = {
|
||||
model = 'prop_ld_suitcase_01',
|
||||
animation = {
|
||||
dict = 'missheistdocksprep1hold_cellphone',
|
||||
anim = 'static',
|
||||
bone = 'RightHand',
|
||||
attaching_position = {
|
||||
x = 0.10,
|
||||
y = 0.0,
|
||||
z = 0.0,
|
||||
x_rotation = 0.0,
|
||||
y_rotation = 280.0,
|
||||
z_rotation = 53.0,
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
['paramedicbag'] = {
|
||||
slots = 10, -- Change in `qs-inventory/server/custom/GiveItemToPlayer.lua`
|
||||
weight = 10000, -- Change in `qs-inventory/server/custom/GiveItemToPlayer.lua`
|
||||
prop = {
|
||||
model = 'xm_prop_smug_crate_s_medical',
|
||||
animation = {
|
||||
dict = 'missheistdocksprep1hold_cellphone',
|
||||
anim = 'static',
|
||||
bone = 'RightHand',
|
||||
attaching_position = {
|
||||
x = 0.29,
|
||||
y = -0.05,
|
||||
z = 0.0,
|
||||
x_rotation = -25.0,
|
||||
y_rotation = 280.0,
|
||||
z_rotation = 75.0,
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Config.Bones = {
|
||||
bones = {
|
||||
['RightHand'] = {
|
||||
bone = 57005,
|
||||
current_active_porp = nil,
|
||||
slot = -1,
|
||||
},
|
||||
['Back'] = {
|
||||
bone = 24818,
|
||||
current_active_porp = nil,
|
||||
slot = -1,
|
||||
},
|
||||
['LeftHand'] = {
|
||||
bone = 18905,
|
||||
current_active_porp = nil,
|
||||
slot = -1,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
Config = Config or {}
|
||||
Locales = Locales 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'
|
||||
|
||||
--[[
|
||||
Language settings.
|
||||
Define the language file located in the locales folder.
|
||||
]]
|
||||
|
||||
Config.Language = 'en' -- Set your lang in locales folder
|
||||
|
||||
--[[
|
||||
Skin script configuration.
|
||||
Supported options:
|
||||
- 'qb-clothing': For servers using QBCore's clothing script.
|
||||
- 'illenium-appearance': For servers using Illenium Appearance.
|
||||
- 'esx_skin': For servers using the ESX Skin system.
|
||||
]]
|
||||
|
||||
Config.SkinScript = 'illenium-appearance' -- 'qb-clothing', 'illenium-appearance', 'esx_skin'
|
||||
|
||||
--[[
|
||||
Menu system configuration.
|
||||
Supported options:
|
||||
- 'qb-menu': For QBCore's menu system.
|
||||
- 'ox_lib': For Ox Library's menu system.
|
||||
- 'esx_menu_default': For ESX's default menu system.
|
||||
]]
|
||||
|
||||
Config.Menu = 'qb-menu' -- 'qb-menu', 'ox_lib', 'esx_menu_default'
|
||||
|
||||
--[[
|
||||
Hotbar slots configuration.
|
||||
Specify the slots that will act as your hotbar.
|
||||
Use an array of numbers, where each number represents a slot.
|
||||
]]
|
||||
|
||||
Config.Hotbar = {
|
||||
1, 2, 3, 4, 5
|
||||
}
|
||||
|
||||
--[[
|
||||
Backpack opening/closing duration.
|
||||
Configure the time (in seconds) it takes to open or close the backpack.
|
||||
]]
|
||||
|
||||
Config.duration = {
|
||||
open = 1, -- Time in seconds to open the backpack.
|
||||
close = 1 -- Time in seconds to close the backpack.
|
||||
}
|
||||
|
||||
--[[
|
||||
Password length settings.
|
||||
Define the minimum and maximum length for passwords when required.
|
||||
]]
|
||||
|
||||
Config.PasswordLength = {
|
||||
min = 3, -- Minimum password length.
|
||||
max = 5 -- Maximum password length.
|
||||
}
|
||||
|
||||
--[[
|
||||
Animation configuration for different backpack actions.
|
||||
Each action includes:
|
||||
- Dict: The animation dictionary used for the action.
|
||||
- Anim: The specific animation name.
|
||||
- Flag: The animation flag (e.g., 49 = upper body only).
|
||||
]]
|
||||
|
||||
Config.Animation = {
|
||||
close = { -- Animation for closing the backpack.
|
||||
Dict = 'clothingshirt', -- Animation dictionary.
|
||||
Anim = 'try_shirt_positive_d', -- Animation name.
|
||||
Flag = 49 -- Animation flag.
|
||||
},
|
||||
|
||||
open = { -- Animation for opening the backpack.
|
||||
Dict = 'clothingshirt', -- Animation dictionary.
|
||||
Anim = 'try_shirt_positive_d', -- Animation name.
|
||||
Flag = 49 -- Animation flag.
|
||||
},
|
||||
|
||||
inBackpack = { -- Animation for interacting with items in the backpack.
|
||||
Dict = 'clothingshirt', -- Animation dictionary.
|
||||
Anim = 'try_shirt_positive_d' -- Animation name.
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user