diff --git a/.gitignore b/.gitignore index a9234a95..bcec7bc2 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ cache/files/17mov_JobCenter/resource.rpf _fix_dupes.py _check_dupes.py _find_dupes.py +artifacts/crashes/136f1640-ac9a-4693-824a-5ccd58f1b359-full.dmp +artifacts/crashes/136f1640-ac9a-4693-824a-5ccd58f1b359.dmp diff --git a/_find_broken.py b/_find_broken.py new file mode 100644 index 00000000..41d7bdf3 --- /dev/null +++ b/_find_broken.py @@ -0,0 +1,24 @@ +import re + +path = r'E:\FiveMserver\server\resources\[framework]\[core]\qb-core\shared\items.lua' +with open(path, 'r', encoding='utf-8', errors='ignore') as f: + lines = f.readlines() + +broken = [] +for i, line in enumerate(lines): + stripped = line.strip() + if "['description']" not in stripped: + continue + if "['name']" not in stripped: + continue + # Count single quotes after ['description'] + idx = stripped.index("['description']") + after = stripped[idx:] + # Should end with ...'}, or ...'}}, + # Check if description value has matching quotes + if after.count("'") % 2 != 0: + broken.append((i+1, stripped[:120])) + +print(f"Found {len(broken)} broken strings:") +for ln, txt in broken: + print(f" L{ln}: {txt}") diff --git a/_fix_strings.py b/_fix_strings.py new file mode 100644 index 00000000..4683a356 --- /dev/null +++ b/_fix_strings.py @@ -0,0 +1,34 @@ +import re + +path = r'E:\FiveMserver\server\resources\[framework]\[core]\qb-core\shared\items.lua' +with open(path, 'r', encoding='utf-8', errors='ignore') as f: + content = f.read() + +# Fix pattern: find description strings that don't end with closing quote before }, +# Pattern: ['description'] = 'text without closing quote}, +# Should be: ['description'] = 'text with closing quote'}, + +fixed = 0 + +lines = content.split('\n') +new_lines = [] +for line in lines: + if "['description']" in line and "['name']" in line: + idx = line.index("['description']") + after = line[idx:] + if after.count("'") % 2 != 0: + # Find the last }, and insert closing quote before it + # Pattern: some text}, -> some text'}, + # Or: some text}}, -> some text'}}, + line = re.sub(r"([^'])\},\s*$", r"\1'},", line) + line = re.sub(r"([^'])\}\},\s*$", r"\1'}},", line) + # Handle CRLF + line = re.sub(r"([^'])\},\r$", r"\1'},\r", line) + line = re.sub(r"([^'])\}\},\r$", r"\1'}},\r", line) + fixed += 1 + new_lines.append(line) + +with open(path, 'w', encoding='utf-8') as f: + f.write('\n'.join(new_lines)) + +print(f"Fixed {fixed} broken description strings") diff --git a/resources.cfg b/resources.cfg index c7bc880a..61519341 100644 --- a/resources.cfg +++ b/resources.cfg @@ -15,5 +15,4 @@ ensure minimap ensure phone-props ensure [casino] ensure [stream] -ensure luxu_admin -ensure [weapons] \ No newline at end of file +ensure luxu_admin \ No newline at end of file diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/.fxap b/resources/[framework]/[addons]/[quasar]/qs-armor/.fxap new file mode 100644 index 00000000..49fea237 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-armor/.fxap differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/client/custom/framework/esx.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/client/custom/framework/esx.lua new file mode 100644 index 00000000..7ca9ede8 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-armor/client/custom/framework/esx.lua @@ -0,0 +1,93 @@ +--[[ + 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() + +function GetPlayerData() + return ESX.GetPlayerData() +end + +local first = true +RegisterNetEvent('esx:playerLoaded', function() + if first then + first = false + CreateThread(function() + Wait(1000) + GetPlayerData(function(PlayerData) + PlayerJob = PlayerData.job + SetPedArmour(PlayerPedId(), PlayerData.metadata['armor']) + currentarmor = PlayerData.metadata['armor'] + startedsync = true + Wait(100) + if Config.VestTexture then + local ped = PlayerPedId() + local PlayerData = GetPlayerData() + local GetArmor = GetPedArmour(ped) + currentVest = GetPedDrawableVariation(ped, 9) + currentVestTexture = GetPedTextureVariation(ped, 9) + if GetArmor >= 1 then + SetVest() + elseif GetArmor >= 51 then + SetHeavyVest() + end + end + end) + end) + end +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 + if onCancel then + onCancel() + end + end +end diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/client/custom/framework/qb.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/client/custom/framework/qb.lua new file mode 100644 index 00000000..51c6b197 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-armor/client/custom/framework/qb.lua @@ -0,0 +1,112 @@ +--[[ + 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() + +function GetPlayerData() + return QBCore.Functions.GetPlayers() +end + +local first = true +RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() + if first then + first = false + CreateThread(function() + Wait(1000) + GetPlayerData(function(PlayerData) + PlayerJob = PlayerData.job + SetPedArmour(PlayerPedId(), PlayerData.metadata['armor']) + currentarmor = PlayerData.metadata['armor'] + startedsync = true + Wait(100) + if Config.VestTexture then + local ped = PlayerPedId() + local PlayerData = QS.GetPlayerData() + local GetArmor = GetPedArmour(ped) + currentVest = GetPedDrawableVariation(ped, 9) + currentVestTexture = GetPedTextureVariation(ped, 9) + if GetArmor >= 1 then + SetVest() + elseif GetArmor >= 51 then + SetHeavyVest() + end + end + end) + end) + end +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 ShowHelpNotification(msg) + BeginTextCommandDisplayHelp('STRING') + AddTextComponentSubstringPlayerName(msg) + EndTextCommandDisplayHelp(0, 0, false, -1) +end + +function DrawText3D(x, y, z, text) + SetTextScale(0.4, 0.4) + SetTextFont(4) + SetTextProportional(1) + SetTextColour(255, 255, 255, 215) + SetTextEntry('STRING') + SetTextCentre(true) + AddTextComponentString(text) + SetDrawOrigin(x, y, z, 0) + DrawText(0.0, 0.0) + ClearDrawOrigin() +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 + if onCancel then + onCancel() + end + end +end diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/client/main.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/client/main.lua new file mode 100644 index 00000000..845d79db Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-armor/client/main.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/fxmanifest.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/fxmanifest.lua new file mode 100644 index 00000000..7a7e20ae --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-armor/fxmanifest.lua @@ -0,0 +1,33 @@ +fx_version 'adamant' + +game 'gta5' + +lua54 'yes' + +shared_scripts { + '@ox_lib/init.lua', + 'shared/*.lua', + 'locales/*.lua', +} + +server_scripts { + 'server/**/**/**.lua' +} + +client_scripts { + 'client/**/**/**.lua' +} + +escrow_ignore { + 'shared/config.lua', + 'locales/*.lua', + 'client/custom/framework/*.lua', + 'server/custom/framework/*.lua', +} + +dependencies { + 'qs-inventory', -- Required. + '/server:4752', -- ⚠️PLEASE READ⚠️ This requires at least server build 4700 or higher +} + +dependency '/assetpacks' \ No newline at end of file diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/locales/de.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/locales/de.lua new file mode 100644 index 00000000..bc2badbe --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-armor/locales/de.lua @@ -0,0 +1,8 @@ +Locales['de'] = { + ["ARMOR_NOTIFICATION_ALREADY_HAVE"] = "Du hast schon eine Weste an", + ["ARMOR_NOTIFICATION_DONT_HAVE"] = "Du hast keine Weste!", + + ["ARMOR_PROGRESS_USE_ARMOR"] = "Kugelsichere Weste Anziehen ...", + ["ARMOR_PROGRESS_USE_HEAVYARMOR"] = "Schwere Weste Anziehen ...", + ["ARMOR_PROGRESS_REMOVE_ARMOR"] = "Weste ausziehen ...", +} \ No newline at end of file diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/locales/en.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/locales/en.lua new file mode 100644 index 00000000..bf1430c9 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-armor/locales/en.lua @@ -0,0 +1,8 @@ +Locales['en'] = { + ["ARMOR_NOTIFICATION_ALREADY_HAVE"] = "You already have a bulletproof vest", + ["ARMOR_NOTIFICATION_DONT_HAVE"] = "You don't have a bulletproof vest", + + ["ARMOR_PROGRESS_USE_ARMOR"] = "Placing Armor ...", + ["ARMOR_PROGRESS_USE_HEAVYARMOR"] = "Placing Heavy Armor ...", + ["ARMOR_PROGRESS_REMOVE_ARMOR"] = "Removing Armor ...", +} \ No newline at end of file diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/locales/es.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/locales/es.lua new file mode 100644 index 00000000..098ee11b --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-armor/locales/es.lua @@ -0,0 +1,8 @@ +Locales['es'] = { + ["ARMOR_NOTIFICATION_ALREADY_HAVE"] = "Ya tienes un chaleco antibalas", + ["ARMOR_NOTIFICATION_DONT_HAVE"] = "No tienes un chaleco antibalas", + + ["ARMOR_PROGRESS_USE_ARMOR"] = "Colocando Armor...", + ["ARMOR_PROGRESS_USE_HEAVYARMOR"] = "Colocando Heavy Armor...", + ["ARMOR_PROGRESS_REMOVE_ARMOR"] = "Quitando Armor...", +} \ No newline at end of file diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/locales/it.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/locales/it.lua new file mode 100644 index 00000000..b86dc526 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-armor/locales/it.lua @@ -0,0 +1,8 @@ +Locales['it'] = { + ["ARMOR_NOTIFICATION_ALREADY_HAVE"] = "Hai già un giubbotto anti-proiettile", + ["ARMOR_NOTIFICATION_DONT_HAVE"] = "Non hai un giubbotto anti-proiettile", + + ["ARMOR_PROGRESS_USE_ARMOR"] = "Indossando giubbotto anti-proiettile...", + ["ARMOR_PROGRESS_USE_HEAVYARMOR"] = "Indossando giubbotto anti-proiettile pesante...", + ["ARMOR_PROGRESS_REMOVE_ARMOR"] = "Togliendo armatura...", +} \ No newline at end of file diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/server/custom/framework/esx.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/server/custom/framework/esx.lua new file mode 100644 index 00000000..32a5b602 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-armor/server/custom/framework/esx.lua @@ -0,0 +1,34 @@ +--[[ + 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() + +function RegisterUsableItem(name, cb) + exports['qs-inventory']:CreateUsableItem(name, cb) +end + +function GetPlayerFromId(source) + return ESX.GetPlayerFromId(source) +end + +function GetIdentifier(source) + return ESX.GetPlayerFromId(source).identifier +end + +function AddItem(source, item, count, slot) + exports['qs-inventory']:AddItem(source, item, count, slot) +end + +function RemoveItem(source, item, count) + local xPlayer = GetPlayerFromId(source) + xPlayer.removeInventoryItem(item, count) +end diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/server/custom/framework/qb.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/server/custom/framework/qb.lua new file mode 100644 index 00000000..94bd2653 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-armor/server/custom/framework/qb.lua @@ -0,0 +1,34 @@ +--[[ + 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() + +function RegisterUsableItem(name, cb) + exports['qs-inventory']:CreateUsableItem(name, cb) +end + +function GetPlayerFromId(player) + return QBCore.Functions.GetPlayer(player) +end + +function GetIdentifier(player) + return QBCore.Functions.GetPlayer(player).PlayerData.citizenid +end + +function AddItem(source, item, count, slot) + exports['qs-inventory']:AddItem(source, item, count, slot) +end + +function RemoveItem(source, item, count) + local xPlayer = GetPlayerFromId(source) + xPlayer.Functions.RemoveItem(item, count) +end diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/server/main.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/server/main.lua new file mode 100644 index 00000000..aca63d80 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-armor/server/main.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/server/modules/CreateUsableItem.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/server/modules/CreateUsableItem.lua new file mode 100644 index 00000000..bd46dd2c Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-armor/server/modules/CreateUsableItem.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/shared/config.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/shared/config.lua new file mode 100644 index 00000000..3d2ddcd6 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-armor/shared/config.lua @@ -0,0 +1,103 @@ +Config = {} +Locales = {} +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' + +--[[ + Set the primary language for the resource. + Choose one of the default languages located in locales/*. + If your desired language is not listed, feel free to create your own! +]] + +Config.Language = 'en' + +--[[ + General configuration settings for the resource. + Customize each option as needed. +]] + +Config.Progressbar = { -- Timer durations for progress bars (in milliseconds). + UseArmor = 5000, -- Duration for applying regular armor. + UseHeavyArmor = 5000, -- Duration for applying heavy armor. + ResetArmor = 2500 -- Duration for removing the armor. +} + +Config.SetPedArmour = { -- Amount of armor applied to the player. + UseArmor = 50, -- Armor value for regular armor. + UseHeavyArmor = 100, -- Armor value for heavy armor. + ResetArmor = 0 -- Armor value when the vest is removed. +} + +--[[ + Command used to remove the player's vest. +]] + +Config.ResetArmor = 'resetarmor' -- Command to reset/remove your vest. + +--[[ + Configuration to check if a player has a vest equipped. +]] + +Config.VestTexture = true -- Should vest textures be used? (true = Yes, false = No) +Config.CheckVest = { + check = false, -- Enable automatic vest checks? (true = Yes, false = No) + time = 30000 -- Frequency of checks (in milliseconds). Ignored if check = false. +} + +--[[ + Vest configuration based on player gender. + Customize the vest components for both male and female characters. +]] + +Config.Vest = { + male = { + ['bproof_1'] = 6, -- Main vest component ID for males. + ['bproof_2'] = 1 -- Secondary vest texture ID for males. + }, + female = { + ['bproof_1'] = 0, -- Main vest component ID for females. + ['bproof_2'] = 0 -- Secondary vest texture ID for females. + }, + + maleHeavy = { + ['bproof_1'] = 27, -- Main heavy vest component ID for males. + ['bproof_2'] = 2 -- Secondary heavy vest texture ID for males. + }, + + femaleHeavy = { + ['bproof_1'] = 6, -- Main heavy vest component ID for females. + ['bproof_2'] = 0 -- Secondary heavy vest texture ID for females. + } +} + +--[[ + Editable functions to handle vest application or removal. + These functions are only executed if VestTexture is set to true. +]] + +function SetVest() -- Function to apply the regular vest texture. + local isMale = GetEntityModel(PlayerPedId()) == joaat('mp_m_freemode_01') + local vest = isMale and Config.Vest.male or Config.Vest.female + SetPedComponentVariation(PlayerPedId(), 9, vest['bproof_1'], vest['bproof_2'], 0) +end + +function SetHeavyVest() -- Function to apply the heavy vest texture. + local isMale = GetEntityModel(PlayerPedId()) == joaat('mp_m_freemode_01') + local vest = isMale and Config.Vest.maleHeavy or Config.Vest.femaleHeavy + SetPedComponentVariation(PlayerPedId(), 9, vest['bproof_1'], vest['bproof_2'], 0) +end + +function RemoveVest() -- Function to remove the vest texture. + SetPedComponentVariation(PlayerPedId(), 9, 0, 1, 0) +end + +--[[ + Debug mode configuration. + When enabled, detailed debug prints/logs are displayed for development purposes. + Use this only during development/testing phases. +]] + +Config.Debug = false diff --git a/resources/[framework]/[addons]/[quasar]/qs-armor/shared/utils.lua b/resources/[framework]/[addons]/[quasar]/qs-armor/shared/utils.lua new file mode 100644 index 00000000..38abf6e9 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-armor/shared/utils.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/.fxap b/resources/[framework]/[addons]/[quasar]/qs-backpacks/.fxap new file mode 100644 index 00000000..a022f63d Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-backpacks/.fxap differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/framework/esx.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/framework/esx.lua new file mode 100644 index 00000000..3827a592 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/framework/esx.lua @@ -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 diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/framework/qb.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/framework/qb.lua new file mode 100644 index 00000000..b54eecdb --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/framework/qb.lua @@ -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 diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/menus/esx_menu_default.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/menus/esx_menu_default.lua new file mode 100644 index 00000000..fc656655 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/menus/esx_menu_default.lua @@ -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 diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/menus/ox_lib.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/menus/ox_lib.lua new file mode 100644 index 00000000..db449a6a --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/menus/ox_lib.lua @@ -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 diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/menus/qb-menu.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/menus/qb-menu.lua new file mode 100644 index 00000000..c88bf015 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/menus/qb-menu.lua @@ -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 diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/skins/esx_skin.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/skins/esx_skin.lua new file mode 100644 index 00000000..c35b4873 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/skins/esx_skin.lua @@ -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 diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/skins/illenium-appearance.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/skins/illenium-appearance.lua new file mode 100644 index 00000000..bb026345 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/skins/illenium-appearance.lua @@ -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 diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/skins/qb-clothing.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/skins/qb-clothing.lua new file mode 100644 index 00000000..83d957c3 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/custom/skins/qb-clothing.lua @@ -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 diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/main.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/main.lua new file mode 100644 index 00000000..bfc10969 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/main.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/shared.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/shared.lua new file mode 100644 index 00000000..75ef4f96 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-backpacks/client/shared.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/fxmanifest.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/fxmanifest.lua new file mode 100644 index 00000000..059f7c47 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/fxmanifest.lua @@ -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' \ No newline at end of file diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/items.md b/resources/[framework]/[addons]/[quasar]/qs-backpacks/items.md new file mode 100644 index 00000000..1ee268dd --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/items.md @@ -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' + }, +``` \ No newline at end of file diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/cs.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/cs.lua new file mode 100644 index 00000000..fdcb8dfa --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/cs.lua @@ -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.', +} diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/de.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/de.lua new file mode 100644 index 00000000..61c125e7 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/de.lua @@ -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.', +} diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/en.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/en.lua new file mode 100644 index 00000000..8d7205b4 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/en.lua @@ -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.', +} diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/es.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/es.lua new file mode 100644 index 00000000..083fc6d2 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/es.lua @@ -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.', +} diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/fr.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/fr.lua new file mode 100644 index 00000000..3cec6b6d --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/fr.lua @@ -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.", +} diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/hu.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/hu.lua new file mode 100644 index 00000000..811c05f3 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/hu.lua @@ -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.', +} diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/nl.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/nl.lua new file mode 100644 index 00000000..8d03a319 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/nl.lua @@ -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.', +} diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/pl.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/pl.lua new file mode 100644 index 00000000..c58fe872 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/pl.lua @@ -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.', +} diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/pt.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/pt.lua new file mode 100644 index 00000000..ab66b43c --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/locales/pt.lua @@ -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.', +} diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/server/main.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/server/main.lua new file mode 100644 index 00000000..5975e196 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-backpacks/server/main.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/shared/backpacks.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/shared/backpacks.lua new file mode 100644 index 00000000..a17a4ff2 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/shared/backpacks.lua @@ -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("
" + label + "
"); + $(".item-info-description").html( + "ID: " + + itemData.info.ID + + "
Weight: " + + itemData.info.weight + + "
Slots: " + + itemData.info.slots + + "
" + ); +]] + +-- 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, + }, + } +} diff --git a/resources/[framework]/[addons]/[quasar]/qs-backpacks/shared/config.lua b/resources/[framework]/[addons]/[quasar]/qs-backpacks/shared/config.lua new file mode 100644 index 00000000..61dbfa82 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-backpacks/shared/config.lua @@ -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. + }, +} diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/.fxap b/resources/[framework]/[addons]/[quasar]/qs-inventory/.fxap new file mode 100644 index 00000000..031c6d8a Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/.fxap differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/esx.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/esx.lua new file mode 100644 index 00000000..6530dcf9 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/esx.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/illenium.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/illenium.lua new file mode 100644 index 00000000..55d9b783 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/illenium.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/qb.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/qb.lua new file mode 100644 index 00000000..7f6b9ac0 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/qb.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/rcore.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/rcore.lua new file mode 100644 index 00000000..4f122c3b Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/rcore.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/standalone.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/standalone.lua new file mode 100644 index 00000000..5d7d4bfe Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/clothing/standalone.lua differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/framework/esx.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/framework/esx.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/client/custom/framework/esx.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/framework/esx.lua diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/framework/qb.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/framework/qb.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/client/custom/framework/qb.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/framework/qb.lua diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/CraftItems.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/CraftItems.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/client/custom/misc/CraftItems.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/CraftItems.lua diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/GiveStarterItems.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/GiveStarterItems.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/client/custom/misc/GiveStarterItems.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/GiveStarterItems.lua diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/OpenInventory.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/OpenInventory.lua similarity index 78% rename from resources/[framework]/[addons]/qs-inventory/client/custom/misc/OpenInventory.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/OpenInventory.lua index ed36ae75..c272a5bc 100644 --- a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/OpenInventory.lua +++ b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/OpenInventory.lua @@ -1,3 +1,34 @@ +local function SyncEquippedWeaponAmmoOnOpen(inventory) + if not inventory then return inventory end + + local ped = cache.ped + local weaponHash = GetSelectedPedWeapon(ped) + local weaponData = WeaponList and WeaponList[weaponHash] + if not weaponData or weaponData.name == 'weapon_unarmed' then + return inventory + end + + local ammo = GetAmmoInPedWeapon(ped, weaponHash) or 0 + + -- Prefer the equipped slot if CurrentWeaponData is available. + local preferredSlot = CurrentWeaponData and CurrentWeaponData.slot + if preferredSlot and inventory[preferredSlot] and inventory[preferredSlot].name == weaponData.name then + inventory[preferredSlot].info = inventory[preferredSlot].info or {} + inventory[preferredSlot].info.ammo = ammo + return inventory + end + + for _, item in pairs(inventory) do + if item and item.type == 'weapon' and item.name == weaponData.name then + item.info = item.info or {} + item.info.ammo = ammo + break + end + end + + return inventory +end + local checkDistanceInventories = { 'shop', 'stash', @@ -38,6 +69,7 @@ RegisterNetEvent(Config.InventoryPrefix .. ':client:OpenInventory', function(Pla end inventory = data.inventory + inventory = SyncEquippedWeaponAmmoOnOpen(inventory) other = data.other data = GetPlayerData() diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/SellingItems.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/SellingItems.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/client/custom/misc/SellingItems.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/SellingItems.lua diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/UseWeapon.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/UseWeapon.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/client/custom/misc/UseWeapon.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/UseWeapon.lua diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/admin_giveitem.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/admin_giveitem.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/client/custom/misc/admin_giveitem.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/admin_giveitem.lua diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/commands.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/commands.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/client/custom/misc/commands.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/commands.lua diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/handleColors.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/handleColors.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/client/custom/misc/handleColors.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/handleColors.lua diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/jaksam.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/jaksam.lua similarity index 96% rename from resources/[framework]/[addons]/qs-inventory/client/custom/misc/jaksam.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/jaksam.lua index 1c281ea3..be24fd38 100644 --- a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/jaksam.lua +++ b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/jaksam.lua @@ -2,7 +2,7 @@ if not GetResourceState('jobs_creator') == 'missing' then return end --- Warning('Started the compatibility module with jobs_creator') +Warning('Started the compatibility module with jobs_creator') CreateThread(function() local other = {} diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/jonska.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/jonska.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/client/custom/misc/jonska.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/jonska.lua diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/robbery.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/robbery.lua similarity index 91% rename from resources/[framework]/[addons]/qs-inventory/client/custom/misc/robbery.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/robbery.lua index d5beb498..5cd23758 100644 --- a/resources/[framework]/[addons]/qs-inventory/client/custom/misc/robbery.lua +++ b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/misc/robbery.lua @@ -15,28 +15,22 @@ local function LoadAnimDict(dict) end end -RegisterKeyMapping('+handsup', Lang('INVENTORY_KEYMAPPING_HANDSUP_LABEL'), 'keyboard', Config.KeyBinds.handsup) +RegisterKeyMapping('handsup', Lang('INVENTORY_KEYMAPPING_HANDSUP_LABEL'), 'keyboard', Config.KeyBinds.handsup) -local handsUpActive = false - -RegisterCommand('+handsup', function() +RegisterCommand('handsup', function() if not IsPedInAnyVehicle(PlayerPedId(), false) and GetEntityHealth(PlayerPedId()) > 1 then - if canHandsUp and not handsUpActive then - handsUpActive = true - RequestAnimDict(lib) - while not HasAnimDictLoaded(lib) do - Wait(100) - end - SetCurrentPedWeapon(PlayerPedId(), GetHashKey('WEAPON_UNARMED'), true) - TaskPlayAnim(PlayerPedId(), lib, anim, 2.0, 2.5, -1, 49, 0, 0, 0, 0) + RequestAnimDict(lib) + while not HasAnimDictLoaded(lib) do + Wait(100) + end + SetCurrentPedWeapon(PlayerPedId(), GetHashKey('WEAPON_UNARMED'), true) + if IsEntityPlayingAnim(PlayerPedId(), lib, anim, 3) then + ClearPedSecondaryTask(PlayerPedId()) + else + if canHandsUp then + TaskPlayAnim(PlayerPedId(), lib, anim, 2.0, 2.5, -1, 49, 0, 0, 0, 0) + end end - end -end) - -RegisterCommand('-handsup', function() - if handsUpActive then - handsUpActive = false - ClearPedSecondaryTask(PlayerPedId()) end end) diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/provider/qb-inventory.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/provider/qb-inventory.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/client/custom/provider/qb-inventory.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/provider/qb-inventory.lua diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/target/qb.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/target/qb.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/client/custom/target/qb.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/custom/target/qb.lua diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/main.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/main.lua new file mode 100644 index 00000000..3e9a6980 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/main.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/clothing.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/clothing.lua new file mode 100644 index 00000000..b9fdde25 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/clothing.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/crafting.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/crafting.lua new file mode 100644 index 00000000..cdf18368 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/crafting.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/debug.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/debug.lua new file mode 100644 index 00000000..01a27498 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/debug.lua @@ -0,0 +1,31 @@ +if not Config.Debug then + return +end + +Debug('Debug Command', 'inventory:openStash command initialized') +RegisterCommand('inventory:openStash', function(source, args) + local id = args[1] or source + local stashId = 'inventory_debug_stash' .. id + + TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'stash', stashId) + TriggerEvent(Config.InventoryPrefix .. ':client:SetCurrentStash', stashId) +end) + +Debug('Debug Command', 'inventory:search command initialized') +RegisterCommand('inventory:search', function(source, args) + TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'otherplayer', tonumber(args[1])) +end) + +Debug('Debug Command', 'inventory:openOther command initialized') +RegisterCommand('inventory:openOther', function(source, args, raw) + local target = tonumber(args[1]) + if not target then + Debug('Debug Command', 'Invalid target ID') + return + end + + TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'otherplayer', target) +end) +TriggerEvent('chat:addSuggestion', '/inventory:openOther', 'Open inventory of another player', { + { name = 'targetId', help = 'Target player ID' }, +}) diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/internal.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/internal.lua new file mode 100644 index 00000000..d441caaf Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/internal.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/overextended.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/overextended.lua new file mode 100644 index 00000000..858a88e4 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/overextended.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/placeable.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/placeable.lua new file mode 100644 index 00000000..55c8dfd6 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/placeable.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/raycast.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/raycast.lua new file mode 100644 index 00000000..2b01a484 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/raycast.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/scaleform.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/scaleform.lua new file mode 100644 index 00000000..051b3d23 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/scaleform.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/storage.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/storage.lua new file mode 100644 index 00000000..4117757f Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/storage.lua differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/modules/suggestion.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/suggestion.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/client/modules/suggestion.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/suggestion.lua diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/throw.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/throw.lua new file mode 100644 index 00000000..210ee527 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/throw.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/trade.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/trade.lua new file mode 100644 index 00000000..3acbdb01 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/trade.lua differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/modules/weapons.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/weapons.lua similarity index 91% rename from resources/[framework]/[addons]/qs-inventory/client/modules/weapons.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/weapons.lua index b60fb556..a38ad373 100644 --- a/resources/[framework]/[addons]/qs-inventory/client/modules/weapons.lua +++ b/resources/[framework]/[addons]/[quasar]/qs-inventory/client/modules/weapons.lua @@ -2,6 +2,8 @@ local PlayerData = GetPlayerData() local CanShoot, MultiplierAmount = true, 0 CurrentWeaponData = {} +local weaponTrackingActive = false + exports('GetCurrentWeapon', function() return CurrentWeaponData end) @@ -10,6 +12,55 @@ lib.callback.register('weapons:client:GetCurrentWeapon', function() return CurrentWeaponData end) +local function SyncWeaponToServer() + if not CurrentWeaponData or not CurrentWeaponData.info or not CurrentWeaponData.name then return end + + local ammo = CurrentWeaponData.info.ammo or 0 + + TriggerServerEvent('weapons:server:UpdateWeaponAmmo', CurrentWeaponData, ammo) + + if MultiplierAmount > 0 then + TriggerServerEvent('weapons:server:UpdateWeaponQuality', CurrentWeaponData, MultiplierAmount, ammo) + MultiplierAmount = 0 + end +end + +local function StartWeaponTracking() + if weaponTrackingActive then return end + weaponTrackingActive = true + + CreateThread(function() + while weaponTrackingActive and CurrentWeaponData and next(CurrentWeaponData) do + local ped = PlayerPedId() + local weapon = GetSelectedPedWeapon(ped) + + if weapon ~= `WEAPON_UNARMED` and CurrentWeaponData.info then + CurrentWeaponData.info.ammo = GetAmmoInPedWeapon(ped, weapon) + end + + if IsPedShooting(ped) then + if CanShoot then + if weapon and weapon ~= 0 and WeaponList[weapon] then + MultiplierAmount = MultiplierAmount + 1 + end + else + if weapon ~= `WEAPON_UNARMED` then + TriggerEvent(Config.InventoryPrefix .. ':client:CheckWeapon', WeaponList[weapon]['name']) + SendTextMessage(Lang('INVENTORY_NOTIFICATION_WEAPON_BROKEN'), 'error') + MultiplierAmount = 0 + end + end + end + Wait(100) + end + weaponTrackingActive = false + end) +end + +local function StopWeaponTracking() + weaponTrackingActive = false +end + CreateThread(function() while not Config.WeaponsOnVehicle do Wait(250) @@ -92,12 +143,19 @@ RegisterNetEvent('addAttachment', function(component, urltint) end) RegisterNetEvent('weapons:client:SetCurrentWeapon', function(data, bool) - if data ~= false then + if CurrentWeaponData and next(CurrentWeaponData) then + SyncWeaponToServer() + StopWeaponTracking() + end + + if data ~= false and data ~= nil then CurrentWeaponData = data + CanShoot = bool + StartWeaponTracking() else CurrentWeaponData = {} + CanShoot = bool end - CanShoot = bool end) RegisterNetEvent('weapons:client:SetWeaponQuality', function(amount) @@ -291,52 +349,6 @@ CreateThread(function() SetWeaponsNoAutoswap(true) end) -LastUpdatedAmmoTime = nil -CreateThread(function() - while true do - local ped = PlayerPedId() - if GetSelectedPedWeapon(ped) ~= `WEAPON_UNARMED` and CurrentWeaponData?.info and (IsControlJustReleased(0, 24) or IsDisabledControlJustReleased(0, 24)) then - local weapon = GetSelectedPedWeapon(ped) - local ammo = GetAmmoInPedWeapon(ped, weapon) - TriggerServerEvent('weapons:server:UpdateWeaponAmmo', CurrentWeaponData, tonumber(ammo)) - CurrentWeaponData.info.ammo = ammo - LastUpdatedAmmoTime = GetGameTimer() - if MultiplierAmount > 0 then - TriggerServerEvent('weapons:server:UpdateWeaponQuality', CurrentWeaponData, MultiplierAmount, ammo) - MultiplierAmount = 0 - end - end - Wait(0) - end -end) - -CreateThread(function() - while true do - local ped = PlayerPedId() - if CurrentWeaponData and next(CurrentWeaponData) then - if IsPedShooting(ped) or IsControlJustPressed(0, 24) then - local weapon = GetSelectedPedWeapon(ped) - if CanShoot then - if weapon and weapon ~= 0 and WeaponList[weapon] then - TriggerServerCallback('prison:server:checkThrowable', function(result) - if result or GetAmmoInPedWeapon(ped, weapon) <= 0 then return end - MultiplierAmount += 1 - end, weapon) - Wait(200) - end - else - if weapon ~= `WEAPON_UNARMED` then - TriggerEvent(Config.InventoryPrefix .. ':client:CheckWeapon', WeaponList[weapon]['name']) - SendTextMessage(Lang('INVENTORY_NOTIFICATION_WEAPON_BROKEN'), 'error') - MultiplierAmount = 0 - end - end - end - end - Wait(0) - end -end) - RegisterNetEvent(Config.InventoryPrefix .. ':client:LegacyFuel', function(fuel) Debug('Your gasoline can has: %', fuel) TriggerServerEvent('weapons:server:UpdateWeaponAmmo', CurrentWeaponData, fuel) diff --git a/resources/[framework]/[addons]/qs-inventory/config/config.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/config.lua similarity index 98% rename from resources/[framework]/[addons]/qs-inventory/config/config.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/config/config.lua index 57b89e3f..3ee279ca 100644 --- a/resources/[framework]/[addons]/qs-inventory/config/config.lua +++ b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/config.lua @@ -36,7 +36,7 @@ Locales = Locales or {} -- [CORE] Language packs container. -- 'ar','bg','ca','cs','da','de','el','en','es','fa','fr','hi','hu','it','ja', -- 'ko','nl','no','pl','pt','ro','ru','sl','sv','th','tr','zh-CN','zh-TW' --────────────────────────────────────────────────────────────────────────────── -Config.Language = 'ro' -- [EDIT] +Config.Language = 'en' -- [EDIT] --[[ [INFO] Choose your preferred language! @@ -123,7 +123,7 @@ Config.KQPlaceableItems = false -- [EDIT] Use KQ -- [INFO] Changing weight/slots can require wipes to avoid dupes. Be cautious. --────────────────────────────────────────────────────────────────────────────── Config.InventoryWeight = { -- [EDIT] - weight = 5000, -- [INFO] Max weight (grams). + weight = 120000, -- [INFO] Max weight (grams). slots = 41, -- [INFO] Set 40 to remove protected 6th slot. } @@ -138,7 +138,7 @@ Config.DropWeight = { -- [EDIT] --────────────────────────────────────────────────────────────────────────────── -- Label Change [EDIT] --────────────────────────────────────────────────────────────────────────────── -Config.LabelChange = false -- [EDIT] Allow item renaming. +Config.LabelChange = true -- [EDIT] Allow item renaming. Config.LabelChangePrice = false -- [EDIT] Price or false for free. Config.BlockedLabelChangeItems = { -- [EDIT] Items that cannot be renamed. money = true, @@ -358,8 +358,8 @@ Config.InventoryOptions = { ['thirst'] = true, -- [EDIT] Show thirst ['id'] = true, -- [EDIT] Show player ID ['money'] = true, -- [EDIT] Show cash - ['bank'] = false, -- [EDIT] Show bank balance - ['blackmoney'] = false, -- [EDIT] Show black money + ['bank'] = true, -- [EDIT] Show bank balance + ['blackmoney'] = true, -- [EDIT] Show black money } --────────────────────────────────────────────────────────────────────────────── @@ -442,7 +442,7 @@ Config.KeyBinds = { -- [EDIT] -- Debug & Development Tools [EDIT] -- [INFO] Enables development logs and debugging prints. Use only during testing. --────────────────────────────────────────────────────────────────────────────── -Config.Debug = false -- [EDIT] Detailed console prints +Config.Debug = true -- [EDIT] Detailed console prints Config.ZoneDebug = false -- [EDIT] Display additional zone debug info Config.InventoryPrefix = 'inventory' -- [ADV] Internal prefix; changing requires code adjustments Config.SaveInventoryInterval = 12500 -- [EDIT] Autosave interval (ms) diff --git a/resources/[framework]/[addons]/qs-inventory/config/crafting.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/crafting.lua similarity index 63% rename from resources/[framework]/[addons]/qs-inventory/config/crafting.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/config/crafting.lua index 45e43dd7..063cf076 100644 --- a/resources/[framework]/[addons]/qs-inventory/config/crafting.lua +++ b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/crafting.lua @@ -107,130 +107,130 @@ end -- [INFO] Define mesas de crafteo por job/ubicación, con blip y recetas propias. --────────────────────────────────────────────────────────────────────────────── Config.CraftingTables = { - -- [1] = { - -- name = 'Police Crafting', - -- isjob = 'police', - -- grades = 'all', - -- text = '[E] - Police Craft', - -- blip = { - -- enabled = true, - -- title = 'Police Crafting', - -- scale = 1.0, - -- display = 4, - -- colour = 0, - -- id = 365 - -- }, - -- location = vec3(459.771423, -989.050537, 24.898926), - -- items = { - -- [1] = { - -- name = 'weapon_pistol', - -- amount = 50, - -- info = {}, - -- costs = { - -- ['iron'] = 80, - -- ['metalscrap'] = 70, - -- ['rubber'] = 8, - -- ['steel'] = 60, - -- ['lockpick'] = 5, - -- }, - -- type = 'weapon', - -- slot = 1, - -- rep = 'attachmentcraftingrep', - -- points = 1, - -- threshold = 0, - -- time = 5500, - -- chance = 100 - -- }, - -- [2] = { - -- name = 'weapon_smg', - -- amount = 1, - -- info = {}, - -- costs = { - -- ['iron'] = 80, - -- ['metalscrap'] = 120, - -- ['rubber'] = 10, - -- ['steel'] = 65, - -- ['lockpick'] = 10, - -- }, - -- type = 'weapon', - -- slot = 2, - -- rep = 'attachmentcraftingrep', - -- points = 1, - -- threshold = 0, - -- time = 8500, - -- chance = 100 - -- }, - -- [3] = { - -- name = 'weapon_carbinerifle', - -- amount = 1, - -- info = {}, - -- costs = { - -- ['iron'] = 120, - -- ['metalscrap'] = 120, - -- ['rubber'] = 20, - -- ['steel'] = 90, - -- ['lockpick'] = 14, - -- }, - -- type = 'weapon', - -- slot = 3, - -- rep = 'craftingrep', - -- points = 2, - -- threshold = 0, - -- time = 12000, - -- chance = 100 - -- } - -- } - -- }, - -- [2] = { - -- name = 'Attachment Crafting', - -- isjob = false, - -- grades = 'all', - -- text = '[E] - Craft Attachment', - -- blip = { - -- enabled = true, - -- title = 'Attachment Crafting', - -- scale = 1.0, - -- display = 4, - -- colour = 0, - -- id = 365 - -- }, - -- location = vec3(90.303299, 3745.503418, 39.771484), - -- items = { - -- [1] = { - -- name = 'pistol_extendedclip', - -- amount = 50, - -- info = {}, - -- costs = { - -- ['metalscrap'] = 140, - -- ['steel'] = 250, - -- ['rubber'] = 60, - -- }, - -- type = 'item', - -- slot = 1, - -- rep = 'attachmentcraftingrep', - -- points = 1, - -- threshold = 0, - -- time = 8000, - -- chance = 90 - -- }, - -- [2] = { - -- name = 'pistol_suppressor', - -- amount = 50, - -- info = {}, - -- costs = { - -- ['metalscrap'] = 165, - -- ['steel'] = 285, - -- ['rubber'] = 75, - -- }, - -- type = 'item', - -- slot = 2, - -- rep = 'attachmentcraftingrep', - -- points = 1, - -- threshold = 0, - -- time = 8000, - -- chance = 90 - -- }, - -- } - -- }, + [1] = { + name = 'Police Crafting', + isjob = 'police', + grades = 'all', + text = '[E] - Police Craft', + blip = { + enabled = true, + title = 'Police Crafting', + scale = 1.0, + display = 4, + colour = 0, + id = 365 + }, + location = vec3(459.771423, -989.050537, 24.898926), + items = { + [1] = { + name = 'weapon_pistol', + amount = 50, + info = {}, + costs = { + ['iron'] = 80, + ['metalscrap'] = 70, + ['rubber'] = 8, + ['steel'] = 60, + ['lockpick'] = 5, + }, + type = 'weapon', + slot = 1, + rep = 'attachmentcraftingrep', + points = 1, + threshold = 0, + time = 5500, + chance = 100 + }, + [2] = { + name = 'weapon_smg', + amount = 1, + info = {}, + costs = { + ['iron'] = 80, + ['metalscrap'] = 120, + ['rubber'] = 10, + ['steel'] = 65, + ['lockpick'] = 10, + }, + type = 'weapon', + slot = 2, + rep = 'attachmentcraftingrep', + points = 1, + threshold = 0, + time = 8500, + chance = 100 + }, + [3] = { + name = 'weapon_carbinerifle', + amount = 1, + info = {}, + costs = { + ['iron'] = 120, + ['metalscrap'] = 120, + ['rubber'] = 20, + ['steel'] = 90, + ['lockpick'] = 14, + }, + type = 'weapon', + slot = 3, + rep = 'craftingrep', + points = 2, + threshold = 0, + time = 12000, + chance = 100 + } + } + }, + [2] = { + name = 'Attachment Crafting', + isjob = false, + grades = 'all', + text = '[E] - Craft Attachment', + blip = { + enabled = true, + title = 'Attachment Crafting', + scale = 1.0, + display = 4, + colour = 0, + id = 365 + }, + location = vec3(90.303299, 3745.503418, 39.771484), + items = { + [1] = { + name = 'pistol_extendedclip', + amount = 50, + info = {}, + costs = { + ['metalscrap'] = 140, + ['steel'] = 250, + ['rubber'] = 60, + }, + type = 'item', + slot = 1, + rep = 'attachmentcraftingrep', + points = 1, + threshold = 0, + time = 8000, + chance = 90 + }, + [2] = { + name = 'pistol_suppressor', + amount = 50, + info = {}, + costs = { + ['metalscrap'] = 165, + ['steel'] = 285, + ['rubber'] = 75, + }, + type = 'item', + slot = 2, + rep = 'attachmentcraftingrep', + points = 1, + threshold = 0, + time = 8000, + chance = 90 + }, + } + }, -- Continue with the same structure for the other Crafting Tables... } diff --git a/resources/[framework]/[addons]/qs-inventory/config/customWeapons.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/customWeapons.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/config/customWeapons.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/config/customWeapons.lua diff --git a/resources/[framework]/[addons]/qs-inventory/config/defaultColors.js b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/defaultColors.js similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/config/defaultColors.js rename to resources/[framework]/[addons]/[quasar]/qs-inventory/config/defaultColors.js diff --git a/resources/[framework]/[addons]/qs-inventory/config/garbage.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/garbage.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/config/garbage.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/config/garbage.lua diff --git a/resources/[framework]/[addons]/qs-inventory/config/metadata.js b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/metadata.js similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/config/metadata.js rename to resources/[framework]/[addons]/[quasar]/qs-inventory/config/metadata.js diff --git a/resources/[framework]/[addons]/qs-inventory/config/selling.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/selling.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/config/selling.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/config/selling.lua diff --git a/resources/[framework]/[addons]/qs-inventory/config/storage.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/storage.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/config/storage.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/config/storage.lua diff --git a/resources/[framework]/[addons]/qs-inventory/config/vehicles.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/vehicles.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/config/vehicles.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/config/vehicles.lua diff --git a/resources/[framework]/[addons]/qs-inventory/config/vending.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/vending.lua similarity index 100% rename from resources/[framework]/[addons]/qs-inventory/config/vending.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/config/vending.lua diff --git a/resources/[framework]/[addons]/qs-inventory/config/weapons.lua b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/weapons.lua similarity index 82% rename from resources/[framework]/[addons]/qs-inventory/config/weapons.lua rename to resources/[framework]/[addons]/[quasar]/qs-inventory/config/weapons.lua index 2d2be31f..d9375ec8 100644 --- a/resources/[framework]/[addons]/qs-inventory/config/weapons.lua +++ b/resources/[framework]/[addons]/[quasar]/qs-inventory/config/weapons.lua @@ -19,10 +19,10 @@ --────────────────────────────────────────────────────────────────────────────── -- [INFO] General behavior toggles for tints, magazines and durability exclusions. --────────────────────────────────────────────────────────────────────────────── -Config.RemoveTintAfterRemoving = false -- [EDIT] Remove weapon tints when discarded/removed. -Config.ForceToOnlyOneMagazine = true -- [EDIT] Only one magazine in use at a time. +Config.RemoveTintAfterRemoving = false -- [EDIT] Remove weapon tints when discarded/removed. +Config.ForceToOnlyOneMagazine = true -- [EDIT] Only one magazine in use at a time. -Config.DurabilityBlockedWeapons = { -- [EDIT] Weapons excluded from durability loss. +Config.DurabilityBlockedWeapons = { -- [EDIT] Weapons excluded from durability loss. 'weapon_stungun', 'weapon_nightstick', 'weapon_flashlight', @@ -34,14 +34,14 @@ Config.DurabilityBlockedWeapons = { -- [EDIT] Weapons excluded from durabili --────────────────────────────────────────────────────────────────────────────── -- [INFO] Customize UI line anchors for attachments on weapon preview. --────────────────────────────────────────────────────────────────────────────── -Config.WeaponAttachmentLines = { - ['suppressor'] = { bones = { 'WAPSupp', 'WAPSupp_2' }, offset = vec2(-25, -20) }, - ['flash'] = { bones = { 'WAPFlshLasr', 'WAPFlshLasr_2' }, offset = vec2( 5, 24) }, - ['scope'] = { bones = { 'WAPScop', 'WAPScop_2' }, offset = vec2( 5, -25) }, - ['barrel'] = { bones = { 'Gun_GripR', 'Gun_GripR_2' }, offset = vec2( 20, 20) }, - ['grip'] = { bones = { 'WAPGrip', 'WAPGrip_2' }, offset = vec2(-20, 20) }, - ['clip'] = { bones = { 'WAPClip', 'WAPClip_2' }, offset = vec2(-40, 10) }, - ['tint'] = { default = true, offset = vec2( 20, 0) }, +Config.WeaponAttachmentLines = { + ['suppressor'] = { bones = { 'WAPSupp', 'WAPSupp_2' }, offset = vec2(-25, -20) }, + ['flash'] = { bones = { 'WAPFlshLasr', 'WAPFlshLasr_2' }, offset = vec2(5, 24) }, + ['scope'] = { bones = { 'WAPScop', 'WAPScop_2' }, offset = vec2(5, -25) }, + ['barrel'] = { bones = { 'Gun_GripR', 'Gun_GripR_2' }, offset = vec2(20, 20) }, + ['grip'] = { bones = { 'WAPGrip', 'WAPGrip_2' }, offset = vec2(-20, 20) }, + ['clip'] = { bones = { 'WAPClip', 'WAPClip_2' }, offset = vec2(-40, 10) }, + ['tint'] = { default = true, offset = vec2(20, 0) }, } --────────────────────────────────────────────────────────────────────────────── @@ -49,7 +49,7 @@ Config.WeaponAttachmentLines = { --────────────────────────────────────────────────────────────────────────────── -- [INFO] List of throwable items enabled in the game. --────────────────────────────────────────────────────────────────────────────── -Config.Throwables = { +Config.Throwables = { 'ball', 'bzgas', 'flare', @@ -69,18 +69,18 @@ Config.Throwables = { -- [INFO] Maps inventory ammo items to native ammo types. `isForEveryWeapon` acts as a wildcard. --────────────────────────────────────────────────────────────────────────────── ---@type table',"gkvnP","oWdQe","aWBOC","a-arrow-le","zqQDi","oLMEy","AgBoV","placeableI","sPjzt","zFhet","Pidsw","qwkov","jqkwv","MOpHU","WBvCj","knUcL","optionBlac","onload","cloth/","rMlcK","xNUrF","HMdIJ","VQxUn","yXBiU","g-image'>\n","#playerBan",'ot-label">',"ine p","lHsqp","tRFEH","tlDUK","DycjW","jvgsy","UerYK","xFTPj","v>
","oDhiW","OOfaH","gyKfZ","7vw","KUckE","QNqPb","QCPuF"," / ","-label","KciEr","itemAttach","YtINq","fGFjH","cSnyF","AAvyi","cash.png","GiveClothe","GxUtC","uncVw","nTMjj","xkbGE","mqkmc","preventDef","data-label","tor","ahwQC","zfvPO","HjAzJ","vkhms","INVENTORY_","XNhsL","\n ","container-","er-name","eItem","GLImd","evDOE","ail","Kztwr","yRTHf","UYQCj",'"images/',"DQdKN","Ibsix","slide-righ","xbAQU","/div>","tems span","XQnFF","
x',"TzglX","oDSWm","wtaQX","ot defined"," ","1|9|7|12|5","ENT_NOT_CO","vCqxT","HPKdt","FvnKN","ing","6478056oTnhjJ","GjtYy","xpBAB","playerBank","26.3%","7|13|3|12|","zqtwh","YEAgA","stom, .inv","uBkJr"," ","RvmkD","HwcQP","layers spa","DUJvB","openWeaopn","TPFLS","/SetInvent","ctor_item","jeTKf","fGmMf","emplate","sotbI","rXIUH","omPHk","jDhAf","-item-slot","sREcm","gtHOL","ncaVw","_NUMBER","WQVsd","showTintMe","isArray","Twhhg","TseEa",".item-nodr","ylmQR",' ',"LVgMb","ker","PNrsU","ault confi","AxzrD","brTak","
(","ventory, .","aSCUQ","ShaTA","okDjj","xklUm","enableChan","QTWWh","nNSuG","ckPrv","zEGZa",'">
',"XTvou","LZyFc","JihMD","optionThir","NuiZG",'barslot="',"SoraO","|12|9|11|1","toAmount","CHANGE_PLA","WfwSj","MxLgJ","data.js or","pan class=","KYlQk","ots","scale(1)","CjDAI","sPZJm","lIbkY","lEDxg","MjTcy","AKVcy","(50%)","auICG","RsrLT","ossQq","ZAOcQ","pacing: .1","16.5%","enAam","r_search","XGEqm","VDOnf","wnApA","XljGM","UIJAr","; &nb","pYjci","fTOUN",'el">
&nb',"IMARY","rJesK","9107802izhdDe","UlSsr","SUWlc","se our def","BmALq","hide",'s="item-sl',"TON","sGuVN","SET_TINT_B","iguration","ive-item","fNXsq","XdkBR","HBZJQ","3|3|26|17|","wSjLm","iHYLs","QFSCK","NUI_CONFIG","yrCwk","' data-typ","AlFqN","ckMoney","FudiP","RobDf","ToPlayer","XBZEX","ykSiw","eOmBr",'ock"><'," OUR CONFI","apon-attac","length","YIfVm",'lot-key"><',"PURJV","DMmNg","you get: <","CxgvU","g, #weapon","XHwUx","done","xgRdb","SeYFS","KeHNL","INPeS",'a-sliders"',"NFPxb","wQHxV","mousemove","QpMBa","QxKtQ","#weapon-at","HccVm","-types","g.file so ","kZZHl","achment","XKtOo","wwLNc","whLin","ayers","getBoundin","qLUPk","have probl","ING_ITEMS","33|14|5|11","count","roXjV","QhGcT","zsbEs","onmouseup","back","OigBA","ACITY","ctor_item_","DozMY","KZzOw","ow, #item-","itemshop","error","cmNQD","NOnRJ","KEevb","uLQub","grOWV","ASqLL","znaOM","TdCpn","prepend","nyYJJ","VQxrm","immVh","/PlayDropS","ontainer.t","lor-picker","_THROW",' src="imag',"sp; &","lMrHq","pageX","ADMIN_CANC","EdpQm","_TRADE",'">
',"em-slot-im","WLyqN","MHqDK","clothing","cbpNQ",".weapon-at","SiUVf","gquZC","suxhK","AuSjj","MweQD","you don't ","ON_SEARCH","brightness","NUI_SERIAL",'" data-lab',"MVBPa",'ting">
',"type","4446865XOdxwL","lcUfC","y-bg, #ite","RGPzK","mIYJD","ADMIN_LOAD",'ton" data-',"kTBZu","EeUZF","UvyKE","admin_amou","QaiWq","blur(3px)","endsWith","p; &n","IbpMh","uIWOT","n-containe","ryYqw","","nPooY","YaIMk","AsxkN","0|3|2|4|1","jOtZs","play","fRJSZ","TihAq","ch p","7|28|32|29","BBUeL","vtqiO","VpZYS","QaeBW",'ng">
',"0|4|3|2|1","ADMIN_PLAY","ZDRsW","5|9|10|18|","eTxZB","SYpAg","mWABY","em-slot-bg","ight: bold"," \n ","xuRKT","justRotati","uJpbb","qrVvB","dZmmh","addEventLi","100%","DfhqD","CSVht","REvQg","droplabel","TfRVx","UKqBM","fDRUk","RvtxV","setCompact","rIMyf","KjVla","jRKRY","intro-logo","/PlayDropF","decay","player-id ","erMoney","GoFsc",'ubtract"><',".other-wei","use","OdcOJ",".png'/>\n ","ass='item-","RequiredIt","cjbvv","Zqyik"," (',"ENDaw",".z-hotbar-","yWZub","GgqJj","BQKfA","GyHSz","ght","TQaMH","#itembox-a","YDfeB","iJxEw","BDXiJ","WDXFh","4|2|3|1|0","tbkLb","style","fbvKn","thAnim",'g src="ima',"enablesoun","amount","oAaOM","iZQSD","-slot-img'","RKWzJ",'" onerror=',"WivnI"," \n ","eSource","GNaaC",'ttachment"',"-items, #r","attr","showItemNo","SQQUI","round","HGBBl","clientX","_RESET","cxuUW","xirAK","nptfd","-container","eVOtM","rqbQi","vtpEZ","transform ","search","FfnQd","#attachmen","icle","JFGSV","lGPCc","slots","HNcfr","dropmaxwei","Vjvch","_ATTACHMEN","admin_meta",'ox-label">',"SiekX","OnyVP","#00A3FF",'ass="weapo',"yle='","./sounds/s","ePUDw",'t" data-sl',"Ivpxb","MaWKm","QEgWa",'nts-line" ',"EKXHt","|16|4|8|15","%; left: ",'ey"> ',"CDPwx","lVhdr","zAibx","push",'-bar"> 1',"xjEcD","LZSLJ","hrTJX","VVrPE","YkETm","Bhcte","bcAgg","-custom","KbDib","
<","AYxhm",'">
",'ot-img">',"CNgQf","|1|4|6|7|5","pqoOz","Vedch","vmmKF","KkQtS","rUwkL",">\n ","dItem-labe","SymlF",'="required',"GKKYP","HtHhP","0, 0, 0","TargetId","Uxoub","#dialog h2","anim","XpUiQ","CqbLt","ER_SELECTI","NTS","ttachments","dBAek","gAczQ","p>6 ',"cNmxf","ZCdvU","CEHOLDER","yAHrA","rerPK"," mode","nfo, .othe","wwUfh","yGitu","on-attachm","qfqhd","UukZG","kNLlo","\n ","WoMVH","tmwkU","dAfWo","UHbco","TQYzX",">',"arms","VxnOa","jzIJP","cmiJK","dftAf","nt-full-sc","items","auto","-slot-labe","BAYSO","kSHPv","placeholde"," 0%, #FFFF","TPEtk","YrBLe","Attachment",".png","OvQnY","entory","rgba(0, 0,","weapon-att"," &nbs',"MDHwE","DcNFI","BjApQ","slot-label","alstorage","tcQno","MMhLU"," ','l">
","mMrJd","KETPw","YcvGK","eholder","BsixQ","zhfvJ","ggphD","WSjki","KCckC","
',".container","WeaponData",'t-img"> ',"8|24|31|21","aYgsr","qaJmG","zOGat",'l"> ',"% -58.24%,","AVmYU","ZoNjH","something ","ABEL","scroll","stash","mluBu","MyJHm","embox-coun","PlWFv","iGomK","ON_NOT_STO","umAbF",'d="weapon-',"QzlTb","jHnxo",".opacity-s","QKqSa","HDUuT","nZVkA","HrIlM","XLsiL","combine","FIG DIRECT","#weapon-ti","bWDhB","NVdiN","oDItU","vaicb",'="z-hotbar',"|14|21|8",'e"> ',"Ksjqc","nt-title","jXXhN","LxsiE","ns-list","entory .it","CLATj","ZRUcW","ewOxW","-slot='","Hgssg","ZNqQY","xFtfz","ON_MISSING","css","HPPQq","_SEARCH","DeXkG","price","combine th","bMiGR","28%","tMHkN","qowDv","CIhUc","QJwIl","efvKS","GetClothes","[data-labe","t-input","MVSEb","item-slot[","WSWue","pTtUm",'img" data-',"ZpGFk","DkNKK","quality","ammotype","bQaHG","bBfnz","ZTXfh","t-amount ","optionHeal","sVEgM","OHgyg","player","ITxhH","amountPlac","ARQSp","which","GLyeJ","ount, #ite","ghyrE","ById",'label="',"includes","tion","GIiCN","MvgnT","UKIns","tUlbr","paKJp",".ui-dragga","rgb(39, 17","admin_canc","target","3549992hoNmyS","nDLla",".border-ra","FEqrj","xcohH","_items/Hoo","remove","zIxXA","kEyba","unique","OqKxB","EJDtq","bhQNU",'e="font-we',"-options-l","vLQep","VHiUi","ohmrH","DIXQy","LCgoH","lgtmJ","#itembox-c","compact","nyhBo","anged","RBWPw","aIOjj","xSftv","DoLlU","empty","KciVr","suLBi","12 Gauge","dJBFH","crafting","jVcOy","IooAP","Bakrh","jXCDi","ybIch","CONDARY","blesounds","strokeStyl","nEoCt","ApNwc","teVgp","DLUNM","dUlGy","ault.png","DjDyW","hidden","QsyXs","PFIGr","lxsGr","umOVu","588090tzfOCA","27|6|34|23","-img","ucZMp","CcVTL","4, 96)","IPKzT","NZsqF","em-slot",'lass="item',"mouseleave","bIhEx","DFJqL","pZvkN","container","primary","wmmEp","tradeAmoun","kuJku","cdWfI","NTjkU","ULrXO","XneRB","ob-money","FoeSR","iOwHG","Pjhln",'em-nodrag"',"DHxvi","hQuJI","HYjEH","REYhM","image","kmenY","dQSEI","tfHSD","UrJBw","PojFI","cuMwM","ohJlv","pugGJ","oxfGS","ZWFsC","#player-bl","LOtbN","t-img ","lAaRC","yPlayerBut","dYAKB","tgjvQ","xylsN","hyEfU",".inv-optio","ceil","RhDSa",'name="','ass="nearb',"'item-slot","rLiog"," in your s","uBaRY","nbsp; 6',"iv>\n ","WKdIi","CnKAU","sGRGT","CHANGE_BUT","yxJET","mcihb","[data-slot","etail-dura","fSmLi","FhYvo","URATION_SE","NOTIFICATI","MXIvw","nventory-b","clbGA",'"serialBlu',"nFKeo","vdhgw","ecUGA","BKsNn","oCumD","NKuQg","5|1","-animation","fZyqW","MWrtm"," 100%) pad",'hment-img"',"_ITEM",'="fas fa-l',"#itembox-i","tification","r-inventor","2|6|3|0|4|","#playerthi","tFvLk",".item-info","nventory",'d="rob-ite',"onfig/meta","bIaRd","qUIXO","setTintBut","ory, .othe","ect","100.3px","t-label ","gIexF","kvhGH","lfVCF","-weight","aeSnr","WOGsT",'ss="z-hotb',"vfuey","ssbar","JFTrp","ents, #rob","ADRTn","eziCt","RDER_RADIU",'="images/',"KlQsI"," fa-circle","cvFyW","s.lua!","bsmzW","MJKiQ","DWOuc","BSJQO","slot","bFgZU"," If you ",".admin-giv","ALyAA","JNmon","uaTAs","aTmjo",'" /> 6 {var e=_0x4cf831,r={srGKz:e(540)+e(1316),yKqCC:function(n,t){return n(t)},Ywgue:e(252)+e(2213)+e(3342),RPhkZ:function(n,t){return n(t)},aDCrT:e(3163)+e(3059),wzJub:function(n,t){return n+t},QEgWa:function(n,t){return n+t},otDkw:e(767)+e(2198),nyhBo:function(n){return n()},bOwkq:function(n,t){return n===t},djtMQ:e(535),tKluu:function(n,t){return n(t)},Vjvch:e(3540)+e(1185)+e(1166)+e(2139)+e(2905)+e(3576)+e(3166)+e(1373)+e(3116)+e(769)+e(3192),AXUST:function(n,t){return n(t)},USYTo:e(3163)+e(1459),AGRda:e(2355)+e(2276)+e(3190)+e(2033)+"i>",nQQWO:e(398),iOUiw:function(n,t){return n(t)},dqeIG:function(n,t){return n(t)},SGXWw:e(2355)+e(2433)+e(3372)+">",DFAxW:e(2355)+e(2433)+e(462)+">",sHaAg:function(n,t){return n(t)},lGPCc:e(2436),SPLWw:e(2085),rPmJP:e(2355)+e(2433)+e(509)+e(1599)+e(3351),oyTEn:function(n,t){return n(t)},rqOKj:e(3163)+e(2069)+e(2538)+e(3268)+e(2199)+e(3429)+e(421)+e(2992),iZQSD:function(n,t){return n
",'-costs">\n ',"WbOTS","ng item-no","JgdJN","NfYbM","openClothe","uYeRk",'unt">\n ',"lKRwK","bVLCm","00
\n ',"EWNrY","ctedItem","on-header ","cgRWD",'ry-text">-',"
\n ","KkfAI","ready",'r">',"10Ppfygr","updateSumm","
Loading","ncel-give-","-container","admin_meta","fas fa-che",'"item-imag',"data","2627191PCaCDQ","LAYERS","el>\n ","selected-p",'">Metadata',"itnzi","eader sele",'lass="admi',"\n "," ","YCLPV","selectedIt","muIVo",'e="number"','ass="secti','id="select',"IER","i>\n ","GRshX","admin-give","bfyii",'r-avatar">',"v>\n ",'er-info">\n',"ected-item","rCbhI",'ss="fas fa',"utton clas",'-name">No ',"ction
" + itemData.info.label + "
"); + $(".item-info-description").html( + "First Name: " + + itemData.info.firstname + + "
Last Name: " + + itemData.info.lastname + + "
Birth Date: " + + itemData.info.birthdate + + "
Gender: " + + gender + + "
Type: " + + itemData.info.type + + "
" + ); +}; +``` \ No newline at end of file diff --git a/resources/[framework]/[addons]/[quasar]/qs-licenses/client/custom/esx.lua b/resources/[framework]/[addons]/[quasar]/qs-licenses/client/custom/esx.lua new file mode 100644 index 00000000..adb29277 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-licenses/client/custom/esx.lua @@ -0,0 +1,119 @@ +if Config.Framework ~= 'esx' then + return +end + +--[[ Uncomment if use old version + ESX = nil +CreateThread(function() + while ESX == nil do + TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) + Citizen.Wait(0) + end +end) +]] + +ESX = exports['es_extended']:getSharedObject() + +RegisterNetEvent('esx:playerLoaded') +AddEventHandler('esx:playerLoaded', function(playerData) + CreateBlips() +end) + +function GetJob() + return ESX.GetPlayerData().job.name +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 + +RegisterNetEvent('qs-licenses:ShowId', function(sourceId, character) + local sourcePos = GetEntityCoords(GetPlayerPed(GetPlayerFromServerId(sourceId)), false) + local pos = GetEntityCoords(PlayerPedId(), false) + if sourceId == GetPlayerServerId(PlayerId()) then + ShowCard() + end + local dist = GetDistanceBetweenCoords(pos.x, pos.y, pos.z, sourcePos.x, sourcePos.y, sourcePos.z, true) + if ((dist > 0 and dist < 2.5) or sourceId == GetPlayerServerId(PlayerId())) then + TriggerEvent('chat:addMessage', { + template = '', + args = { character.type, character.firstname, character.lastname, character.birthdate, character.gender } + }) + end +end) + +local texts = {} +if GetResourceState('qs-textui') == 'started' then + function DrawText3D(x, y, z, text, id, key) + local _id = id + if not texts[_id] then + CreateThread(function() + texts[_id] = 5 + while texts[_id] > 0 do + texts[_id] = texts[_id] - 1 + Wait(0) + end + texts[_id] = nil + exports['qs-textui']:DeleteDrawText3D(id) + end) + TriggerEvent('textui:DrawText3D', x, y, z, text, id, key) + end + texts[_id] = 5 + end +else + function DrawText3D(x, y, z, text) + SetTextScale(0.35, 0.35) + SetTextFont(4) + SetTextProportional(1) + SetTextColour(255, 255, 255, 215) + SetTextEntry('STRING') + SetTextCentre(true) + AddTextComponentString(text) + SetDrawOrigin(x, y, z, 0) + DrawText(0.0, 0.0) + local factor = text:len() / 370 + DrawRect(0.0, 0.0 + 0.0125, 0.017 + factor, 0.03, 0, 0, 0, 75) + ClearDrawOrigin() + end +end diff --git a/resources/[framework]/[addons]/[quasar]/qs-licenses/client/custom/qb.lua b/resources/[framework]/[addons]/[quasar]/qs-licenses/client/custom/qb.lua new file mode 100644 index 00000000..0e4bb123 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-licenses/client/custom/qb.lua @@ -0,0 +1,109 @@ +if Config.Framework ~= 'qb' then + return +end + +QBCore = exports['qb-core']:GetCoreObject() + +RegisterNetEvent('QBCore:Client:OnPlayerLoaded') +AddEventHandler('QBCore:Client:OnPlayerLoaded', function(playerData) + CreateBlips() +end) + +function GetJob() + return QBCore.Functions.GetPlayerData().job.name +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 + +RegisterNetEvent('qs-licenses:ShowId', function(sourceId, character) + local sourcePos = GetEntityCoords(GetPlayerPed(GetPlayerFromServerId(sourceId)), false) + local pos = GetEntityCoords(PlayerPedId(), false) + if sourceId == GetPlayerServerId(PlayerId()) then + ShowCard() + end + local dist = GetDistanceBetweenCoords(pos.x, pos.y, pos.z, sourcePos.x, sourcePos.y, sourcePos.z, true) + if ((dist > 0 and dist < 2.5) or sourceId == GetPlayerServerId(PlayerId())) then + TriggerEvent('chat:addMessage', { + template = '', + args = { character.type, character.firstname, character.lastname, character.birthdate, character.gender } + }) + end +end) + +local texts = {} +if GetResourceState('qs-textui') == 'started' then + function DrawText3D(x, y, z, text, id, key) + local _id = id + if not texts[_id] then + CreateThread(function() + texts[_id] = 5 + while texts[_id] > 0 do + texts[_id] = texts[_id] - 1 + Wait(0) + end + texts[_id] = nil + exports['qs-textui']:DeleteDrawText3D(id) + end) + TriggerEvent('textui:DrawText3D', x, y, z, text, id, key) + end + texts[_id] = 5 + end +else + function DrawText3D(x, y, z, text) + SetTextScale(0.35, 0.35) + SetTextFont(4) + SetTextProportional(1) + SetTextColour(255, 255, 255, 215) + SetTextEntry('STRING') + SetTextCentre(true) + AddTextComponentString(text) + SetDrawOrigin(x, y, z, 0) + DrawText(0.0, 0.0) + local factor = text:len() / 370 + DrawRect(0.0, 0.0 + 0.0125, 0.017 + factor, 0.03, 0, 0, 0, 75) + ClearDrawOrigin() + end +end diff --git a/resources/[framework]/[addons]/[quasar]/qs-licenses/client/main.lua b/resources/[framework]/[addons]/[quasar]/qs-licenses/client/main.lua new file mode 100644 index 00000000..534fbfdb Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-licenses/client/main.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-licenses/fxmanifest.lua b/resources/[framework]/[addons]/[quasar]/qs-licenses/fxmanifest.lua new file mode 100644 index 00000000..933430ad --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-licenses/fxmanifest.lua @@ -0,0 +1,28 @@ +fx_version "adamant" + +game "gta5" + +lua54 'yes' + +shared_scripts { + '@ox_lib/init.lua', + 'shared/*.lua' +} + +client_scripts { + 'client/custom/*.lua', + 'client/main.lua' +} + +server_scripts { + '@mysql-async/lib/MySQL.lua', + 'server/custom/*.lua', + 'server/main.lua', +} + +escrow_ignore { + 'client/custom/*.lua', + 'server/custom/*.lua', + 'shared/*.lua' +} +dependency '/assetpacks' \ No newline at end of file diff --git a/resources/[framework]/[addons]/[quasar]/qs-licenses/server/custom/esx.lua b/resources/[framework]/[addons]/[quasar]/qs-licenses/server/custom/esx.lua new file mode 100644 index 00000000..a959a029 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-licenses/server/custom/esx.lua @@ -0,0 +1,53 @@ +if Config.Framework ~= "esx" then + return +end + +local version = GetResourceMetadata('es_extended', 'version', 0) + +if version == '1.1.0' or version == '1.2.0' or version == 'legacy' then + ESX = nil + TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) +else + ESX = exports['es_extended']:getSharedObject() +end + +function GetPlayerFromIdFramework(player) + return ESX.GetPlayerFromId(player) +end + +function GetCharacterData(source) + local xPlayer = GetPlayerFromIdFramework(source) + local firstName, lastName, sex, dateofbirth + if xPlayer.get then + firstName = xPlayer.get("firstName") + lastName = xPlayer.get("lastName") + if xPlayer.get("sex") == 'm' then + sex = Lang('LICENSES_MAN_LABEL') + elseif xPlayer.get("sex") == 'f' then + sex = Lang('LICENSES_WOMEN_LABEL') + end + dateofbirth = xPlayer.get("dateofbirth") or "01/01/2000" + else + local name = MySQL.Sync.fetchAll("SELECT `firstname`, `lastname`, `dateofbirth`, `sex` FROM `users` WHERE `identifier`=@identifier", {["@identifier"] = ESX.GetIdentifier(source)}) + firstName = name[1]?.firstname + lastName = name[1]?.lastname + if name[1]?.sex == 'm' then + sex = Lang('LICENSES_MAN_LABEL') + elseif name[1]?.sex == 'f' then + sex = Lang('LICENSES_WOMEN_LABEL') + end + dateofbirth = name[1]?.dateofbirth + end + + return firstName, lastName, sex, dateofbirth +end + +function GetBankMoney(source) + local xPlayer = GetPlayerFromIdFramework(source) + return xPlayer.getAccount('bank').money +end + +function RemoveBankMoney(source, price) + local xPlayer = GetPlayerFromIdFramework(source) + xPlayer.removeAccountMoney('bank', price) +end \ No newline at end of file diff --git a/resources/[framework]/[addons]/[quasar]/qs-licenses/server/custom/qb.lua b/resources/[framework]/[addons]/[quasar]/qs-licenses/server/custom/qb.lua new file mode 100644 index 00000000..60da6cfa --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-licenses/server/custom/qb.lua @@ -0,0 +1,36 @@ +if Config.Framework ~= 'qb' then + return +end + +QBCore = exports['qb-core']:GetCoreObject() + +function GetPlayerFromIdFramework(player) + local Player = QBCore.Functions.GetPlayer(player) + if Player then + Player.citizenid = Player?.PlayerData?.citizenid + Player.identifier = Player?.PlayerData?.citizenid + Player.source = Player?.PlayerData?.source + end + return Player +end + +function GetCharacterData(source) + local player = GetPlayerFromIdFramework(source)?.PlayerData?.charinfo + local sex + if player.gender == 0 then + sex = Lang('LICENSES_MAN_LABEL') + elseif player.gender == 1 then + sex = Lang('LICENSES_WOMEN_LABEL') + end + return player.firstname, player.lastname, sex, player.birthdate +end + +function GetBankMoney(source) + local xPlayer = GetPlayerFromIdFramework(source) + return xPlayer?.PlayerData?.money['bank'] +end + +function RemoveBankMoney(source, price) + local xPlayer = GetPlayerFromIdFramework(source) + xPlayer.Functions.RemoveMoney('bank', price) +end diff --git a/resources/[framework]/[addons]/[quasar]/qs-licenses/server/main.lua b/resources/[framework]/[addons]/[quasar]/qs-licenses/server/main.lua new file mode 100644 index 00000000..2eb7dc8a Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-licenses/server/main.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-licenses/shared/config.lua b/resources/[framework]/[addons]/[quasar]/qs-licenses/shared/config.lua new file mode 100644 index 00000000..a30d593a --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-licenses/shared/config.lua @@ -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 + }, + }, +} diff --git a/resources/[framework]/[addons]/[quasar]/qs-licenses/shared/translations.lua b/resources/[framework]/[addons]/[quasar]/qs-licenses/shared/translations.lua new file mode 100644 index 00000000..1cbbe9d8 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-licenses/shared/translations.lua @@ -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.', + }, +} diff --git a/resources/[framework]/[addons]/[quasar]/qs-shops/.fxap b/resources/[framework]/[addons]/[quasar]/qs-shops/.fxap index 2e84de04..2ff3a9b7 100644 Binary files a/resources/[framework]/[addons]/[quasar]/qs-shops/.fxap and b/resources/[framework]/[addons]/[quasar]/qs-shops/.fxap differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-shops/client/deliveries.lua b/resources/[framework]/[addons]/[quasar]/qs-shops/client/deliveries.lua index f7341812..0024a47c 100644 Binary files a/resources/[framework]/[addons]/[quasar]/qs-shops/client/deliveries.lua and b/resources/[framework]/[addons]/[quasar]/qs-shops/client/deliveries.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-shops/client/main.lua b/resources/[framework]/[addons]/[quasar]/qs-shops/client/main.lua index 51d00bec..0a0e883b 100644 Binary files a/resources/[framework]/[addons]/[quasar]/qs-shops/client/main.lua and b/resources/[framework]/[addons]/[quasar]/qs-shops/client/main.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-shops/config.lua b/resources/[framework]/[addons]/[quasar]/qs-shops/config.lua index 619cefdb..849f6e70 100644 --- a/resources/[framework]/[addons]/[quasar]/qs-shops/config.lua +++ b/resources/[framework]/[addons]/[quasar]/qs-shops/config.lua @@ -45,7 +45,7 @@ Locales = Locales or {} the asset to ensure everything works as expected! ]] -Config.Language = 'ro' +Config.Language = 'en' --[[ Framework configuration and tools of your server! @@ -59,7 +59,7 @@ local qbHas = GetResourceState('qb-core') == 'started' local qbxHas = GetResourceState('qbx_core') == 'started' Config.Framework = esxHas and 'esx' or qbHas and 'qb' or qbxHas and 'qbx' or 'esx' -Config.UseTarget = true -- true or false +Config.UseTarget = false -- true or false Config.UseItemLicenses = true -- If you set true, the item will be required for the shop. But if you set false, if you using esx it will use esx_license if you using qb it will be use metadata.licenses for that. @@ -74,7 +74,7 @@ Config.DeliveryPrice = 500 Config.RewardItem = 'cryptostick' Config.Fuel = 'LegacyFuel' -Config.EnableDelivery = false +Config.EnableDelivery = true Config.DeliveryText = '[E] - Interact' Config.DeliveryLocations = { ['main'] = { label = 'GO Postal', coords = vector4(69.0862, 127.6753, 79.2123, 156.7736) }, @@ -1094,58 +1094,58 @@ Config.Locations = { ]] Config.Stashes = { - -- [1] = { - -- ['coords'] = vector3(450.6766052246094, -978.5770874023438, 30.68960952758789), - -- ['targetLabel'] = 'Open Stash', - -- ['size'] = { - -- weight = 50000, - -- slots = 15 - -- }, - -- ['blip'] = { - -- name = 'Police Stash', - -- coords = vector3(450.6766052246094, -978.5770874023438, 30.68960952758789), - -- sprite = 1, - -- color = 38, - -- size = 0.5 - -- }, - -- ['label'] = 'police_stash', - -- ['requiredJobs'] = { 'police' }, -- nil or example { 'police', 'ambulance' } - -- ['requiredJobsGrades'] = { 2, 3, 4 }, - -- ['requiredLicense'] = nil, -- nil or example 'itemname', - -- ['personal'] = false, - -- ['distance'] = 5.0 - -- }, - -- [2] = { - -- ['coords'] = vector3(306.303284, -1457.709839, 29.953857), - -- ['targetLabel'] = 'Open Stash', - -- ['size'] = { - -- weight = 9500, - -- slots = 15 - -- }, - -- ['blip'] = nil, - -- ['label'] = 'doctor_stash', - -- ['requiredJobs'] = { 'ambulance' }, -- nil or example { 'police', 'ambulance' } - -- ['requiredJobsGrades'] = nil, -- nil or grade tables example { 2, 3, 4}, - -- ['requiredLicense'] = nil, -- nil or example 'itemname', - -- ['personal'] = false, - -- ['distance'] = 5.0 - -- }, - -- [3] = { - -- ['coords'] = vector3(237.481323, -1354.747192, 31.032227), - -- ['targetLabel'] = 'Open Stash', - -- ['size'] = { - -- weight = 10000, - -- slots = 50 - -- }, - -- ['blip'] = nil, - -- ['label'] = 'mysterious_shed', - -- -- ['requiredJobs'] = nil, -- nil or example { 'police', 'ambulance' } - -- -- ['requiredJobsGrades'] = nil, -- nil or grade tables example { 2, 3, 4}, - -- -- ['requiredLicense'] = nil, -- nil or example 'itemname', - -- ['requiredGangs'] = { 'ballas' }, - -- ['personal'] = true, - -- ['distance'] = 5.0 - -- } + [1] = { + ['coords'] = vector3(450.6766052246094, -978.5770874023438, 30.68960952758789), + ['targetLabel'] = 'Open Stash', + ['size'] = { + weight = 50000, + slots = 15 + }, + ['blip'] = { + name = 'Police Stash', + coords = vector3(450.6766052246094, -978.5770874023438, 30.68960952758789), + sprite = 1, + color = 38, + size = 0.5 + }, + ['label'] = 'police_stash', + ['requiredJobs'] = { 'police' }, -- nil or example { 'police', 'ambulance' } + ['requiredJobsGrades'] = { 2, 3, 4 }, + ['requiredLicense'] = nil, -- nil or example 'itemname', + ['personal'] = false, + ['distance'] = 5.0 + }, + [2] = { + ['coords'] = vector3(306.303284, -1457.709839, 29.953857), + ['targetLabel'] = 'Open Stash', + ['size'] = { + weight = 9500, + slots = 15 + }, + ['blip'] = nil, + ['label'] = 'doctor_stash', + ['requiredJobs'] = { 'ambulance' }, -- nil or example { 'police', 'ambulance' } + ['requiredJobsGrades'] = nil, -- nil or grade tables example { 2, 3, 4}, + ['requiredLicense'] = nil, -- nil or example 'itemname', + ['personal'] = false, + ['distance'] = 5.0 + }, + [3] = { + ['coords'] = vector3(237.481323, -1354.747192, 31.032227), + ['targetLabel'] = 'Open Stash', + ['size'] = { + weight = 10000, + slots = 50 + }, + ['blip'] = nil, + ['label'] = 'mysterious_shed', + -- ['requiredJobs'] = nil, -- nil or example { 'police', 'ambulance' } + -- ['requiredJobsGrades'] = nil, -- nil or grade tables example { 2, 3, 4}, + -- ['requiredLicense'] = nil, -- nil or example 'itemname', + ['requiredGangs'] = { 'ballas' }, + ['personal'] = true, + ['distance'] = 5.0 + } } --[[ @@ -1153,6 +1153,6 @@ Config.Stashes = { but it's only for development. ]] -Config.ZoneDebug = false +Config.ZoneDebug = true -Config.Debug = false +Config.Debug = true diff --git a/resources/[framework]/[addons]/[quasar]/qs-shops/functions.lua b/resources/[framework]/[addons]/[quasar]/qs-shops/functions.lua index 65b77523..e3ad7db4 100644 Binary files a/resources/[framework]/[addons]/[quasar]/qs-shops/functions.lua and b/resources/[framework]/[addons]/[quasar]/qs-shops/functions.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-shops/locales/ro.lua b/resources/[framework]/[addons]/[quasar]/qs-shops/locales/ro.lua index e8e337c2..41bc0a56 100644 --- a/resources/[framework]/[addons]/[quasar]/qs-shops/locales/ro.lua +++ b/resources/[framework]/[addons]/[quasar]/qs-shops/locales/ro.lua @@ -1,34 +1,34 @@ Locales['ro'] = { ['INVENTORY_INFO_OPEN_SHOP'] = '[E] - Deschide Magazinul', ['INVENTORY_INFO_OPEN_STASH'] = '[E] - Deschide Depozitul', - ['INVENTORY_INFO_DELIVER_E'] = '[E] - Livrati Produse', - ['INVENTORY_INFO_DELIVER'] = 'Livrati Produse', + ['INVENTORY_INFO_DELIVER_E'] = '[E] - Livrați Produse', + ['INVENTORY_INFO_DELIVER'] = 'Livrați Produse', ['INVENTORY_ERROR_NO_DEPOSIT'] = 'Este necesar un depozit', ['INVENTORY_ERROR_CANCELLED'] = 'Anulat', ['INVENTORY_ERROR_VEHICLE_NOT_CORRECT'] = 'Acesta nu este un vehicul comercial!', - ['INVENTORY_ERROR_NO_DRIVER'] = 'Trebuie sa fii soferul pentru a face asta...', - ['INVENTORY_ERROR_NO_WORK_DONE'] = 'Nu ai facut inca nicio munca...', - ['INVENTORY_ERROR_BACKDOORS_NOT_OPEN'] = 'Usile din spate ale vehiculului nu sunt deschise', - ['INVENTORY_ERROR_GET_OUT_VEHICLE'] = 'Trebuie sa iesi din vehicul pentru a efectua aceasta actiune', - ['INVENTORY_GRAB_BOXES_TRUNK'] = 'Trebuie sa iei cutiile din portbagajul vehiculului tau', - ['INVENTORY_ERROR_TOO_FAR_FROM_DELIVERY'] = 'Trebuie sa fii mai aproape de punctul de livrare', - ['INVENTORY_ERROR_REQUIRED_JOB'] = 'Nu ai locul de munca necesar pentru a deschide acest depozit', - ['INVENTORY_ERROR_REQUIRED_JOB_GRADE'] = 'Nu ai gradul de munca necesar pentru a deschide acest depozit', - ['INVENTORY_ERROR_REQUIRED_LICENSE'] = 'Nu ai licenta necesara pentru a deschide acest depozit', + ['INVENTORY_ERROR_NO_DRIVER'] = 'Trebuie să fii șoferul pentru a face asta...', + ['INVENTORY_ERROR_NO_WORK_DONE'] = 'Nu ai făcut încă nicio muncă...', + ['INVENTORY_ERROR_BACKDOORS_NOT_OPEN'] = 'Ușile din spate ale vehiculului nu sunt deschise', + ['INVENTORY_ERROR_GET_OUT_VEHICLE'] = 'Trebuie să ieși din vehicul pentru a efectua această acțiune', + ['INVENTORY_GRAB_BOXES_TRUNK'] = 'Trebuie să iei cutiile din portbagajul vehiculului tău', + ['INVENTORY_ERROR_TOO_FAR_FROM_DELIVERY'] = 'Trebuie să fii mai aproape de punctul de livrare', + ['INVENTORY_ERROR_REQUIRED_JOB'] = 'Nu ai locul de muncă necesar pentru a deschide acest depozit', + ['INVENTORY_ERROR_REQUIRED_JOB_GRADE'] = 'Nu ai gradul de muncă necesar pentru a deschide acest depozit', + ['INVENTORY_ERROR_REQUIRED_LICENSE'] = 'Nu ai licența necesară pentru a deschide acest depozit', - ['INVENTORY_SUCCESS_DEALER_VERIFY'] = 'Dealer-ul ti-a verificat licenta', - ['INVENTORY_SUCCESS_PAID_WITH_CASH'] = 'Depozitul a fost platit cu numerar', - ['INVENTORY_SUCCESS_PAID_WITH_BANK'] = 'Depozitul a fost platit din banca', - ['INVENTORY_SUCCESS_REFUND_TO_CASH'] = 'Depozitul a fost rambursat in numerar', - ['INVENTORY_SUCCESS_YOU_EARNED'] = 'Ai castigat $', - ['INVENTORY_SUCCESS_PAYSLIP_TIME'] = 'Ai vizitat toate magazinele... Este timpul pentru fisa ta de salariu!', + ['INVENTORY_SUCCESS_DEALER_VERIFY'] = 'Dealer-ul ți-a verificat licența', + ['INVENTORY_SUCCESS_PAID_WITH_CASH'] = 'Depozitul a fost plătit cu numerar', + ['INVENTORY_SUCCESS_PAID_WITH_BANK'] = 'Depozitul a fost plătit din bancă', + ['INVENTORY_SUCCESS_REFUND_TO_CASH'] = 'Depozitul a fost rambursat în numerar', + ['INVENTORY_SUCCESS_YOU_EARNED'] = 'Ai câștigat $', + ['INVENTORY_SUCCESS_PAYSLIP_TIME'] = 'Ai vizitat toate magazinele... Este timpul pentru fișa ta de salariu!', - ['INVENTORY_MISSION_STORE_REACHED'] = 'Magazin atins, ia o cutie din portbagajul cu [E] si livreaza-o la marcator', + ['INVENTORY_MISSION_STORE_REACHED'] = 'Magazin atins, ia o cutie din portbagajul cu [E] și livrează-o la marcator', ['INVENTORY_MISSION_TAKE_BOX'] = 'Ia o cutie de produse', - ['INVENTORY_MISSION_DELIVER_BOX'] = 'Livreaza cutia de produse', - ['INVENTORY_MISSION_ANOTHER_BOX'] = 'Ia o alta cutie de produse', - ['INVENTORY_MISSION_GOTO_NEXT_POINT'] = 'Ai livrat toate produsele, mergi la urmatorul punct', - ['INVENTORY_MISSION_RETURN_TO_STATION'] = 'Ai livrat toate produsele, intoarce-te la statie', - ['INVENTORY_MISSION_JOB_COMPLETED'] = 'Ti-ai terminat ruta' + ['INVENTORY_MISSION_DELIVER_BOX'] = 'Livrează cutia de produse', + ['INVENTORY_MISSION_ANOTHER_BOX'] = 'Ia o altă cutie de produse', + ['INVENTORY_MISSION_GOTO_NEXT_POINT'] = 'Ai livrat toate produsele, mergi la următorul punct', + ['INVENTORY_MISSION_RETURN_TO_STATION'] = 'Ai livrat toate produsele, întoarce-te la stație', + ['INVENTORY_MISSION_JOB_COMPLETED'] = 'Ți-ai terminat ruta' } diff --git a/resources/[framework]/[addons]/[quasar]/qs-shops/server/main.lua b/resources/[framework]/[addons]/[quasar]/qs-shops/server/main.lua index 084c1fa6..2f180329 100644 Binary files a/resources/[framework]/[addons]/[quasar]/qs-shops/server/main.lua and b/resources/[framework]/[addons]/[quasar]/qs-shops/server/main.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-weapondraw/.fxap b/resources/[framework]/[addons]/[quasar]/qs-weapondraw/.fxap new file mode 100644 index 00000000..1305d28f Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-weapondraw/.fxap differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-weapondraw/client.lua b/resources/[framework]/[addons]/[quasar]/qs-weapondraw/client.lua new file mode 100644 index 00000000..306ec65c Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-weapondraw/client.lua differ diff --git a/resources/[framework]/[addons]/[weapons]/qs-weapondraw/config.lua b/resources/[framework]/[addons]/[quasar]/qs-weapondraw/config.lua similarity index 100% rename from resources/[framework]/[addons]/[weapons]/qs-weapondraw/config.lua rename to resources/[framework]/[addons]/[quasar]/qs-weapondraw/config.lua diff --git a/resources/[framework]/[addons]/[weapons]/qs-weapondraw/fxmanifest.lua b/resources/[framework]/[addons]/[quasar]/qs-weapondraw/fxmanifest.lua similarity index 100% rename from resources/[framework]/[addons]/[weapons]/qs-weapondraw/fxmanifest.lua rename to resources/[framework]/[addons]/[quasar]/qs-weapondraw/fxmanifest.lua diff --git a/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/.fxap b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/.fxap new file mode 100644 index 00000000..c47948e4 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/.fxap differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/client/custom/framework/esx.lua b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/client/custom/framework/esx.lua new file mode 100644 index 00000000..a07edb76 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/client/custom/framework/esx.lua @@ -0,0 +1,23 @@ +if Config.Framework ~= 'esx' then + return +end + +ESX = exports['es_extended']:getSharedObject() + +RegisterNetEvent('esx:playerLoaded') +AddEventHandler('esx:playerLoaded', function() + Wait(3500) + ESX.PlayerLoaded = true +end) + +function IsPlayerLoaded() + return ESX.PlayerLoaded +end + +function GetPlayerData() + return ESX.GetPlayerData() +end + +function GetInventory() + return GetPlayerData().inventory +end diff --git a/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/client/custom/framework/qb.lua b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/client/custom/framework/qb.lua new file mode 100644 index 00000000..bc9c27fc --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/client/custom/framework/qb.lua @@ -0,0 +1,23 @@ +if Config.Framework ~= 'qb' then + return +end + +QBCore = exports['qb-core']:GetCoreObject() + +RegisterNetEvent('QBCore:Client:OnPlayerLoaded') +AddEventHandler('QBCore:Client:OnPlayerLoaded', function() + Wait(3500) + LocalPlayer.state:set('isLoggedIn', true, false) +end) + +function IsPlayerLoaded() + return LocalPlayer.state['isLoggedIn'] +end + +function GetPlayerData() + return QBCore.Functions.GetPlayerData() +end + +function GetInventory() + return GetPlayerData().items +end diff --git a/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/client/main.lua b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/client/main.lua new file mode 100644 index 00000000..33a5c9b2 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/client/main.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/config.lua b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/config.lua new file mode 100644 index 00000000..781990fe --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/config.lua @@ -0,0 +1,242 @@ +--[[ + Welcome to the qb-weaponsonback configuration! + To start configuring your new asset, please read carefully + each step in the documentation that we will attach at the end of this message. + + Each important part of the configuration will be highlighted with a box. + like this one you are reading now, where I will explain step by step each + configuration available within this file. + + This is not all, most of the settings, you are free to modify it + as you wish and adapt it to your framework in the most comfortable way possible. + The configurable files you will find all inside client/custom/* + or inside server/custom/*. + + Direct link to the resource documentation, read it before you start: + https://docs.quasar-store.com/information/welcome +]] + + +Config = {} + +--[[ + The current system will detect if you use qb-core or es_extended, + but if you rename it, you can remove the value from Config.Framework + and add it yourself after you have modified the framework files inside + this script. + + Please keep in mind that this code is automatic, do not edit if + you do not know how to do it. +]] + +local esxHas = GetResourceState('es_extended') == 'started' +local qbHas = GetResourceState('qb-core') == 'started' + +Config.Framework = esxHas and 'esx' or qbxHas and 'qbx' or qbHas and 'qb' or 'standalone' + +--[[ + Weapon configuration to be shown on the back, torso + or where you configure it on your character's coord. + + Please note that you must have knowledge + basics and do everything by trial and error. +]] + +Config.WeaponPositions = { + ['weapon_carbinerifle'] = { + model = 'w_ar_carbinerifle', + hash = -2084633992, + bone = 10706, + x = 0.0, + y = 0.17, + z = -0.25, + x_rotation = 0.0, + y_rotation = 75.0, + z_rotation = 180.0 + }, + ['weapon_carbinerifle_mk2'] = { + model = 'w_ar_carbineriflemk2', + hash = GetHashKey('WEAPON_CARBINERIFLE_MK2'), + bone = 24816, + x = 0.2275, + y = -0.17, + z = -0.110, + x_rotation = 0.0, + y_rotation = 20.0, + z_rotation = 1.0 + }, + ['weapon_assaultrifle'] = { + model = 'w_ar_assaultrifle', + hash = -1074790547, + bone = 24816, + x = 0.2275, + y = -0.16, + z = 0.110, + x_rotation = 0.0, + y_rotation = -15.0, + z_rotation = 2.0 + }, + ['weapon_tacticalrifle'] = { + model = 'w_ar_tacticalrifle', + hash = `weapon_tacticalrifle`, + bone = 24816, + x = 0.2275, + y = -0.16, + z = 0.110, + x_rotation = 0.0, + y_rotation = -15.0, + z_rotation = 2.0 + }, + ['weapon_specialcarbine'] = { + model = 'w_ar_specialcarbine', + hash = -1063057011, + bone = 24816, + x = 0.2275, + y = -0.16, + z = 0.030, + x_rotation = 0.0, + y_rotation = 5.0, + z_rotation = 1.0 + }, + ['weapon_bullpuprifle'] = { + model = 'w_ar_bullpuprifle', + hash = 2132975508, + bone = 24816, + x = 0.2275, + y = -0.16, + z = 0.055, + x_rotation = 0.0, + y_rotation = 0.0, + z_rotation = 1.0 + }, + ['weapon_advancedrifle'] = { + model = 'w_ar_advancedrifle', + hash = -1357824103, + bone = 24816, + x = 0.2275, + y = -0.16, + z = -0.055, + x_rotation = 0.0, + y_rotation = 35.0, + z_rotation = 1.0 + }, + ['weapon_appistol'] = { + model = 'w_pi_appistol', + hash = 584646201, + bone = 24816, + x = -0.140, + y = 0.05, + z = -0.210, + x_rotation = 90.0, + y_rotation = 90.0, + z_rotation = 50.0 + }, + ['weapon_microsmg'] = { + model = 'w_sb_microsmg', + hash = 324215364, + bone = 24816, + x = -0.200, + y = 0.05, + z = -0.210, + x_rotation = 90.0, + y_rotation = 110.0, + z_rotation = 50.0 + }, + ['weapon_assaultsmg'] = { + model = 'w_sb_assaultsmg', + hash = -270015777, + bone = 10706, + x = 0.0, + y = 0.17, + z = -0.35, + x_rotation = 0.0, + y_rotation = 55.0, + z_rotation = 180.0 + }, + ['weapon_smg'] = { + model = 'w_sb_smg', + hash = 736523883, + bone = 24816, + x = 0.1275, + y = -0.16, + z = -0.055, + x_rotation = 0.0, + y_rotation = 35.0, + z_rotation = 1.0 + }, + ['weapon_smg_mk2'] = { + model = 'w_sb_smgmk2', + hash = GetHashKey('WEAPON_SMG_MK2'), + bone = 24816, + x = -0.140, + y = 0.05, + z = 0.210, + x_rotation = 90.0, + y_rotation = 120.0, + z_rotation = 50.0 + }, + ['weapon_sniperrifle'] = { + model = 'w_sr_sniperrifle', + hash = 100416529, + bone = 24816, + x = 0.005, + y = -0.16, + z = 0.0, + x_rotation = 0.0, + y_rotation = -15.0, + z_rotation = 2.0 + }, + ['weapon_assaultshotgun'] = { + model = 'w_sg_assaultshotgun', + hash = -494615257, + bone = 24816, + x = 0.2275, + y = -0.16, + z = 0.015, + x_rotation = 0.0, + y_rotation = 160.0, + z_rotation = 1.0 + }, + ['weapon_pumpshotgun'] = { + model = 'w_sg_pumpshotgun', + hash = 487013001, + bone = 24816, + x = 0.1275, + y = -0.16, + z = 0.030, + x_rotation = 0.0, + y_rotation = 25.0, + z_rotation = 1.0 + }, + ['weapon_musket'] = { + model = 'w_ar_musket', + hash = -1466123874, + bone = 24816, + x = 0.0, + y = -0.16, + z = 0.0, + x_rotation = 0.0, + y_rotation = 15.0, + z_rotation = 2.0 + }, + ['weapon_heavyshotgun'] = { + model = 'w_sg_heavyshotgun', + hash = GetHashKey('WEAPON_HEAVYSHOTGUN'), + bone = 10706, + x = 0.100, + y = 0.17, + z = -0.20, + x_rotation = 0.0, + y_rotation = 60.0, + z_rotation = 190.0 + }, + -- Add more weapons as needed +} + +--[[ + Debug mode, this mode is to receive constant prints and information + from the system, we do not recommend enabling it if you are not a + developer, but it will help to understand how the resource works. +]] + +Config.Debug = false diff --git a/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/fxmanifest.lua b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/fxmanifest.lua new file mode 100644 index 00000000..5e6bd868 --- /dev/null +++ b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/fxmanifest.lua @@ -0,0 +1,32 @@ +fx_version 'bodacious' + +game 'gta5' + +lua54 'yes' + +version '2.0.2' + +shared_scripts { + 'config.lua', + 'utils.lua' +} + +client_scripts { + 'client/custom/framework/*.lua', + 'client/*.lua' +} + +server_scripts { + 'server/*.lua' +} + +escrow_ignore { + 'config.lua', + 'client/custom/framework/*.lua' +} + +dependencies { + 'qs-inventory' -- Required +} + +dependency '/assetpacks' \ No newline at end of file diff --git a/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/server/main.lua b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/server/main.lua new file mode 100644 index 00000000..a54abcef Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/server/main.lua differ diff --git a/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/utils.lua b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/utils.lua new file mode 100644 index 00000000..8351bdd3 Binary files /dev/null and b/resources/[framework]/[addons]/[quasar]/qs-weaponsonback/utils.lua differ diff --git a/resources/[framework]/[addons]/[weapons]/qs-weapondraw/.fxap b/resources/[framework]/[addons]/[weapons]/qs-weapondraw/.fxap deleted file mode 100644 index 052517e3..00000000 Binary files a/resources/[framework]/[addons]/[weapons]/qs-weapondraw/.fxap and /dev/null differ diff --git a/resources/[framework]/[addons]/[weapons]/qs-weapondraw/client.lua b/resources/[framework]/[addons]/[weapons]/qs-weapondraw/client.lua deleted file mode 100644 index d045826c..00000000 Binary files a/resources/[framework]/[addons]/[weapons]/qs-weapondraw/client.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/.fxap b/resources/[framework]/[addons]/qs-inventory/.fxap deleted file mode 100644 index bdaa743d..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/.fxap and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/esx.lua b/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/esx.lua deleted file mode 100644 index 36d4a199..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/esx.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/illenium.lua b/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/illenium.lua deleted file mode 100644 index 288dc9d8..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/illenium.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/qb.lua b/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/qb.lua deleted file mode 100644 index 16be86eb..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/qb.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/rcore.lua b/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/rcore.lua deleted file mode 100644 index e8bc64f7..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/rcore.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/standalone.lua b/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/standalone.lua deleted file mode 100644 index 4c1949cf..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/custom/clothing/standalone.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/main.lua b/resources/[framework]/[addons]/qs-inventory/client/main.lua deleted file mode 100644 index 35e0ab29..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/main.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/modules/clothing.lua b/resources/[framework]/[addons]/qs-inventory/client/modules/clothing.lua deleted file mode 100644 index 97826cb8..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/modules/clothing.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/modules/crafting.lua b/resources/[framework]/[addons]/qs-inventory/client/modules/crafting.lua deleted file mode 100644 index a38ca997..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/modules/crafting.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/modules/debug.lua b/resources/[framework]/[addons]/qs-inventory/client/modules/debug.lua deleted file mode 100644 index 2d7080f1..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/modules/debug.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/modules/internal.lua b/resources/[framework]/[addons]/qs-inventory/client/modules/internal.lua deleted file mode 100644 index 5a0a4362..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/modules/internal.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/modules/overextended.lua b/resources/[framework]/[addons]/qs-inventory/client/modules/overextended.lua deleted file mode 100644 index 2051fa99..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/modules/overextended.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/modules/placeable.lua b/resources/[framework]/[addons]/qs-inventory/client/modules/placeable.lua deleted file mode 100644 index b4366e65..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/modules/placeable.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/modules/raycast.lua b/resources/[framework]/[addons]/qs-inventory/client/modules/raycast.lua deleted file mode 100644 index 3934d9e2..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/modules/raycast.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/modules/scaleform.lua b/resources/[framework]/[addons]/qs-inventory/client/modules/scaleform.lua deleted file mode 100644 index e3cfb7f0..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/modules/scaleform.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/modules/storage.lua b/resources/[framework]/[addons]/qs-inventory/client/modules/storage.lua deleted file mode 100644 index b3a3387b..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/modules/storage.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/modules/throw.lua b/resources/[framework]/[addons]/qs-inventory/client/modules/throw.lua deleted file mode 100644 index 67178e7b..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/modules/throw.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/client/modules/trade.lua b/resources/[framework]/[addons]/qs-inventory/client/modules/trade.lua deleted file mode 100644 index ba5ab4a5..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/client/modules/trade.lua and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/html/icons/logo.png b/resources/[framework]/[addons]/qs-inventory/html/icons/logo.png deleted file mode 100644 index 23a1e6ab..00000000 Binary files a/resources/[framework]/[addons]/qs-inventory/html/icons/logo.png and /dev/null differ diff --git a/resources/[framework]/[addons]/qs-inventory/html/js/app.js b/resources/[framework]/[addons]/qs-inventory/html/js/app.js deleted file mode 100644 index fba7b0af..00000000 --- a/resources/[framework]/[addons]/qs-inventory/html/js/app.js +++ /dev/null @@ -1 +0,0 @@ -const _0x11def1=_0x50cb;!function(){for(var n=_0x50cb,t=_0x1279();;)try{if(331985==-parseInt(n(2534))*(parseInt(n(167))/2)+-parseInt(n(1002))/3+-parseInt(n(224))/4+parseInt(n(415))/5*(parseInt(n(1220))/6)+parseInt(n(927))/7*(parseInt(n(1503))/8)+parseInt(n(2475))/9*(-parseInt(n(1188))/10)+parseInt(n(3314))/11*(parseInt(n(754))/12))break;t.push(t.shift())}catch(n){t.push(t.shift())}}();let InventoryOption=_0x11def1(958),totalWeight=0,totalWeightOther=0,playerMaxWeight=0,otherMaxWeight=0,otherLabel="",ClickedItemData={},SelectedAttachment=null,AttachmentScreenActive=!1,ControlPressed=!1,InTrade=!1,disableRightMouse=!1,selectedItem=null,IsDragging=!1,inClothMenu=!1,inConfigMenu=!1,notStolenItems={},notStoredItems={},labelChanger=!1,openAnimation,LangData={},openedTime,clothesItems=[_0x11def1(2223),_0x11def1(1249),_0x11def1(1165),_0x11def1(1816),_0x11def1(722),_0x11def1(1713),_0x11def1(2811),_0x11def1(2619),_0x11def1(1773),_0x11def1(3400),_0x11def1(802),_0x11def1(2329)],attachmentConnectors=[],Config={};const showItemInfo=(n,t)=>{var e=_0x11def1,r={UBQCa:e(174)+e(1110),gtzPC:function(n,t){return n(t)},Wvhgu:e(641)+e(424)+e(2199)+e(2052)+e(1847)+e(1912)+e(3474)+e(1565),IjVoX:function(n,t){return n===t},VPgSx:e(3462),atNZr:e(854)+e(1007)+e(3566)+e(2691)+e(2875)+e(777)+e(2386)+e(1522)+e(1585)+e(493)+e(1166),PtSsZ:function(n,t){return n',"zpYGF","intro-serv","kVSNm","aKejK","open","sition","jIicC","PHXut","item-slot[","rYGFD","NbUEp","xOffset","UBqDS","hBiLw","ABaQf","tULVQ","fJZWW","erMoney","wCLkI","function","OwoOs","aQAnv","/DoScreenF","kWgfy","t-label la","lCQKJ","VTpvJ","rbnjZ","jfHaJ","0|5|8|24|3","VgxHN","fo-descrip","axOwa","sXWoW","100%","players","unwGR","nt-title","UmQdZ","/PlaceItem","dgadM","YdChl","#nearPlaye","ZRCdV","TwuLs",".inv-optio","nKLRS","T_ATTACHME",' id="itemb',".label-cha","jAeAl","message","a-arrow-le","qFacX",'Blue">',"RbJEM","zXUTE","kkPjI","#rob-money",'on-item" i',"JdLEC","QxRzJ","strokeStyl","ist","dient(180d",'t" data-sl',"FXekA","IsWeaponBl","MbSsT"," ","LcVZb","ZTSPt","hment-drag","ttVNz","KNNee","vRzqT","GAtiS","oEwQC","beginPath","byuaj",'ck="giveCl','-img"> ',"kFQHe","oWgIu","rpGPz","JWWhc","dGWkS","APBVL","alqsl","ive-item","QFwxF","MkVAo","gPGen","COBFz","FayRA"," <',"ON_CUSTOM_","GTkBT","mount_craf","JhEKS","admin_meta","YYkNC","MiTRB","ainer, .ot","Haorl","ADMIN_CONF","hes","aepkq","#player-th","IjVoX","rmUDy","Nvxbq","ack' oncli","cJMeb","KncgN","FCTun","se our def","vHbMe","cYEeV","JivhM","NUI_PLAYER","scale(3)","XWqmH","tJZlJ","zRROI","ch p","TvVFf","YQkEi","yuKSo","xoNbG","mjmBC","oeIPX"," ","iJQrb",'el="',"DqiBs","brCOA","Quasar Rol","ById","bLddt"," &nb',"AAXCm","EeJOb","iSTPQ"," | ","EpXlY","qoudR","ovVrr","ikPcL","kHcuK","VVqAR","GOiOT","#itembox-a","PLEASE USE","PCfVa","VsLlq"," ","JdnYr","rFAmx","item h3","RCqyj","offset","JIIZn","notStolenI","gxnuU","mUrrP","placeable","ment-drag","mage","Zpirp","attachment","error","PqRZv","fcmff","vzLvk","Show logo ","usUft",'">',"auyVN","FF 100%)",'-label">\n ','ng"> ',"kNVIh","nger-butto","BbKLx","WKtVm","lPeKD","djjrW","addEventLi","UPSuX","QMEgq","qVuYV","eeTbm","/RemoveAtt","goEbT","KmOLS",'"images/',"YvqJo","FZDHj","gFmXy","DGMnc","trunc","KJDdO","count","KLApf","hkjnN","kPlaceItem","ySFGL","ventory","player h3","cKZwE","g-image'>\n",'lot-key"><',"gOLfl","8|6|2|1|7|","lQKCd","16|11|20|3","NOTIFICATI",'ass="weapo',".other-wei","DeMeE","FtQIO","play","gOTby","GIwTE","PtSsZ","miCrk","wkVnf","QQFQl","find","Data","keyup","#other-inv","KrQgY","ZdGxG","oYQrs","zHWNd","oORrs"," 500ms","' data-typ","HhRNd","Xiojr",".item-info","_ITEM","vBPwP","0|6|9|1|2|","bwkFA","ASEBY","UtYUb","QNGXR","qxnHu",'%;">\n ',"mPWDZ","RdQZR","ceil",' ","aELCg","[data-slot"," #item-thr","kxmlt","ESHDU","NUI_ATTACH","FVPqr","ger","ObNmE","BxKIW","RJlDq","DMZHN","DCcCI","TyLtY","eVuHB","Rhkbf","m-slot-lab","2|6|4","#reset-loc","BPprV","shoes","zOJIy","itpxy","GKXyO","yerButton","LjJVd","iHJak","BbbJi","Kuaou","e p","th/","slide-left","bsp; ","placeableI","TugTt","#attachmen",'ft">',"LZTOZ","YpyDq","#player_id","bDdXJ","itemshop","LfEqX","yfoxy","ontainer-d","v> ','em-nodrag"',"bottom","0, 0, 0","Open","RGCoH","IJsbl","r_search","fOWmd","CUrOx","rkFQh","cWQbS","afszD","ebgev"," &nbs","AonIf","tgbBz","YVLvl",".primary-c","quSPw","bDjto",">\n ","cycvc",".border-ra","skFeb","SgLRT","_title","quality","0|3|1|2|4","/i> ',"yvXVm","SJZhw","ffLqa","ACcZn","hLkHR","SET_TINT_P","ight: bold","fa-regular",'d="rob-mon',"sNeFF","_STEAL_MON","ouNgT","xEoFC","iDmgs","tuWKh","_crafting","BTrYb","_item",'slot-img">',"VHXPr","removeEven","zweRQ","kqBBi","IZzyE","HdRVX","IwSeJ"," <","bmTyk","XmdUT","rzUfI","BINyF","bqYcY","tnomg",'-slot-key"',"16pHkOvW","BGvqX","nIXci","fa-solid ","otheToPlay","tachment-","anvBw","fCcYw","ZamSB","/GetNearPl","NVgLs","lBkRY","uarxF","-container",".opacity-s","SYvxb","llWel","aBrON","PQRyo","data.js or","UZjsO","playerhung","MRjVf","jajDF",'-costs">\n '," ',"Close","XJNNf","mask","IdufJ","IOvlQ","hzAbL","cursor","DmlgO","IYPte","naPsu","HWoev","sJxpK","FDILa","qjVDE",">\n ","nventory .","background","rJrDK","HLYok","KFBKW","qYgyu","OITtV",">
',"ihOjr","NT_PLACEHO","mNEpY","GiveClothe","ywfUg","ADMIN_ITEM","Wvhgu",'="required',"ICtak","tradeAmoun","FHswt","GljkQ","VnfZd","wDLIO","hXSBd","viBFw","ykzJk","#rob-items","mLRPA","piHjo","setTintTit","vNOvw",'ock"><',"BrdXe","ON_NOT_STO","|2|3|12|1|","ass='item-","abel'>\n ","tOdfr","OPjPy","/quit",".player-in","TCUEC","CAjca","pxZgC","PnnEI","showTintMe","TGCDJ","1px solid ","1526427MrlXcv","boHrM","ZnMYk","slots",'g: .1vh;">'," &nb","KjbaJ","aeNiy","
","mAnUD","ocVAR","LDER","GEQSW",'-amount"><',"kxbMk","KBptz","EcSWQ","LChro","BxaqO","trunk","fromInv","jeans","ob-money","ar-item-sl","optionClot","cFkpR","\n ","NUI_LABEL_","yGTSE","Quewr","jsqDU","JaWIi","pNnRj","TUJFr","RPwBF","hotbar","uryoN","/div>","nkVpJ","XfGmZ","SDVMA","ctor_playe","XCbeX","ZpJZb","rREMh","AQNix","EydKl","optionBank","parent"," style='","TwRNl","zrNAx","info-title","#item-use ","UZUHu",'rc="images',"rDHKq","eYnux",'vh;"> ',"LpiyC","YikUU","iKfzl","SaYjz","kZmCl","6 <",", .item-in","showItemNo","WaQFy","fPfJs","znhJD","rNpmg",'mg"> 1',"MeGUW","innYU","istiF","admin_play","iPwBB","target","rBMCw","lCuaX","KJwpH","cIwWG","tlZZi","OchHc","oDNuG","rsjXV","m-info-typ","0|16|9|6|3","uOovQ","hoverClass","showLine"," 0.0","PtWlB","jpKtX","zvUaq","ON_MISSING","selling","HMSHF","-weight","admin_conf","ikTqz","KGmzW","#cancel-gi","ight-progr","rjXhh","container","_THROW","TBBCZ","nytRS","TEAwi","tshirt","IiBCj","#item-amou","playerhp","FxDhn","zKDKu","lVoHH","xAerB","tCcXN","OFRyv","onmouseup","NUI_SERIAL",'mg src="',"gSxmU"," \n ","JlNCc","GNNHX","xTYJs","bwNpk"," If you ","GRCLE","MIDZh",'t-img">6 (',"optionConf","gOWKK","JXxls"," ',"pMqZz","IYHJR",'label="',"rrlQK","ve-item","pXrvk",'-lock"> ',"vQClG","/RobPlayer","WyYDK","optionHeal","ammotype","Error","ling","120GDyQqJ","gCfQp","t-label ","PpEgo",'s="weapon-',"LbzgC","brightness","ght-progre","LITY","YHAFM","WikVc","CONDARY","#item-give","checkInVeh","[data-zhot","remove","IDlEP","tBNxh","ot-quality","xcEev",'l"> &nbs',"MvNIq","otbar-item","ygeeQ","2|3|9|8|0|",'-key"> 6',"DsSHH","tVoGC","0|6|2|1|4|","hqxPA","#itembox-i","SkjdC","CTBLp","vCKpy","3|10|3|15|","rare","YjXwo","dient(120.","zOVzb","Iqpln",'"> 6 \n ",'ss="serial',"#itembox-l","ase","ADMIN_PLAY","VxGVg","BVaRB","dHVgy","uyDXr","CIxtn","qgIwT","dropslots",'"fas fa-lo',"ipkha","tal","b-items, #","YRNnM","rciWE","aJjVU","pWfPD","moveTo","XlNdn","UBvJA","GsttO",".weapon-ti"," probably ",'d="require',"HMVeZ","XImtk","MQtNz","WnwRh",'">  ',"HMScx","nAmaz","sHGiJ","MfxkP"," (","LFRBA","/ChangeAtt","SnGat","MISSING NA","item-slot-","GmfIK","XBdlq","MmLos","ITLE","g src='clo","feBWL","hide","giLXS","item-nodra","kCJBN","GE THE CON"," ","hdjwT","yUtiq","OXTtR","mtiZN","#confirm-g","Bzijv","KrtYt","UJack","uJsNH","aNuGi",'-label="',"qJigJ","toFixed","eNIDy","hrUan"," ',".weapon-at","GxBTQ","IosGN","KJbaT","GaTDh","HsIag","100.3px","bJVoR","ZeovX","intro skip","kkEye","AZDSC","GEKDT","WYxFQ","bvwha","empty","compactInv","yElhR","-label","ge_2.wav","ugiiE","muZmH","src","scNph","Ilhpw","Drop","HPiRG","bxUBO",'nts-line" ',"rewards","container ","atNZr","lVIim","FWwLM","sCbzi","WMoHY","iCoWO","RobPlayer","PLfii","MPATIBLE","#admin_met","dItem-labe","v-label","GNdtv","UKdwO","GjzBM","JxFFA",") ',"on Section","-container","div class=","ctor-playe","1985920Hgztos","/images/de",'earch">',"2298267WaeCpZ",'" for="ite',"item-weigh",'er-info" i','"item-list'," ",'-name">No '," Loadi","#clear-ite","ar-item-se"," Metadata',"hidden","846438rvNqUG",'fault.png"',"ear-select","Jzqfg","FNkrb","4jAiniC","ZgGkn","r-selectio","an>","mgEJI","cGWuB"," \n ","label>\n ",'s="selecte','v class="g','image">\n '," ',"vBqPW",'" id="item',"GcbiR","SHRmQ",'ass="admin',"div>\n ","XWfpy",'"item-imag',"tem Sectio","split","item-type","image","sCTVQ"," "," "," \x3c!-- It","10wFfiAy","198426hnvHGW","close",'ion">\n ',"(name, lab"," ',"udADH","ahBGY","OMeKn","","SSleA","Qrgwa","essbar","FYffA","substring","ng item-no","ezMtw","DglVl","NUI_ITEMBO","data-slot=","xEIva","AmOYn","nt-","mJGLS","RhlwX","nger-title","xCmrp","nTgOn","fRSpd","lQeRR","klGIT","LrXQe","eafse","DyZTi","GvIcw","/CloseInve",".ply-hotba","KCEkr","div>\n ","unRdD","playerBlac","iv>
\n ','">\n ',"getElement","nger-input"," #item-swi","blockedSlo",'ot="',"vxZSS","MBcAi","hIzmO","Jtkol","DOEhS","myyWi","entory","setTintPla","ZyqPn",'l">","bEXBg","itOJe","amount, #i","BMZHP","Update","uGHZt","PovbV","vhYiN","NUI_OPTION","eable","KcMCj","IrLWm","ljxsg","teKtd","dgnlm","XDaOD","sprdH",'ss="z-hotb',"data-label","tem-slot-b","glasses","FbTbd","each","GetItemLis","gIiQf","QEVkT","ound","innerWidth","bdofY","epair"," .label-ch","MQgUK","cynXH","9|0|1","weapon-tin","QhRgC","NUI_DURABI","opupR","jiqbY","iNvPZ","UEBmQ","RiVoh","aKUfK","xZfJe","amaCX","rgba(0, 0,","NbVcZ",">
',"dPHrN","PaUtK","HlDNK","g, #weapon","rgb(39, 17","text","t-costs-co","tListener",'al">
',"BWVSi","RooVA","UseItem","LCfBv","CHANGE_PLA","maxweight","m-switch, ","WouhV","Lnmtn","FEKLm","qoShy","pageY","CpeAL","HTVKC",".border-co","hCemI","xxujw","AKQbJ","05% 120.05","lider","NGUZi","tem-slot","mxkOO","iLITj","bPrbL","alstorage","UFSCg","row","OKZBW",'bility">\n ","KTJXo",'ts">\n ","g'\">\n ",'class="but',"gnVhZ","yers","Item Selec","ected-play","stener","qXMah","ESSAGE","election","renderItem","GZYli","
-',"nner fa-sp","min button","clearItemS",'ck">
',"isOpen",'name="',"hgJBC","button-adm","er fa-spin"," \n ',"ADMIN_ITEM",'" onerror=',"item-name",'s="fas fa-',"EAEVh",'ass="playe'," ","vvCZx"," \n ","item-summa",'id">ID: -<',"
\n ","/searchPla","
\n ','-box-open"',"MwCFC",'"form-acti',"ive-item-f"," ","HtLxU","
","confirm-gi","TEMS","rVznR","ction
","wBIiX","resetForm",'el)">\n '," ","#give-item"," --\x3e\n ","ctedItemIn","PgrdI","VHVNu","item-info","\n ","vpfex","input",'n" id="cle','-section">',"/searchIte","5|3|0|2|4|",'v class="i',"a\"}' rows=",'ea id="ite',"form-group",'tainer" cl',"NVALID_AMO","updateItem","#player-li",'="admin-gi',"h3>No Play',"p>",' fa-user">',"kUcRI","in-seconda"," ","post","stringify","kWkLF","KjXWZ","key",'-info">\n ',"ELECT_BOTH","ROhrb","\n ','o" id="sel',"
\n ","ems","/resetNui","uHldA","ordNA","senderId","|4|8|7|3|9","resetTrade","layerChang","255342xfdkUL","825667FpZklP","bXiQj","LwKAZ","QRdPe","amount","preventDef","MAPBL",'m-img">\n ',"/confirmTo","toggle","ggled","-inventory","8543728IxymTo","receiver-o","action","aAVCB","m-slot.rec","m-slot","uvkYj","GXLmY","tory","|0|10","VuDfT","WOifM","ation",'"item-amou',"UzsiL","XXDRK"," \n ","swapItems",".offer-ite","sender-off","KHNNo","rare"];return(_0x58a1=function(){return e})()}!function(){for(var e=_0x34bc,n=_0x58a1();;)try{if(777340==-parseInt(e(376))+-parseInt(e(475))/2*(parseInt(e(472))/3)+parseInt(e(452))/4*(-parseInt(e(357))/5)+-parseInt(e(375))/6*(-parseInt(e(460))/7)+-parseInt(e(388))/8+-parseInt(e(492))/9*(parseInt(e(419))/10)+parseInt(e(352))/11*(parseInt(e(279))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}();const app=new Vue({el:_0xc2879e(353),data:{show:!1,senderId:null,receiverId:null,source:null,senderConfirmed:!1,receiverConfirmed:!1,senderName:null,receiverName:null,sourceItems:[],receiverItems:[],offerSlots:8},watch:{senderConfirmed:function(e,n){var t=_0xc2879e;this[t(269)+t(305)]()},receiverConfirmed:function(e,n){var t=_0xc2879e;this[t(269)+t(305)]()}},methods:{Lang(e){return{JDwQm:function(e,n){return e(n)}}[_0xc2879e(301)](Lang,e)},getImageUrl(e){return{zGjVY:function(e,n){return e(n)}}[_0xc2879e(429)](getImageUrl,e)},cancelTrade(){var e=_0xc2879e,n={PZaIK:e(458)+e(387)+e(430)+e(274),faNQm:e(458)+e(387)+e(368)};$[e(343)](n[e(316)],JSON[e(466)]({receiver:this[e(450)],sender:this[e(371)]})),$[e(343)](n[e(486)],JSON[e(466)]({})),this[e(373)]()},setTrade(e){var n=_0xc2879e,t={lPucn:n(336)+n(314)}[n(413)][n(332)]("|");let r=0;for(;;){switch(t[r++]){case"0":this[n(459)+n(367)]=e[n(342)+n(307)];continue;case"1":this[n(283)+"s"]=e[n(446)+n(350)];continue;case"2":InTrade=!0;continue;case"3":this[n(371)]=e[n(320)+"ce"];continue;case"4":this[n(344)]=e[n(344)];continue;case"5":this[n(487)+"me"]=e[n(487)+"me"];continue;case"6":this[n(333)]=!0;continue;case"7":this[n(450)]=e[n(306)+n(268)];continue;case"8":this[n(297)]=e[n(297)];continue}break}},setConfirmed(e){var n=_0xc2879e,t={QPGzm:function(e,n){return e==n}};t[n(495)](this[n(344)],this[n(371)])&&(this[n(441)+n(323)]=e),t[n(495)](this[n(344)],this[n(450)])&&(this[n(457)+n(473)]=e)},completeTrade(){const c=_0xc2879e,s={tKnQh:function(e,n){return e!=n},LwKAZ:function(e,n){return e(n)},Scpit:c(272),NinXF:function(e,n){return e(n)},JDFFQ:function(e,n){return e(n)},nzpcV:function(e,n){return e!=n},lukQX:function(e,n){return e(n)},XXDRK:function(e,n){return e(n)},NnLih:c(458)+c(387)+c(284)+c(473)};if(this[c(457)+c(473)]&&this[c(441)+c(323)]){let r=[],i=[];$[c(477)](s[c(440)]($,c(406)+c(465)+c(454)+c(339)),function(e,n){var t=c;s[t(410)](s[t(378)]($,n)[t(277)](s[t(453)]),null)&&(n=JSON[t(447)](s[t(440)]($,n)[t(277)](s[t(453)])),s[t(479)](isObjectEmpty,n)||r[t(480)](n))}),$[c(477)](s[c(403)]($,c(406)+c(467)+c(451)+c(393)),function(e,n){var t=c;s[t(417)](s[t(378)]($,n)[t(277)](s[t(453)]),null)&&(n=JSON[t(447)](s[t(444)]($,n)[t(277)](s[t(453)])),s[t(479)](isObjectEmpty,n)||i[t(480)](n))}),$[c(343)](s[c(414)],JSON[c(466)]({receiver:this[c(450)],sender:this[c(371)],receiverOfferItems:r,senderOfferItems:i})),this[c(373)]()}},resetTrade(){var e=_0xc2879e,n={AjkkY:e(481)+e(372)+e(397)}[e(329)][e(332)]("|");let t=0;for(;;){switch(n[t++]){case"0":this[e(459)+e(367)]=[];continue;case"1":this[e(333)]=!1;continue;case"2":this[e(344)]=null;continue;case"3":this[e(487)+"me"]=null;continue;case"4":this[e(457)+e(473)]=!1;continue;case"5":this[e(450)]=null;continue;case"6":InTrade=!1;continue;case"7":this[e(297)]=null;continue;case"8":this[e(441)+e(323)]=!1;continue;case"9":this[e(283)+"s"]=[];continue;case"10":this[e(317)]=8;continue;case"11":this[e(371)]=null;continue}break}},confirmTrade(){var e=_0xc2879e,n={iHLIY:function(e,n){return e==n},CnusH:e(458)+e(387)+e(384)+e(386)};n[e(359)](this[e(344)],this[e(371)])?(this[e(457)+e(473)]=!this[e(457)+e(473)],$[e(343)](n[e(303)],JSON[e(466)]({receiver:this[e(450)],sender:this[e(371)],toggle:this[e(457)+e(473)]}))):n[e(359)](this[e(344)],this[e(450)])&&(this[e(441)+e(323)]=!this[e(441)+e(323)],$[e(343)](n[e(303)],JSON[e(466)]({receiver:this[e(450)],sender:this[e(371)],toggle:this[e(441)+e(323)]})))},swap(n,t,r,i,e){var c=_0xc2879e,s={JieTQ:function(e,n){return e(n)},hXqIR:function(e,n){return e(n)},UzsiL:c(310),hSzfh:c(272),ysCJO:function(e,n){return e(n)},BcZIS:function(e,n){return e!=n},uHldA:function(e,n){return e!=n},PGOOb:function(e,n){return e==n},VuDfT:function(e,n){return e(n)},hOaFe:function(e,n){return n