This commit is contained in:
Nordi98 2025-07-09 14:25:50 +02:00
parent 9b77c2d36a
commit e4383f34d2
3902 changed files with 27282 additions and 525887 deletions

View file

@ -1,465 +0,0 @@
['bbq_grill'] = {
['name'] = 'bbq_grill',
['label'] = 'BBQ Grill',
['weight'] = 0,
['type'] = 'item',
['image'] = 'bbq_grill.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'BBQ Grill'
},
['gazebo'] = {
['name'] = 'gazebo',
['label'] = 'Gazebo',
['weight'] = 0,
['type'] = 'item',
['image'] = 'gazebo.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Gazebo'
},
['soda_machine'] = {
['name'] = 'soda_machine',
['label'] = 'Soda Machine',
['weight'] = 0,
['type'] = 'item',
['image'] = 'soda_machine.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Soda Machine'
},
['table'] = {
['name'] = 'table',
['label'] = 'Table',
['weight'] = 0,
['type'] = 'item',
['image'] = 'table.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Table'
},
['flood_light'] = {
['name'] = 'flood_light',
['label'] = 'Flood Light',
['weight'] = 0,
['type'] = 'item',
['image'] = 'flood_light.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Flood Light'
},
['chair'] = {
['name'] = 'chair',
['label'] = 'Chair',
['weight'] = 0,
['type'] = 'item',
['image'] = 'chair.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Chair'
},
['raw_ribs'] = {
['name'] = 'raw_ribs',
['label'] = 'Raw Ribs',
['weight'] = 0,
['type'] = 'item',
['image'] = 'raw_ribs.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Raw Ribs'
},
['raw_beef_brisket'] = {
['name'] = 'raw_beef_brisket',
['label'] = 'Raw Beef Brisket',
['weight'] = 0,
['type'] = 'item',
['image'] = 'raw_beef_brisket.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Raw Beef Brisket'
},
['pork_joint'] = {
['name'] = 'pork_joint',
['label'] = 'Pork Joint',
['weight'] = 0,
['type'] = 'item',
['image'] = 'pork_joint.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Pork Joint'
},
['raw_sausages'] = {
['name'] = 'raw_sausages',
['label'] = 'Raw Sausages',
['weight'] = 0,
['type'] = 'item',
['image'] = 'raw_sausages.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Raw Sausages'
},
['raw_short_ribs'] = {
['name'] = 'raw_short_ribs',
['label'] = 'Raw Short Ribs',
['weight'] = 0,
['type'] = 'item',
['image'] = 'raw_short_ribs.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Raw Short Ribs'
},
['lamb_chops'] = {
['name'] = 'lamb_chops',
['label'] = 'Lamb Chops',
['weight'] = 0,
['type'] = 'item',
['image'] = 'lamb_chops.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Lamb Chops'
},
['ribeye_steak'] = {
['name'] = 'ribeye_steak',
['label'] = 'Ribeye Steak',
['weight'] = 0,
['type'] = 'item',
['image'] = 'ribeye_steak.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Ribeye Steak'
},
['chicken_thigh'] = {
['name'] = 'chicken_thigh',
['label'] = 'Chicken Thigh',
['weight'] = 0,
['type'] = 'item',
['image'] = 'chicken_thigh.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Chicken Thigh'
},
['raw_turkey_drums'] = {
['name'] = 'raw_turkey_drums',
['label'] = 'Raw Turkey Drumsticks',
['weight'] = 0,
['type'] = 'item',
['image'] = 'raw_turkey_drums.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Raw Turkey Drumsticks'
},
['corn_cob'] = {
['name'] = 'corn_cob',
['label'] = 'Corn on the Cob',
['weight'] = 0,
['type'] = 'item',
['image'] = 'corn_cob.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Corn on the Cob'
},
['raw_kebab'] = {
['name'] = 'raw_kebab',
['label'] = 'Raw Kebab',
['weight'] = 0,
['type'] = 'item',
['image'] = 'raw_kebab.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Raw Kebab'
},
['bbq_seasoning'] = {
['name'] = 'bbq_seasoning',
['label'] = 'BBQ Seasoning',
['weight'] = 0,
['type'] = 'item',
['image'] = 'bbq_seasoning.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'BBQ Seasoning'
},
['raw_wings'] = {
['name'] = 'raw_wings',
['label'] = 'Raw Wings',
['weight'] = 0,
['type'] = 'item',
['image'] = 'raw_wings.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Raw Wings'
},
['cooked_ribs'] = {
['name'] = 'cooked_ribs',
['label'] = 'Cooked Ribs',
['weight'] = 0,
['type'] = 'item',
['image'] = 'cooked_ribs.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Cooked Ribs'
},
['cooked_brisket'] = {
['name'] = 'cooked_brisket',
['label'] = 'Cooked Brisket',
['weight'] = 0,
['type'] = 'item',
['image'] = 'cooked_brisket.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Cooked Brisket'
},
['cooked_pork_joint'] = {
['name'] = 'cooked_pork_joint',
['label'] = 'Cooked Pork Joint',
['weight'] = 0,
['type'] = 'item',
['image'] = 'cooked_pork_joint.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Cooked Pork Joint'
},
['cooked_bbq_sausages'] = {
['name'] = 'cooked_bbq_sausages',
['label'] = 'Cooked BBQ Sausages',
['weight'] = 0,
['type'] = 'item',
['image'] = 'cooked_bbq_sausages.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Cooked BBQ Sausages'
},
['cooked_short_ribs'] = {
['name'] = 'cooked_short_ribs',
['label'] = 'Cooked Short Ribs',
['weight'] = 0,
['type'] = 'item',
['image'] = 'cooked_short_ribs.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Cooked Short Ribs'
},
['cooked_lamb_chops'] = {
['name'] = 'cooked_lamb_chops',
['label'] = 'Cooked Lamb Chops',
['weight'] = 0,
['type'] = 'item',
['image'] = 'cooked_lamb_chops.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Cooked Lamb Chops'
},
['cooked_bbq_ribeye'] = {
['name'] = 'cooked_bbq_ribeye',
['label'] = 'Cooked BBQ Ribeye',
['weight'] = 0,
['type'] = 'item',
['image'] = 'cooked_bbq_ribeye.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Cooked BBQ Ribeye'
},
['cooked_bbq_thigh'] = {
['name'] = 'cooked_bbq_thigh',
['label'] = 'Cooked BBQ Thigh',
['weight'] = 0,
['type'] = 'item',
['image'] = 'cooked_bbq_thigh.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Cooked BBQ Thigh'
},
['cooked_turkey_drum'] = {
['name'] = 'cooked_turkey_drum',
['label'] = 'Cooked Turkey Drum',
['weight'] = 0,
['type'] = 'item',
['image'] = 'cooked_turkey_drum.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Cooked Turkey Drum'
},
['cooked_corn_cob'] = {
['name'] = 'cooked_corn_cob',
['label'] = 'Cooked Corn on the Cob',
['weight'] = 0,
['type'] = 'item',
['image'] = 'cooked_corn_cob.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Cooked Corn on the Cob'
},
['cooked_kebab'] = {
['name'] = 'cooked_kebab',
['label'] = 'Cooked Kebab',
['weight'] = 0,
['type'] = 'item',
['image'] = 'cooked_kebab.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Cooked Kebab'
},
['cooked_bbq_wings'] = {
['name'] = 'cooked_bbq_wings',
['label'] = 'Cooked BBQ Wings',
['weight'] = 0,
['type'] = 'item',
['image'] = 'cooked_bbq_wings.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Cooked BBQ Wings'
},
--- drinks
['cup_cola'] = {
['name'] = 'cup_cola',
['label'] = 'Cup of Cola',
['weight'] = 1,
['type'] = 'item',
['image'] = 'cup_cola.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A refreshing cup of cola'
},
['cup_lemonade'] = {
['name'] = 'cup_lemonade',
['label'] = 'Cup of Lemonade',
['weight'] = 1,
['type'] = 'item',
['image'] = 'cup_lemonade.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A refreshing cup of lemonade'
},
['cup_tide'] = {
['name'] = 'cup_tide',
['label'] = 'Cup of Tide',
['weight'] = 1,
['type'] = 'item',
['image'] = 'cup_tide.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A cup that looks suspiciously like tide'
},
['empty_cup'] = {
['name'] = 'empty_cup',
['label'] = 'Empty Cup',
['weight'] = 0.5,
['type'] = 'item',
['image'] = 'empty_cup.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'An empty cup, ready for refilling'
},
['big_bottle_cola'] = {
['name'] = 'big_bottle_cola',
['label'] = 'Big Bottle of Cola',
['weight'] = 3,
['type'] = 'item',
['image'] = 'big_bottle_cola.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A big bottle of cola to quench your thirst'
},
['big_bottle_lemonade'] = {
['name'] = 'big_bottle_lemonade',
['label'] = 'Big Bottle of Lemonade',
['weight'] = 3,
['type'] = 'item',
['image'] = 'big_bottle_lemonade.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A big bottle of lemonade to quench your thirst'
},
['big_bottle_tide'] = {
['name'] = 'big_bottle_tide',
['label'] = 'Big Bottle of Tide',
['weight'] = 3,
['type'] = 'item',
['image'] = 'big_bottle_tide.png',
['unique'] = false,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'A big bottle that looks suspiciously like tide'
},

View file

@ -1,43 +0,0 @@
A list of non-formatted items (This is for you if you do not use the inventory's we have listed.)
bbq_grill
gazebo
soda_machine
table
flood_light
chair
raw_ribs
raw_beef_brisket
pork_joint
raw_sausages
raw_short_ribs
lamb_chops
ribeye_steak
chicken_thigh
raw_turkey_drums
corn_cob
raw_kebab
bbq_seasoning
raw_wings
cooked_ribs
cooked_brisket
cooked_pork_joint
cooked_bbq_sausages
cooked_short_ribs
cooked_lamb_chops
cooked_bbq_ribeye
cooked_bbq_thigh
cooked_turkey_drum
cooked_corn_cob
cooked_kebab
cooked_bbq_wings
--- drinks
cup_cola
cup_lemonade
cup_tide
empty_cup
big_bottle_cola
big_bottle_lemonade
big_bottle_tide

View file

@ -1,231 +0,0 @@
["bbq_grill"] = {
label = "BBQ Grill",
weight = 15,
stack = true,
close = true
},
["gazebo"] = {
label = "Gazebo",
weight = 15,
stack = true,
close = true
},
["soda_machine"] = {
label = "Soda Machine",
weight = 15,
stack = true,
close = true
},
["table"] = {
label = "Table",
weight = 15,
stack = true,
close = true
},
["flood_light"] = {
label = "Flood Light",
weight = 15,
stack = true,
close = true
},
["chair"] = {
label = "Chair",
weight = 15,
stack = true,
close = true
},
["raw_ribs"] = {
label = "Raw Ribs",
weight = 15,
stack = true,
close = true
},
["raw_beef_brisket"] = {
label = "Raw Beef Brisket",
weight = 15,
stack = true,
close = true
},
["pork_joint"] = {
label = "Pork Joint",
weight = 15,
stack = true,
close = true
},
["raw_sausages"] = {
label = "Raw Sausages",
weight = 15,
stack = true,
close = true
},
["raw_short_ribs"] = {
label = "Raw Short Ribs",
weight = 15,
stack = true,
close = true
},
["lamb_chops"] = {
label = "Lamb Chops",
weight = 15,
stack = true,
close = true
},
["ribeye_steak"] = {
label = "Ribeye Steak",
weight = 15,
stack = true,
close = true
},
["chicken_thigh"] = {
label = "Chicken Thigh",
weight = 15,
stack = true,
close = true
},
["raw_turkey_drums"] = {
label = "Raw Turkey Drumsticks",
weight = 15,
stack = true,
close = true
},
["corn_cob"] = {
label = "Corn on the Cob",
weight = 15,
stack = true,
close = true
},
["raw_kebab"] = {
label = "Raw Kebab",
weight = 15,
stack = true,
close = true
},
["bbq_seasoning"] = {
label = "BBQ Seasoning",
weight = 15,
stack = true,
close = true
},
["raw_wings"] = {
label = "Raw Wings",
weight = 15,
stack = true,
close = true
},
["cooked_ribs"] = {
label = "Cooked Ribs",
weight = 15,
stack = true,
close = true
},
["cooked_brisket"] = {
label = "Cooked Brisket",
weight = 15,
stack = true,
close = true
},
["cooked_pork_joint"] = {
label = "Cooked Pork Joint",
weight = 15,
stack = true,
close = true
},
["cooked_bbq_sausages"] = {
label = "Cooked BBQ Sausages",
weight = 15,
stack = true,
close = true
},
["cooked_short_ribs"] = {
label = "Cooked Short Ribs",
weight = 15,
stack = true,
close = true
},
["cooked_lamb_chops"] = {
label = "Cooked Lamb Chops",
weight = 15,
stack = true,
close = true
},
["cooked_bbq_ribeye"] = {
label = "Cooked BBQ Ribeye",
weight = 15,
stack = true,
close = true
},
["cooked_bbq_thigh"] = {
label = "Cooked BBQ Chicken Thigh",
weight = 15,
stack = true,
close = true
},
["cooked_turkey_drum"] = {
label = "Cooked Turkey Drumstick",
weight = 15,
stack = true,
close = true
},
["cooked_corn_cob"] = {
label = "Cooked Corn on the Cob",
weight = 15,
stack = true,
close = true
},
["cooked_kebab"] = {
label = "Cooked Kebab",
weight = 15,
stack = true,
close = true
},
["cooked_bbq_wings"] = {
label = "Cooked BBQ Wings",
weight = 15,
stack = true,
close = true
},
-- drinks
["cup_cola"] = {
label = "Cup of Cola",
weight = 1,
stack = true,
close = true
},
["cup_lemonade"] = {
label = "Cup of Lemonade",
weight = 1,
stack = true,
close = true
},
["cup_tide"] = {
label = "Cup of Tide",
weight = 1,
stack = true,
close = true
},
["empty_cup"] = {
label = "Empty Cup",
weight = 0.5,
stack = true,
close = true
},
["big_bottle_cola"] = {
label = "Big Bottle of Cola",
weight = 3,
stack = true,
close = true
},
["big_bottle_lemonade"] = {
label = "Big Bottle of Lemonade",
weight = 3,
stack = true,
close = true
},
["big_bottle_tide"] = {
label = "Big Bottle of Tide",
weight = 3,
stack = true,
close = true
},

View file

@ -1,14 +0,0 @@
### DISCORD.GG/CODEWAVE ###
Hello! Thanks for purchasing CodeWave BBQ Let's Cook Script!
> 1. Firstly you will need to add all items & images to your inventory, you can find them in, install me folders attached within the script.
> 2. Secondly, Head to the config & ensure you have selected the correct framework (This is very important.)
> 3. Next, Adjust prices & yields *(yields are how many items the player gets per cook)*
> 4. You're essentially done, You can edit quite a bit so go crazy if you'd like, If you do need any support please feel free to reach out to CodeWave, Via our Discord.gg/codewave
**In the event of our discord not working, you can directly add CodeWave via discord - pickle4800**

View file

@ -1,106 +0,0 @@
--- ######################### ---
--- ## DISCORD.GG/CODEWAVE ## ---
--- ######################### ---
--- ### BBQ SCRIPT BY DISCORD.GG/CODEWAVE ### ---
Config = {}
Config.Framework = 'QBCore' -- 'ESX' or 'QBCore' (case sensitive)
Config.InteractionType = '3dtext' -- ox_target | 3dtext
Config.UseOxTargetForNpc = false -- Set to true to enable ox_target, false to use key press interaction
Config.TimeToCraft = 8000
Config.DebugMode = false -- Set to true to enable debug messages
Config.OnlyFemales = false -- Enable or disable the restriction to only allow male peds
Config.FemalePedModels = {
GetHashKey("mp_m_freemode_01"), -- Male freemode character
GetHashKey("mp_f_freemode_01") -- Female freemode character
}
Config.NPC = {
Model = "a_f_m_soucentmc_01", -- Change to your desired NPC model
Coords = vector3(53.1397, -1478.7578, 28.2871), -- Change to your desired NPC spawn location
Heading = 182.0, -- Adjust the heading as needed
BlipSprite = 52, -- Example blip icon, see https://wiki.rage.mp/index.php?title=Blips for blip IDs
BlipScale = 0.8,
BlipColour = 81,
BlipName = "BBQ Store"
}
-- Add anything you want here (For example if you want a new required item you can add it here for them to purchase!)
Config.Items = {
{ name = "BBQ Grill", id = "bbq_grill", img = "image/bbq_grill.png", price = 100 }, -- You don't really need too touch anything apart from PRICE
{ name = "Gazebo", id = "gazebo", img = "image/gazebo.png", price = 200 },
{ name = "Outside Chair", id = "chair", img = "image/chair.png", price = 100 },
{ name = "Flood Light", id = "flood_light", img = "image/flood_light.png", price = 100 },
{ name = "Table", id = "table", img = "image/table.png", price = 100 },
{ name = "Soda Machine Maker", id = "soda_machine", img = "image/soda_machine.png", price = 100 },
{ name = "Raw Ribs", id = "raw_ribs", img = "image/raw_ribs.png", price = 300 },
{ name = "Raw Beef Brisket", id = "raw_beef_brisket", img = "image/raw_beef_brisket.png", price = 100 },
{ name = "Pork Joint", id = "pork_joint", img = "image/pork_joint.png", price = 100 },
{ name = "Raw Pork Sausages", id = "raw_sausages", img = "image/raw_sausages.png", price = 100 },
{ name = "Raw Short Ribs", id = "raw_short_ribs", img = "image/raw_short_ribs.png", price = 100 },
{ name = "Raw Lamb Chops", id = "lamb_chops", img = "image/lamb_chops.png", price = 100 },
{ name = "Raw Ribeye Steak", id = "ribeye_steak", img = "image/ribeye_steak.png", price = 100 },
{ name = "Raw Chicken Thigh", id = "chicken_thigh", img = "image/chicken_thigh.png", price = 100 },
{ name = "Raw Turkey Drum Sticks", id = "raw_turkey_drums", img = "image/raw_turkey_drums.png", price = 100 },
{ name = "Corn Cob", id = "corn_cob", img = "image/corn_cob.png", price = 100 },
{ name = "Raw Kebab", id = "raw_kebab", img = "image/raw_kebab.png", price = 100 },
{ name = "Raw Chicken Wings", id = "raw_wings", img = "image/raw_wings.png", price = 300 },
{ name = "BBQ Seasoning", id = "bbq_seasoning", img = "image/bbq_seasoning.png", price = 100 },
{ name = "Empty Plastic Cup", id = "empty_cup", img = "image/empty_cup.png", price = 100 },
{ name = "Big Bottle Of Cola", id = "big_bottle_cola", img = "image/big_bottle_cola.png", price = 100 },
{ name = "Big Bottle Of Lemonade", id = "big_bottle_lemonade", img = "image/big_bottle_lemonade.png", price = 100 },
{ name = "Bierfass", id = "beerkeg", img = "image/beerkeg.png", price = 200 },
}
--####################################################################--
--### THE FIELD "YIELD" IS HOW MANY COOKED ITEMS THEY WILL RECEIVE ###--
--####################################################################--
Config.CraftingRecipes = {
{ name = "Cooked BBQ Ribs", id = "cooked_ribs", img = "image/cooked_ribs.png", requiredItems = { { id = "raw_ribs", quantity = 1 }, { id = "bbq_seasoning", quantity = 1 } }, yield = 1 },
{ name = "Cooked BBQ Brisket", id = "cooked_brisket", img = "image/cooked_brisket.png", requiredItems = { { id = "raw_beef_brisket", quantity = 1 }, { id = "bbq_seasoning", quantity = 1 } }, yield = 1 },
{ name = "Cooked Pork Joint", id = "cooked_pork_joint", img = "image/cooked_pork_joint.png", requiredItems = { { id = "pork_joint", quantity = 1 }, { id = "bbq_seasoning", quantity = 1 } }, yield = 1 },
{ name = "Cooked BBQ Sausages", id = "cooked_bbq_sausages", img = "image/cooked_bbq_sausages.png", requiredItems = { { id = "raw_sausages", quantity = 1 }, { id = "bbq_seasoning", quantity = 1 } }, yield = 1 },
{ name = "Cooked Short Ribs", id = "cooked_short_ribs", img = "image/cooked_short_ribs.png", requiredItems = { { id = "raw_short_ribs", quantity = 1 }, { id = "bbq_seasoning", quantity = 1 } }, yield = 1 },
{ name = "Cooked Lamb Chops", id = "cooked_lamb_chops", img = "image/cooked_lamb_chops.png", requiredItems = { { id = "lamb_chops", quantity = 1 }, { id = "bbq_seasoning", quantity = 1 } }, yield = 1 },
{ name = "Cooked BBQ Ribeye", id = "cooked_bbq_ribeye", img = "image/cooked_bbq_ribeye.png", requiredItems = { { id = "ribeye_steak", quantity = 1 }, { id = "bbq_seasoning", quantity = 1 } }, yield = 1 },
{ name = "Cooked BBQ Thigh", id = "cooked_bbq_thigh", img = "image/cooked_bbq_thigh.png", requiredItems = { { id = "chicken_thigh", quantity = 1 }, { id = "bbq_seasoning", quantity = 1 } }, yield = 1 },
{ name = "Cooked Turkey Drum Stick", id = "cooked_turkey_drum", img = "image/cooked_turkey_drum.png", requiredItems = { { id = "raw_turkey_drums", quantity = 1 }, { id = "bbq_seasoning", quantity = 1 } }, yield = 1 },
{ name = "Cooked Corn Cob", id = "cooked_corn_cob", img = "image/cooked_corn_cob.png", requiredItems = { { id = "corn_cob", quantity = 1 }, { id = "bbq_seasoning", quantity = 1 } }, yield = 1 },
{ name = "Cooked Kebab", id = "cooked_kebab", img = "image/cooked_kebab.png", requiredItems = { { id = "raw_kebab", quantity = 1 }, { id = "bbq_seasoning", quantity = 1 } }, yield = 1 },
{ name = "Cooked BBQ Wings", id = "cooked_bbq_wings", img = "image/cooked_bbq_wings.png", requiredItems = { { id = "raw_wings", quantity = 1 }, { id = "bbq_seasoning", quantity = 1 } }, yield = 1 }
}
-- This is for DRINKS, Teas/Coffees/Sodas/Ect
Config.CraftingRecipesDrinks = {
{ name = "Becher E-Cola", id = "cup_cola", img = "image/cup_cola.png", requiredItems = { { id = "empty_cup", quantity = 5 }, { id = "big_bottle_cola", quantity = 1 } }, yield = 5 },
{ name = "Becher Sprunk", id = "cup_lemonade", img = "image/cup_lemonade.png", requiredItems = { { id = "empty_cup", quantity = 5 }, { id = "big_bottle_lemonade", quantity = 1 } }, yield = 5 },
{ name = "Becher Orange O Tang", id = "cup_tide", img = "image/cup_tide.png", requiredItems = { { id = "empty_cup", quantity = 5 }, { id = "big_bottle_tide", quantity = 1 } }, yield = 5 },
{ name = "Becher Bier", id = "cup_beer", img = "image/cup_beer.png", requiredItems = { { id = "empty_cup", quantity = 5 }, { id = "beerkeg", quantity = 1 } }, yield = 6 }
}
Config.PlayMusicWhileUIIsOpen = false --- True = music plays, False = music doesn't. (YOU CAN CHANGE MUSIC IN SOUNDS FILE)
Config.MusicVolume = 0.05 --- Music volume in the menu, Only applies if above is set to True
--- ALL THESE ITEMS ARE FOR COSMETIC EFFECTS ONLY (YOU CAN ADD AS MANY AS YOU WISH) --
-- Install instructions - the first field "gazebo" would be the item you would add to your inventory, the other field is the prop it will use --
--- VERY IMPORTANT. THE INTERACTABLE FIELD SHOUD ALL REMAIN FALSE APART FROM THE DEFAULT TRUE ONE (WHICH IS SODA MACHINE & BBQ GRILL) ---
Config.PlaceableProps = {
["gazebo"] = {model = "benjifilmz_codewave_bbq", interactable = false}, -- Gazebo
["flood_light"] = {model = "tr_prop_tr_tripod_lamp_01a", interactable = false}, -- Portable floodlight for night events
["bbq_grill"] = {model = "benjifilmz_codewave_grill", interactable = true}, -- Portable floodlight for night events
["chair"] = {model = "prop_chair_01b", interactable = false}, -- Chair
["table"] = {model = "prop_ven_market_table1", interactable = false}, -- Table
["soda_machine"] = {model = "prop_food_bs_soda_02", interactable = true}, -- Table
}

View file

@ -1,41 +0,0 @@
fx_version 'adamant'
game 'gta5'
author 'CodeWave, Jamie'
lua54 'yes'
description 'Codewaves BBQ (Lets Cook)'
shared_scripts {
'config.lua'
}
client_scripts {
'client/client.lua'
}
ui_page "web/index.html"
files {
"web/index.html",
'web/script.js',
'web/style.css',
'web/sounds/*.mp3',
'stream/*.ydr',
'stream/*.ytyp',
'web/image/*.png'
}
server_scripts {
'server/server.lua'
'server/callbacks.lua'
}
escrow_ignore {
'config.lua' --
}
data_file 'DLC_ITYP_REQUEST' 'stream/bbqgazebo.ytyp'
data_file 'DLC_ITYP_REQUEST' 'stream/codewavebbq.ytyp'
dependency '/assetpacks'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

View file

@ -1,46 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CodeWave Let's Cook BBQ</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body style="display: none;">
<div id="menu-container">
<div id="menu-header">
<img src="image/left-logo.png" alt="Left Hearts" class="header-icon shoe-logo">
<img src="image/logo.png" alt="Main Logo" class="header-logo">
<img src="image/right-logo.png" alt="Right Hearts" class="header-icon shoe-logo">
<button id="close-button">X</button>
</div>
<div id="menu"></div>
</div>
<div id="crafting-container" style="display: none;">
<div id="crafting-header">
<img src="image/left-logo.png" alt="Left hearts" class="header-icon shoe-logo">
<img src="image/logo.png" alt="Main Logo" class="header-logo">
<img src="image/right-logo.png" alt="Right hearts" class="header-icon shoe-logo">
<button id="close-crafting-button">X</button>
</div>
<div id="crafting-menu"></div>
<button id="more-info-button" class="themed-button">More Info</button>
<div id="loading-spinner" class="spinner" style="display: none;">
<i class="fas fa-cog spinner-icon"></i>
</div>
</div>
<div id="info-container" style="display: none;">
<div id="info-header">
<img src="image/logo.png" alt="Main Logo" class="header-logo">
<button id="close-info-button">X</button>
</div>
<div id="info-content">
<h1>How does this work?</h1>
<h2>Simply start cooking up your favorite BBQ / Grill food! Get the party going!
</h2>
</div>
</div>
<div id="notification-container"></div>
<script src="script.js"></script>
</body>
</html>

View file

@ -1,232 +0,0 @@
let backgroundMusic;
window.addEventListener('message', function(event) {
if (event.data.action == "openMenu") {
document.body.style.display = "flex";
document.getElementById('menu-container').style.display = "flex";
document.getElementById('crafting-container').style.display = "none";
createMenu(event.data.items);
if (event.data.playMusic) {
playBackgroundMusic(event.data.volume);
}
} else if (event.data.action == "closeMenu") {
document.getElementById('menu-container').style.display = "none";
stopBackgroundMusic();
if (document.getElementById('crafting-container').style.display === "none") {
document.body.style.display = "none";
}
} else if (event.data.action == "openCrafting") {
document.body.style.display = "flex";
document.getElementById('crafting-container').style.display = "flex";
document.getElementById('menu-container').style.display = "none";
// Pass menuType to differentiate between food and drink
createCraftingMenu(event.data.recipes, event.data.menuType); // added menuType here
if (event.data.playMusic) {
playBackgroundMusic(event.data.volume);
}
} else if (event.data.action == "closeCrafting") {
document.getElementById('crafting-container').style.display = "none";
stopBackgroundMusic();
if (document.getElementById('menu-container').style.display === "none") {
document.body.style.display = "none";
}
} else if (event.data.action == "notify") {
showNotification(event.data.message, event.data.type);
}
});
document.getElementById('close-button').addEventListener('click', function() {
fetch(`https://${GetParentResourceName()}/close`, {
method: 'POST',
headers: {
'Content-Type': 'application/json; charset=UTF-8',
},
body: JSON.stringify({})
}).then(resp => resp.json()).then(resp => {
if (resp == 'ok') {
document.getElementById('menu-container').style.display = "none";
stopBackgroundMusic();
if (document.getElementById('crafting-container').style.display === "none") {
document.body.style.display = "none";
}
}
});
});
document.getElementById('close-crafting-button').addEventListener('click', function() {
fetch(`https://${GetParentResourceName()}/closeCrafting`, {
method: 'POST',
headers: {
'Content-Type': 'application/json; charset=UTF-8',
},
body: JSON.stringify({})
}).then(resp => resp.json()).then(resp => {
if (resp == 'ok') {
document.getElementById('crafting-container').style.display = "none";
stopBackgroundMusic();
if (document.getElementById('menu-container').style.display === "none") {
document.body.style.display = "none";
}
}
});
});
function createMenu(items) {
const menu = document.getElementById('menu');
menu.innerHTML = '';
items.forEach(item => {
const menuItem = document.createElement('div');
menuItem.className = 'menu-item';
menuItem.id = item.id;
const itemImg = document.createElement('img');
itemImg.src = item.img;
itemImg.alt = item.name;
const itemName = document.createElement('span');
itemName.innerText = item.name;
const itemPrice = document.createElement('span');
itemPrice.className = 'item-price';
itemPrice.innerText = `$${item.price}`;
const quantityInput = document.createElement('input');
quantityInput.type = 'number';
quantityInput.min = '1';
quantityInput.value = '1';
const purchaseButton = document.createElement('button');
purchaseButton.innerText = 'Purchase';
purchaseButton.addEventListener('click', function() {
const clickSound = new Audio('sounds/click.mp3');
clickSound.play();
const quantity = quantityInput.value;
console.log(`Purchasing ${quantity} of ${item.id}`);
fetch(`https://${GetParentResourceName()}/purchase`, {
method: 'POST',
headers: {
'Content-Type': 'application/json; charset=UTF-8',
},
body: JSON.stringify({
id: item.id,
quantity: quantity
})
}).then(resp => resp.json()).then(resp => {
console.log('Purchase response:', resp);
});
});
menuItem.appendChild(itemImg);
menuItem.appendChild(itemName);
menuItem.appendChild(itemPrice);
menuItem.appendChild(quantityInput);
menuItem.appendChild(purchaseButton);
menu.appendChild(menuItem);
});
}
function createCraftingMenu(recipes, menuType) {
const craftingMenu = document.getElementById('crafting-menu');
craftingMenu.innerHTML = '';
recipes.forEach(recipe => {
const craftingItem = document.createElement('div');
craftingItem.className = 'crafting-item';
craftingItem.id = recipe.id;
const itemImg = document.createElement('img');
itemImg.src = recipe.img;
itemImg.alt = recipe.name;
const itemName = document.createElement('span');
itemName.innerText = recipe.name.replace(/_/g, ' ');
const requiredItems = document.createElement('div');
requiredItems.className = 'required-items';
recipe.requiredItems.forEach(item => {
const itemDiv = document.createElement('div');
itemDiv.innerText = `${item.quantity}x ${item.id.replace(/_/g, ' ')}`;
requiredItems.appendChild(itemDiv);
});
const craftButton = document.createElement('button');
craftButton.innerText = 'Create';
craftButton.addEventListener('click', function() {
const clickSound = new Audio('sounds/click.mp3');
clickSound.play();
console.log(`Crafting ${recipe.id} from ${menuType} menu`);
// Send a different callback based on menuType
const callbackAction = menuType === 'drink' ? 'craft-drink' : 'craft';
fetch(`https://${GetParentResourceName()}/${callbackAction}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json; charset=UTF-8',
},
body: JSON.stringify({
id: recipe.id
})
}).then(resp => resp.json()).then(resp => {
console.log(`${menuType.charAt(0).toUpperCase() + menuType.slice(1)} crafting response:`, resp);
});
});
craftingItem.appendChild(itemImg);
craftingItem.appendChild(itemName);
craftingItem.appendChild(requiredItems);
craftingItem.appendChild(craftButton);
craftingMenu.appendChild(craftingItem);
});
}
function showNotification(message, type) {
const notificationContainer = document.getElementById('notification-container');
const notification = document.createElement('div');
notification.className = 'notification';
notification.classList.add(type);
notification.innerText = message;
notificationContainer.appendChild(notification);
setTimeout(() => {
notification.remove();
}, 4000);
}
function playBackgroundMusic(volume) {
backgroundMusic = new Audio('sounds/background.mp3');
backgroundMusic.loop = true;
backgroundMusic.volume = volume;
backgroundMusic.play();
}
function stopBackgroundMusic() {
if (backgroundMusic) {
backgroundMusic.pause();
backgroundMusic.currentTime = 0;
backgroundMusic = null;
}
}
document.getElementById('more-info-button').addEventListener('click', function() {
document.getElementById('info-container').style.display = 'flex';
document.getElementById('crafting-container').style.display = 'none';
});
document.getElementById('close-info-button').addEventListener('click', function() {
document.getElementById('info-container').style.display = 'none';
document.getElementById('crafting-container').style.display = 'flex';
});

View file

@ -1,326 +0,0 @@
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Open+Sans:wght@400;700&display=swap');
body {
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-family: 'Roboto', sans-serif;
background: linear-gradient(135deg, #2d1b0a, #3b2e26); /* Dark background with warm undertones */
color: #f8f5f2;
}
#menu-container, #crafting-container {
display: flex;
flex-direction: column;
width: 95%;
max-width: 1400px;
background: linear-gradient(145deg, #ffebcd, #ffdab9); /* Light cream gradient */
border-radius: 16px;
overflow: hidden;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25); /* Deeper shadow for depth */
}
#menu-header, #crafting-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
background: linear-gradient(90deg, #d35400, #f39c12); /* Gradient with BBQ-inspired tones */
color: #ffffff;
border-bottom: 2px solid rgba(0, 0, 0, 0.1);
box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}
/* Main logo styling */
#menu-header .header-logo, #crafting-header .header-logo, #info-header .header-logo {
height: 200px; /* Enlarged main logo */
margin: 0 auto;
filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.2));
animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
}
/* Smaller left and right logos */
#menu-header .header-icon, #crafting-header .header-icon {
height: 160px; /* Reduced size for side icons */
margin: 0 10px;
filter: drop-shadow(0 0 8px rgba(255, 133, 0, 0.3)); /* Subtle orange glow */
animation: pulse 3s ease-in-out infinite;
}
#close-button, #close-crafting-button {
background: none;
border: none;
color: #e67e22;
font-size: 28px;
cursor: pointer;
transition: color 0.3s;
}
#close-button:hover, #close-crafting-button:hover {
color: #d35400; /* Darker orange */
}
#menu, #crafting-menu {
display: flex;
flex-wrap: wrap;
padding: 25px;
gap: 20px;
overflow-y: auto;
max-height: 600px;
justify-content: center;
}
/* Custom scrollbar styles */
#menu::-webkit-scrollbar, #crafting-menu::-webkit-scrollbar {
width: 10px;
}
#menu::-webkit-scrollbar-track, #crafting-menu::-webkit-scrollbar-track {
background: #ffdab9; /* Light warm background */
border-radius: 5px;
}
#menu::-webkit-scrollbar-thumb, #crafting-menu::-webkit-scrollbar-thumb {
background-color: #d35400; /* Orange for thumb */
border-radius: 5px;
transition: background-color 0.3s;
}
#menu::-webkit-scrollbar-thumb:hover, #crafting-menu::-webkit-scrollbar-thumb:hover {
background-color: #e67e22;
}
.menu-item, .crafting-item {
display: flex;
flex-direction: column;
align-items: center;
width: 240px;
padding: 20px;
background: linear-gradient(145deg, #fff3e6, #ffe6cc); /* Soft gradient for menu items */
color: #4b2e1f;
border-radius: 12px;
cursor: pointer;
transition: transform 0.3s, box-shadow 0.3s;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.menu-item img, .crafting-item img {
height: 180px;
width: 180px;
margin-bottom: 15px;
border-radius: 8px;
transition: transform 0.3s;
}
.menu-item span, .crafting-item span {
font-size: 18px;
text-align: center;
font-weight: 700;
}
.menu-item .item-price {
font-size: 16px;
margin: 6px 0;
color: #e67e22; /* BBQ orange accent */
}
.menu-item input, .crafting-item input {
width: 70px;
margin-top: 12px;
border: 2px solid #e67e22;
border-radius: 6px;
padding: 8px;
text-align: center;
font-size: 16px;
outline: none;
transition: border-color 0.3s;
}
.menu-item input:focus, .crafting-item input:focus {
border-color: #d35400;
}
.menu-item button, .crafting-item button {
margin-top: 12px;
padding: 10px 20px;
border: none;
border-radius: 8px;
background: linear-gradient(145deg, #e67e22, #d35400); /* Gradient button */
color: #ffffff;
cursor: pointer;
font-size: 16px;
transition: background 0.3s, transform 0.3s;
}
.menu-item button:hover, .crafting-item button:hover {
background: #d35400;
transform: scale(1.05);
}
.menu-item:hover, .crafting-item:hover {
transform: scale(1.05);
box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}
#notification-container {
position: fixed;
top: 30px;
left: 50%;
transform: translateX(-50%);
display: flex;
flex-direction: column;
gap: 12px;
align-items: center;
z-index: 1000;
}
.notification {
padding: 16px 30px;
border-radius: 10px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
font-size: 16px;
animation: fadeInOut 4s forwards;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
}
.notification.success {
background: #27ae60; /* Success green */
}
.notification.error {
background: #c0392b; /* Error red */
}
@keyframes fadeInOut {
0% { opacity: 0; }
10% { opacity: 1; }
90% { opacity: 1; }
100% { opacity: 0; }
}
.spinner {
width: 60px;
height: 60px;
border: 6px solid rgba(224, 224, 224, 0.3); /* Light grey */
border-radius: 50%;
border-top-color: #e67e22; /* BBQ accent color */
animation: spin 1s ease-in-out infinite;
margin: 25px auto;
position: relative;
}
.spinner-icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 24px;
color: #e67e22;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
#info-container {
display: flex;
flex-direction: column;
width: 95%;
max-width: 1400px;
background: #ffebcd;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1000;
}
#info-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
background: linear-gradient(90deg, #d35400, #f39c12);
color: #ffffff;
border-bottom: 2px solid rgba(0, 0, 0, 0.1);
box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}
#info-header .header-logo {
height: 200px; /* Enlarged main logo */
margin: 0 auto;
}
#close-info-button {
background: none;
border: none;
color: #e67e22;
font-size: 28px;
cursor: pointer;
transition: color 0.3s;
}
#close-info-button:hover {
color: #d35400;
}
#info-content {
padding: 25px;
color: #4b2e1f;
}
.themed-button {
margin: 20px auto;
padding: 14px 24px;
border: none;
border-radius: 8px;
background: linear-gradient(145deg, #e67e22, #d35400);
color: #ffffff;
cursor: pointer;
font-size: 18px;
transition: background 0.3s, transform 0.3s;
display: block;
text-align: center;
}
.themed-button:hover {
background: #d35400;
transform: scale(1.05);
}
.required-items {
font-family: 'Open Sans', sans-serif;
background: #ffffff;
padding: 10px;
border-radius: 8px;
margin-top: 10px;
width: 90%;
text-align: center;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
color: #4b2e1f;
}
.required-items div {
margin: 5px 0;
font-weight: 700;
font-size: 16px;
}

View file

@ -1,306 +0,0 @@
if Config.Framework ~= 'esx' then
return
end
ESX = exports['es_extended']:getSharedObject()
function GetPlayerData()
return ESX.GetPlayerData()
end
function TriggerServerCallback(name, cb, ...)
ESX.TriggerServerCallback(name, cb, ...)
end
local playerLoaded = ESX.IsPlayerLoaded()
function IsPlayerLoaded()
return playerLoaded
end
RegisterNetEvent('esx:playerLoaded', function(xPlayer)
PlayerData = xPlayer
LocalPlayer.state:set('inv_busy', false, true)
Wait(1250)
for k, data in pairs(Config.WeaponRepairPoints) do
Config.WeaponRepairPoints[k].IsRepairing = data.IsRepairing
Config.WeaponRepairPoints[k].RepairingData = data.RepairingData
end
if Config.Crafting then
CreateBlips()
end
Wait(5000)
playerLoaded = true
end)
RegisterNetEvent('esx:onPlayerLogout')
AddEventHandler('esx:onPlayerLogout', function()
PlayerData = {}
LocalPlayer.state:set('inv_busy', true, true)
RemoveAllNearbyDrops()
for k in pairs(Config.WeaponRepairPoints) do
Config.WeaponRepairPoints[k].IsRepairing = false
Config.WeaponRepairPoints[k].RepairingData = {}
end
TriggerServerEvent('inventory:handleLogout')
end)
RegisterNetEvent('esx:setJob', function()
PlayerData = GetPlayerData()
if Config.Crafting then
CreateBlips()
end
end)
AddEventHandler('esx_status:onTick', function(status)
TriggerEvent('esx_status:getStatus', 'hunger', function(status)
hunger = status.val / 10000
end)
TriggerEvent('esx_status:getStatus', 'thirst', function(status)
thirst = status.val / 10000
end)
end)
function GetPlayerIdentifier()
return GetPlayerData().identifier
end
function GetPlayersInArea()
local playerPed = PlayerPedId()
return ESX.Game.GetPlayersInArea(GetEntityCoords(playerPed), 3.0)
end
function GetJobName()
return GetPlayerData()?.job?.name
end
function GetJobGrade()
return GetPlayerData().job.grade
end
function GetGang()
return false
end
function GetGangLevel()
return false
end
function SendTextMessage(msg, type)
if GetResourceState('qs-interface') == 'started' then
if type == 'inform' then
exports['qs-interface']:AddNotify(msg, 'Inform', 2500, 'fa-solid fa-file')
elseif type == 'error' then
exports['qs-interface']:AddNotify(msg, 'Error', 2500, 'fas fa-bug')
elseif type == 'success' then
exports['qs-interface']:AddNotify(msg, 'Success', 2500, 'fas fa-thumbs-up')
end
return
end
if type == 'inform' then
lib.notify({
title = 'Inventory',
description = msg,
type = 'inform'
})
elseif type == 'error' then
lib.notify({
title = 'Inventory',
description = msg,
type = 'error'
})
elseif type == 'success' then
lib.notify({
title = 'Inventory',
description = msg,
type = 'success'
})
end
end
function ShowHelpNotification(msg)
AddTextEntry('helpNotification', msg)
BeginTextCommandDisplayHelp('helpNotification')
EndTextCommandDisplayHelp(0, true, true, -1)
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)
Debug('Deleted text', 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
function DrawText3Ds(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 = string.len(text) / 370
DrawRect(0.0, 0.0125, 0.017 + factor, 0.03, 0, 0, 0, 75)
ClearDrawOrigin()
end
function ToggleHud(bool)
if bool then
Debug('Event to show the hud [client/custom/framework/esx.lua line 174]')
DisplayRadar(true) -- You can enable or disable mini-map here
if GetResourceState('qs-interface') == 'started' then
exports['qs-interface']:ToggleHud(true)
end
else
Debug('Event to hide the hud [client/custom/framework/esx.lua line 174]')
DisplayRadar(false) -- You can enable or disable mini-map here
if GetResourceState('qs-interface') == 'started' then
exports['qs-interface']:ToggleHud(false)
end
end
end
function ProgressBar(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop, propTwo, onFinish, onCancel)
if GetResourceState('qs-interface') == 'started' then
local success = exports['qs-interface']:ProgressBar({
duration = duration,
label = label,
position = 'bottom',
useWhileDead = useWhileDead,
canCancel = canCancel,
disable = disableControls,
anim = {
dict = animation.animDict,
clip = animation.anim,
flag = animation?.flags
},
prop = prop
})
if success then
onFinish()
else
onCancel()
end
return
end
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
function ProgressBarSync(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop)
if GetResourceState('qs-interface') == 'started' then
return exports['qs-interface']:ProgressBar({
duration = duration,
label = label,
useWhileDead = useWhileDead,
canCancel = canCancel,
disable = disableControls,
anim = animation,
prop = prop
})
end
return lib.progressBar({
duration = duration,
label = label,
useWhileDead = useWhileDead,
canCancel = canCancel,
disable = disableControls,
anim = animation,
prop = prop
})
end
function SetPlayerStatus(values)
for name, value in pairs(values) do
if value > 0 then
TriggerEvent('esx_status:add', name, value)
else
TriggerEvent('esx_status:remove', name, -value)
end
end
end
function DropMarker(coords)
DrawMarker(20, coords.x, coords.y, coords.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)
end
function IsPlayerDead()
local check = false
local ped = PlayerPedId()
local wasabiHas = GetResourceState('wasabi_ambulance') == 'started'
local inLastStand = LocalPlayer.state.dead
if wasabiHas and inLastStand then
return check
end
if GetEntityHealth(ped) >= 1 then
check = true
end
return check
end
function checkEntityDead(id, entity)
local check = false
if GetEntityHealth(entity) <= 1 then
check = true
end
return check
end
function reputationCrafing(rep)
--- @param rep Name of reputation
return 99999
end
RegisterNetEvent('qs-inventory:client:updateItem', function(item, data)
if not ItemList[item] then
return
end
ItemList[item] = data
end)

View file

@ -1,284 +0,0 @@
if Config.Framework ~= 'qb' then
return
end
QBCore = exports['qb-core']:GetCoreObject()
if not Config.QBX then
WeaponList = QBCore.Shared.Weapons
ItemList = QBCore.Shared.Items
end
local playerLoaded = LocalPlayer.state['isLoggedIn']
function IsPlayerLoaded()
return playerLoaded
end
function GetPlayerData()
return QBCore.Functions.GetPlayerData()
end
function TriggerServerCallback(name, cb, ...)
QBCore.Functions.TriggerCallback(name, cb, ...)
end
RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function()
PlayerData = GetPlayerData()
LocalPlayer.state:set('inv_busy', false, true)
Wait(1250)
for k, data in pairs(Config.WeaponRepairPoints) do
Config.WeaponRepairPoints[k].IsRepairing = data.IsRepairing
Config.WeaponRepairPoints[k].RepairingData = data.RepairingData
end
if Config.Crafting then
CreateBlips()
end
TriggerServerEvent(Config.InventoryPrefix .. ':server:OnLoadUpdateCash')
Wait(5000)
playerLoaded = true
end)
RegisterNetEvent('QBCore:Client:OnPlayerUnload', function()
PlayerData = {}
LocalPlayer.state:set('inv_busy', true, true)
RemoveAllNearbyDrops()
for k in pairs(Config.WeaponRepairPoints) do
Config.WeaponRepairPoints[k].IsRepairing = false
Config.WeaponRepairPoints[k].RepairingData = {}
end
TriggerServerEvent('inventory:handleLogout')
end)
RegisterNetEvent('QBCore:Player:SetPlayerData', function(val)
PlayerData = val
if Config.Crafting then
CreateBlips()
end
end)
function GetPlayerIdentifier()
return GetPlayerData().citizenid
end
function GetPlayersInArea()
local playerPed = PlayerPedId()
return QBCore.Functions.GetPlayersFromCoords(GetEntityCoords(playerPed), 3.0)
end
function GetJobName()
return GetPlayerData()?.job?.name
end
function GetJobGrade()
return GetPlayerData().job.grade
end
function GetGang()
return false
end
function GetGangLevel()
return false
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)
AddTextEntry('helpNotification', msg)
BeginTextCommandDisplayHelp('helpNotification')
EndTextCommandDisplayHelp(0, true, true, -1)
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)
Debug('Deleted text', 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
function DrawText3Ds(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 = string.len(text) / 370
DrawRect(0.0, 0.0125, 0.017 + factor, 0.03, 0, 0, 0, 75)
ClearDrawOrigin()
end
function ToggleHud(bool)
if bool then
Debug('Event to show the hud [client/custom/framework/esx.lua line 174]')
DisplayRadar(true) -- You can enable or disable mini-map here
if GetResourceState('qs-interface') == 'started' then
exports['qs-interface']:ToggleHud(true)
end
else
Debug('Event to hide the hud [client/custom/framework/esx.lua line 174]')
DisplayRadar(false) -- You can enable or disable mini-map here
if GetResourceState('qs-interface') == 'started' then
exports['qs-interface']:ToggleHud(false)
end
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?.flag
},
prop = prop
}) then
onFinish()
else
onCancel()
end
end
function ProgressBarSync(name, label, duration, useWhileDead, canCancel, disableControls, animation, prop)
if GetResourceState('qs-interface') == 'started' then
return exports['qs-interface']:ProgressBar({
duration = duration,
label = label,
position = 'bottom',
useWhileDead = useWhileDead,
canCancel = canCancel,
disable = disableControls,
anim = {
dict = animation.animDict,
clip = animation.anim,
flag = animation?.flags
},
prop = prop
})
end
return lib.progressBar({
duration = duration,
label = label,
useWhileDead = useWhileDead,
canCancel = canCancel,
disable = disableControls,
anim = animation,
prop = prop
})
end
function DropMarker(coords)
DrawMarker(20, coords.x, coords.y, coords.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.3, 0.15, 120, 10, 20, 155, false, false, false, 1, false, false, false)
end
function SetPlayerStatus(values)
for name, value in pairs(values) do
-- compatibility for ESX style values
if value > 100 or value < -100 then
value = value * 0.0001
end
if name == 'hunger' then
TriggerServerEvent('consumables:server:addHunger', QBCore.Functions.GetPlayerData().metadata.hunger + value)
elseif name == 'thirst' then
TriggerServerEvent('consumables:server:addThirst', QBCore.Functions.GetPlayerData().metadata.thirst + value)
elseif name == 'stress' then
if value > 0 then
TriggerServerEvent('hud:server:GainStress', value)
else
value = math.abs(value)
TriggerServerEvent('hud:server:RelieveStress', value)
end
end
end
end
function IsPlayerDead()
local check = false
local data = GetPlayerData()
if not data.metadata['isdead'] and not data.metadata['inlaststand'] and not data.metadata['ishandcuffed'] and not IsPauseMenuActive() then
check = true
end
return check
end
function checkEntityDead(id, entity)
local isDead = false
TriggerServerCallback(Config.InventoryPrefix .. ':server:checkDead', function(result)
isDead = result
end, id)
repeat Wait(250) until isDead ~= nil
return isDead
end
function reputationCrafing(rep)
local PlayerData = QBCore.Functions.GetPlayerData()
if not PlayerData then return 0 end
local reputation = PlayerData.metadata[rep] or 0
if reputation == nil then
reputation = 0
end
return reputation
end

View file

@ -1,68 +0,0 @@
RegisterNetEvent(Config.InventoryPrefix .. ':client:CraftItems', function(itemName, itemCosts, points, amount, toSlot, rep, time, chance)
local ped = PlayerPedId()
local itemData = ItemList[itemName:lower()]
local randomNum = math.random(1, 100)
SendNUIMessage({
action = 'close',
})
inInventory = false
if itemData['type'] == 'weapon' and tonumber(amount) > 1 then
return SendTextMessage(Lang('INVENTORY_NOTIFICATION_CRAFTING_WEAPONS'), 'error')
end
if chance then
Debug('Crafting started with a chance of ' .. randomNum .. '% and you had ' .. chance .. '%')
else
chance = 100
Debug('There is no chance option in your configuration or in this item, and the crafting chance is set to 100%')
end
isCrafting = true
ProgressBar('crafting_item', Lang('INVENTORY_PROGRESS_CRAFTING'), (time * amount), false, false, {
move = true,
car = true,
mouse = false,
combat = true,
}, {
animDict = 'mini@repair',
anim = 'fixing_a_player',
flags = 1,
}, {}, {}, function()
if randomNum <= chance then
Debug('Crafting successful with ' .. randomNum .. '% chance and you had ' .. chance .. '%')
itemData.count = tonumber(amount)
StopAnimTask(ped, 'mini@repair', 'fixing_a_player', 1.0)
else
Debug('Crafting failed with ' .. randomNum .. '% chance and you had ' .. chance .. '%')
StopAnimTask(ped, 'mini@repair', 'fixing_a_player', 1.0)
SendTextMessage(Lang('INVENTORY_NOTIFICATION_CRAFTING_FAILED'), 'inform')
Wait(550)
TaskPlayAnim(ped, 'gestures@m@standing@casual', 'gesture_damn', 8.0, -8.0, -1, 1, 0, false, false, false)
Wait(1250)
StopAnimTask(ped, 'gestures@m@standing@casual', 'gesture_damn', 1.0)
end
TriggerServerEvent(Config.InventoryPrefix .. ':server:CraftItems', itemName, itemCosts, points, amount, toSlot, rep, randomNum, chance)
isCrafting = false
end, function()
StopAnimTask(ped, 'mini@repair', 'fixing_a_player', 1.0)
isCrafting = false
end)
TriggerScreenblurFadeOut(300)
if Config.Clothing then DeletePedScreen() end
end)
-- RegisterCommand('tt', function(source, args)
-- ProgressBar('crafting_item', Lang('INVENTORY_PROGRESS_CRAFTING'), (1000), false, false, {
-- move = true,
-- car = true,
-- mouse = false,
-- combat = true,
-- }, {
-- animDict = 'mini@repair',
-- anim = 'fixing_a_player',
-- flags = 1,
-- }, {}, {}, function()
-- end, function()
-- end)
-- end, false)

View file

@ -1,10 +0,0 @@
--[[
We recommend not modifying anything on this side, the Starter Items
are all in your server/custom/framework/esx.lua, it won't work in
qb-core since that framework has its native ones that do it automatically.
]]
AddEventHandler(Config.InventoryPrefix .. ':client:GiveStarterItems', function()
local id = PlayerId()
TriggerServerEvent(Config.InventoryPrefix .. ':server:GiveStarterItems', id)
end)

View file

@ -1,105 +0,0 @@
local checkDistanceInventories = {
'shop',
'stash',
'crafting',
'attachment_crafting',
'traphouse',
'customcrafting'
}
RegisterNetEvent(Config.InventoryPrefix .. ':client:OpenInventory', function(PlayerAmmo, inventory, other, otherName)
if not inventory then return Error('Inventory is not working, clear the inventory column [sql] to continue.') end
inventory = FormatItemsToInfo(inventory)
ToggleHud(false)
ToggleHotbar(false)
SetFocus(true)
IdleCamera(true)
SetPedCanPlayAmbientAnims(PlayerPedId(), false)
SetResourceKvp('idleCam', 'off')
if other then
currentOtherInventory = other.name
end
OpenedInventoryCoords = GetEntityCoords(PlayerPedId())
TriggerServerCallback(Config.InventoryPrefix .. ':server:QualityDecay', function(data)
local hungerValue = hunger
local thirstValue = thirst
if Config.Framework == 'qb' then
local data = GetPlayerData()
hungerValue = data.metadata and data.metadata.hunger
thirstValue = data.metadata and data.metadata.thirst
end
local PlayerSlots = Config.InventoryWeight.slots
if not Config.BlockedSlot then
PlayerSlots = Config.InventoryWeight.slots - 1
end
inventory = data.inventory
other = data.other
data = GetPlayerData()
if Config.Framework == 'esx' then
firstName = data.firstName or ''
lastName = data.lastName or ''
for i = 1, #data.accounts do
if data.accounts[i].name == 'money' then
money = data.accounts[i].money or 'Not found'
elseif data.accounts[i].name == 'bank' then
bank = data.accounts[i].money or 'Not found'
elseif data.accounts[i].name == 'black_money' then
blackmoney = data.accounts[i].money or 'Not found'
end
end
elseif Config.Framework == 'qb' then
firstName = data.charinfo.firstname or ''
lastName = data.charinfo.lastname or ''
money = data.money.cash or 'Not found'
bank = data.money.bank or 'Not found'
blackmoney = data.money.crypto or 'Not found'
end
SendNUIMessage({
action = 'open',
inventory = inventory,
slots = PlayerSlots,
other = other,
maxweight = Config.InventoryWeight.weight,
Ammo = PlayerAmmo,
playerName = firstName .. ' ' .. lastName,
logo = Config.Logo,
openAnimation = Config.OpenInventoryScene,
optionClothes = Config.InventoryOptions.clothes,
optionConfiguration = Config.InventoryOptions.configuration,
optionHealth = Config.InventoryOptions.health,
optionArmor = Config.InventoryOptions.armor,
optionHunger = Config.InventoryOptions.hunger,
optionThirst = Config.InventoryOptions.thirst,
optionId = Config.InventoryOptions.id,
optionMoney = Config.InventoryOptions.money,
optionBank = Config.InventoryOptions.bank,
optionBlackMoney = Config.InventoryOptions.blackmoney,
playerhp = GetEntityHealth(PlayerPedId()),
playerarmor = GetPedArmour(PlayerPedId()),
playerhunger = hungerValue or 0,
playerthirst = thirstValue or 0,
playerId = GetPlayerServerId(PlayerId()),
playerMoney = money,
playerBank = bank,
playerBlackMoney = blackmoney,
notStolenItems = Config.notStolenItems,
notStoredItems = Config.notStoredItems,
labelChanger = Config.LabelChange
})
inInventory = true
if table.includes(checkDistanceInventories, otherName) then
CheckNearbyOtherInventory()
end
end, inventory, other)
if not Config.Handsup then return end
checkPlayerRobbery(other)
end)

View file

@ -1,48 +0,0 @@
if not Config.UseTarget then
local nearby = false
CreateThread(function()
while true do
local sleep = 1000
if nearby then
DrawText3D(Config.SellItems[nearby].coords.x, Config.SellItems[nearby].coords.y, Config.SellItems[nearby].coords.z, Lang('INVENTORY_TEXT_SELLING'), 'selling', 'E')
sleep = 1
if IsControlJustPressed(0, 38) then
local PawnshopItems = {}
PawnshopItems.label = nearby
PawnshopItems.items = Config.SellItems[nearby].items
PawnshopItems.slots = #Config.SellItems[nearby].items
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'selling', 'itemselling_' .. nearby, PawnshopItems)
end
end
Wait(sleep)
end
end)
CreateThread(function()
for k, v in pairs(Config.SellItems) do
if v.blip and v.blip.active then
local ff = v.blip
local blip = AddBlipForCoord(v.coords)
SetBlipSprite(blip, ff.sprite)
SetBlipColour(blip, ff.color)
SetBlipScale(blip, ff.scale)
BeginTextCommandSetBlipName('STRING')
AddTextComponentString(ff.name)
EndTextCommandSetBlipName(blip)
SetBlipAsShortRange(blip, true)
end
end
end)
CreateThread(function()
while true do
local playercoords = GetEntityCoords(PlayerPedId())
local finded = false
for k, v in pairs(Config.SellItems) do
if #(playercoords - v.coords) <= 2 then finded = k end
end
nearby = finded
Wait(700)
end
end)
end

View file

@ -1,72 +0,0 @@
RegisterNetEvent(Config.InventoryPrefix .. ':client:UseWeapon', function(weaponData, shootbool)
if FiringWeapon then
SendTextMessage(Lang('INVENTORY_NOTIFICATION_STOP_FIRING'), 'error')
return false
end
local ped = PlayerPedId()
local weaponName = tostring(weaponData.name)
local weaponHash = joaat(weaponData.name)
for i = 1, #Config.WeaponTints do
if tostring(GetHashKey(weaponName)) == Config.WeaponTints[i].hash then
AddReplaceTexture(Config.WeaponTints[i].ytd, Config.WeaponTints[i].texture, Config.WeaponTints[i].ytd, Config.WeaponTints[i].texture)
break
end
end
if currentWeapon == weaponName then
TriggerEvent('weapons:client:DrawWeapon', nil)
SetCurrentPedWeapon(ped, `WEAPON_UNARMED`, true)
RemoveAllPedWeapons(ped, true)
TriggerEvent('weapons:client:SetCurrentWeapon', nil, shootbool)
currentWeapon = nil
elseif weaponName == 'weapon_stickybomb' or weaponName == 'weapon_pipebomb' or weaponName == 'weapon_smokegrenade' or weaponName == 'weapon_flare' or weaponName == 'weapon_proxmine' or weaponName == 'weapon_ball' or weaponName == 'weapon_molotov' or weaponName == 'weapon_grenade' or weaponName == 'weapon_bzgas' then
TriggerEvent('weapons:client:DrawWeapon', weaponName)
GiveWeaponToPed(ped, weaponHash, 1, false, false)
SetPedAmmo(ped, weaponHash, 1)
SetCurrentPedWeapon(ped, weaponHash, true)
TriggerEvent('weapons:client:SetCurrentWeapon', weaponData, shootbool)
TriggerServerEvent(Config.InventoryPrefix .. ':server:RemoveItem', weaponName, 1)
currentWeapon = weaponName
elseif weaponName == 'weapon_snowball' then
TriggerEvent('weapons:client:DrawWeapon', weaponName)
GiveWeaponToPed(ped, weaponHash, 10, false, false)
SetPedAmmo(ped, weaponHash, 10)
SetCurrentPedWeapon(ped, weaponHash, true)
TriggerServerEvent(Config.InventoryPrefix .. ':server:snowball', 'remove')
TriggerEvent('weapons:client:SetCurrentWeapon', weaponData, shootbool)
currentWeapon = weaponName
elseif weaponName == 'weapon_petrolcan' then
GiveWeaponToPed(ped, weaponHash, 10, false, false)
SetPedAmmo(ped, weaponHash, weaponData.info.ammo or 4500)
SetCurrentPedWeapon(ped, weaponHash, true)
TriggerEvent('weapons:client:SetCurrentWeapon', weaponData, shootbool)
currentWeapon = weaponName
else
TriggerEvent('weapons:client:DrawWeapon', weaponName)
TriggerEvent('weapons:client:SetCurrentWeapon', weaponData, shootbool)
local ammo = tonumber(weaponData.info.ammo) or 0
if weaponName == 'weapon_petrolcan' or weaponName == 'weapon_fireextinguisher' then
ammo = 4000
end
GiveWeaponToPed(ped, weaponHash, ammo, false, false)
SetPedAmmo(ped, weaponHash, ammo)
SetCurrentPedWeapon(ped, weaponHash, true)
if weaponData.info.attachments then
for _, attachment in pairs(weaponData.info.attachments) do
if attachment.tint then
if attachment.urltint ~= 'none' then
ChangeWeaponTintWithUrl(weaponHash, attachment.urltint)
else
SetPedWeaponTintIndex(ped, weaponHash, attachment.tint)
end
else
GiveWeaponComponentToPed(ped, weaponHash, joaat(attachment.component))
end
end
end
currentWeapon = weaponName
end
end)

View file

@ -1,212 +0,0 @@
RegisterNetEvent(Config.InventoryPrefix .. ':client:openVending')
AddEventHandler(Config.InventoryPrefix .. ':client:openVending', function(Data)
local Category = Data['category']
local ShopItems = {}
ShopItems['label'] = Config.VendingMachines[Category]['Label']
ShopItems['items'] = Config.VendingMachines[Category]['Items']
ShopItems['slots'] = #Config.VendingMachines[Category]['Items']
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'shop', Config.VendingMachines[Category]['Label'] .. '_' .. math.random(1, 99), ShopItems)
end)
local spamCount = 0
local lastSpamId = nil
local inventory_opening_anim = {
-- dict = 'mp_player_inteat@burger',
-- clip = 'mp_player_int_eat_burger_fp'
}
local inventory_opening_disable = {
move = true,
car = true,
mouse = true,
combat = true
}
local openingInv = false
RegisterCommand('inventory', function()
if inInventory then
return Debug('Inventory is already open')
end
if Config.OpenProgressBar and openingInv then return end
if IsNuiFocused() then return Debug('NUI Focused') end
if spamCount > 2 then
SendTextMessage(Lang('INVENTORY_NOTIFICATION_SPAM'), 'error')
return
end
spamCount = spamCount + 1
lastSpamId = math.random(1, 999999)
local spamId = lastSpamId
SetTimeout(1000, function()
if spamId == lastSpamId then
spamCount = 0
end
end)
if LocalPlayer.state.inv_busy or not IsPlayerDead() then
Warning("You can't use this action because inv_busy is active (avoids dupes)")
return SendTextMessage(Lang('INVENTORY_NOTIFICATION_NOT_ACCESSIBLE'), 'error')
end
if Config.OpenProgressBar then
openingInv = true
local success = ProgressBarSync('inventory', 'Inventory opening', 800, true, true, inventory_opening_disable, inventory_opening_anim)
openingInv = false
if not success then
print('failed')
return
end
end
if inInventory and not IsNuiFocused() then
SetFocus(true)
return
end
if not isCrafting and not inInventory and not inventoryDisabled then
if not IsPauseMenuActive() then
local ped = PlayerPedId()
local curVeh = nil
local VendingMachine = nil
local garbage = nil
local CurrentGarbage = {}
local entity, entityModel, data = GetNearbyGarbage()
if entity then
local x, y, z = table.unpack(GetEntityCoords(entity))
local _, floorZ = GetGroundZFor_3dCoord(x, y, z, false)
garbage = getOwnerFromCoordsForGarbage(vector3(x, y, floorZ))
CurrentGarbage.label = data.label
CurrentGarbage.items = data.items
CurrentGarbage.slots = data.slots
end
if not Config.UseTarget then
VendingMachine = GetClosestVending()
end
if IsPedInAnyVehicle(ped, false) then -- Is Player In Vehicle
local vehicle = GetVehiclePedIsIn(ped, false)
CurrentGlovebox = Trim(GetVehicleNumberPlateText(vehicle))
curVeh = vehicle
CurrentVehicle = nil
else
local vehicle = getClosestVehicle()
if vehicle ~= 0 and vehicle ~= nil then
local pos = GetEntityCoords(ped)
local dimensionMin, dimensionMax = GetModelDimensions(GetEntityModel(vehicle))
local trunkpos = GetOffsetFromEntityInWorldCoords(vehicle, 0.0, (dimensionMin.y), 0.0)
if (IsBackEngine(GetEntityModel(vehicle))) then
trunkpos = GetOffsetFromEntityInWorldCoords(vehicle, 0.0, (dimensionMax.y), 0.0)
end
if #(pos - trunkpos) < 1.5 and not IsPedInAnyVehicle(ped) then
if GetVehicleDoorLockStatus(vehicle) < 2 then
CurrentVehicle = Trim(GetVehicleNumberPlateText(vehicle))
curVeh = vehicle
CurrentGlovebox = nil
else
SendTextMessage(Lang('INVENTORY_NOTIFICATION_VEHICLE_LOCKED'), 'error')
return
end
else
CurrentVehicle = nil
end
else
CurrentVehicle = nil
end
end
if CurrentVehicle then -- Trunk
local vehicleClass = GetVehicleClass(curVeh)
Debug('Current vehicleClass of the vehicle that is being unlocked:', vehicleClass)
local maxweight = Config.VehicleClass[vehicleClass].trunk.maxweight or 60000
local slots = Config.VehicleClass[vehicleClass].trunk.slots or 35
local isCustomVehicle = Config.CustomTrunk[GetEntityModel(curVeh)]
if isCustomVehicle then
maxweight = isCustomVehicle.maxweight
slots = isCustomVehicle.slots
end
local other = {
maxweight = maxweight,
slots = slots,
}
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'trunk', CurrentVehicle, other)
OpenTrunk()
elseif CurrentGlovebox then
local vehicleClass = GetVehicleClass(curVeh)
Debug('Current vehicleClass of the vehicle that is being unlocked:', vehicleClass)
local maxweight = Config.VehicleClass[vehicleClass].glovebox.maxweight or 60000
local slots = Config.VehicleClass[vehicleClass].glovebox.slots or 35
local isCustomVehicle = Config.CustomGlovebox[GetEntityModel(curVeh)]
if isCustomVehicle then
maxweight = isCustomVehicle.maxweight
slots = isCustomVehicle.slots
end
local other = {
maxweight = maxweight,
slots = slots
}
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'glovebox', CurrentGlovebox, other)
elseif CurrentDrop ~= 0 then
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'drop', CurrentDrop)
elseif garbage then
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'garbage', garbage, CurrentGarbage, entityModel)
OpenGarbage()
elseif VendingMachine then
local vendingCategory = nil
local vendingModel = GetEntityModel(VendingMachine)
for _, vendingData in pairs(Config.Vendings) do
local vendingDataModel = GetHashKey(vendingData.Model)
if vendingDataModel == vendingModel then
vendingCategory = vendingData.Category
break
end
end
if vendingCategory then
TriggerEvent(Config.InventoryPrefix .. ':client:openVending', { category = vendingCategory })
end
else
OpenAnim()
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory')
end
end
end
end, false)
RegisterKeyMapping('inventory', Lang('INVENTORY_KEYMAPPING_OPEN_LABEL'), 'keyboard', Config.KeyBinds.inventory)
RegisterNetEvent(Config.InventoryPrefix .. ':client:OpenPlayerInventory')
AddEventHandler(Config.InventoryPrefix .. ':client:OpenPlayerInventory', function()
ExecuteCommand('inventory')
end)
RegisterCommand('hotbar', function()
if inventoryDisabled then return end
if IsNuiFocused() then return end
if LocalPlayer.state.inv_busy or not IsPlayerDead() then
Warning("You can't use this action because inv_busy is active (avoids dupes)")
return SendTextMessage(Lang('INVENTORY_NOTIFICATION_NOT_ACCESSIBLE'), 'error')
end
isHotbar = not isHotbar
if not IsPauseMenuActive() then
ToggleHotbar(isHotbar)
end
end, false)
RegisterKeyMapping('hotbar', Lang('INVENTORY_KEYMAPPING_HOTBAR_LABEL'), 'keyboard', Config.KeyBinds.hotbar)
RegisterKeyMapping('reloadweapon', Lang('INVENTORY_KEYMAPPING_RELOAD_LABEL'), 'keyboard', Config.KeyBinds.reload)
RegisterCommand('reloadweapon', function()
if not CurrentWeaponData?.name then return end
local weaponData = WeaponList[joaat(CurrentWeaponData?.name)]
if not weaponData then return end
if LocalPlayer.state.inv_busy or not IsPlayerDead() then
Debug("You can't use this action because inv_busy is active (avoids dupes)")
return SendTextMessage(Lang('INVENTORY_NOTIFICATION_NOT_ACCESSIBLE'), 'error')
end
TriggerServerEvent('weapons:reloadWeapon', weaponData.ammotype)
end, false)

View file

@ -1,41 +0,0 @@
if not GetResourceState('jobs_creator') == 'missing' then
return
end
Warning('Started the compatibility module with jobs_creator')
CreateThread(function()
local other = {}
other.maxweight = 100000 -- Custom weight stash.
other.slots = 50 -- Custom slots spaces.
RegisterNetEvent('jobs_creator:stash:openStash', function(markerId)
local stashId = 'job_stash_' .. markerId
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'stash', stashId, other)
TriggerEvent(Config.InventoryPrefix .. ':client:SetCurrentStash', stashId)
end)
RegisterNetEvent('jobs_creator:safe:openSafe', function(markerId)
local safeId = 'job_safe_' .. markerId
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'stash', safeId, other)
TriggerEvent(Config.InventoryPrefix .. ':client:SetCurrentStash', safeId)
end)
RegisterNetEvent('jobs_creator:armory:openArmory', function(markerId)
local armoryId = 'job_armory_' .. markerId
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'stash', armoryId, other)
TriggerEvent(Config.InventoryPrefix .. ':client:SetCurrentStash', armoryId)
end)
RegisterNetEvent('jobs_creator:framework:ready', function()
-- Disables the default script search (otherwise there would be 2 searches)
exports['jobs_creator']:disableScriptEvent('jobs_creator:actions:search:searchPlayer')
end)
RegisterNetEvent('jobs_creator:actions:search:searchPlayer', function(targetServerId)
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'otherplayer', targetServerId)
end)
end)

View file

@ -1,190 +0,0 @@
if not Config.Handsup then
return
end
local lib, anim = 'missminuteman_1ig_2', 'handsup_base'
local canHandsUp = true
local deadPlayer = false
local function LoadAnimDict(dict)
if HasAnimDictLoaded(dict) then return end
RequestAnimDict(dict)
while not HasAnimDictLoaded(dict) do
Wait(10)
end
end
RegisterKeyMapping('handsup', Lang('INVENTORY_KEYMAPPING_HANDSUP_LABEL'), 'keyboard', Config.KeyBinds.handsup)
RegisterCommand('handsup', function()
if not IsPedInAnyVehicle(PlayerPedId(), false) and GetEntityHealth(PlayerPedId()) > 1 then
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)
RegisterNetEvent(Config.InventoryPrefix .. ':client:RobPlayer')
AddEventHandler(Config.InventoryPrefix .. ':client:RobPlayer', function(TargetId)
local ped = PlayerPedId()
if IsPedArmed(ped, 1) or IsPedArmed(ped, 2) or IsPedArmed(ped, 4) or deadPlayer or Config.StealWithoutWeapons then
SendNUIMessage({
action = 'RobPlayer',
TargetId = TargetId,
})
end
deadPlayer = false
end)
local function checkPlayerIsNear(targetPlayer)
CreateThread(function()
while true do
Wait(100)
local targetPed = GetPlayerPed(targetPlayer)
if not DoesEntityExist(targetPed) or NetworkIsPlayerActive(targetPlayer) == false then
TriggerEvent(Config.InventoryPrefix .. ':client:closeinv')
SendTextMessage(Lang('INVENTORY_NOTIFICATION_ROBBERY_AWAY'), 'inform')
break
end
local playerCoords = GetEntityCoords(PlayerPedId())
local targetCoords = GetEntityCoords(targetPed)
local distance = #(playerCoords - targetCoords)
if distance > 5 then
Wait(500)
TriggerEvent(Config.InventoryPrefix .. ':client:closeinv')
SendTextMessage(Lang('INVENTORY_NOTIFICATION_ROBBERY_AWAY'), 'inform')
break
end
end
end)
end
RegisterNetEvent(Config.InventoryPrefix .. ':client:search', function()
local player, distance = GetClosestPlayer(GetEntityCoords(PlayerPedId()))
if player ~= -1 and distance < 2.5 then
local playerId = GetPlayerServerId(player)
local searchPlayerPed = GetPlayerPed(player)
if IsEntityPlayingAnim(searchPlayerPed, 'missminuteman_1ig_2', 'handsup_base', 3) or Config.StealDeadPlayer and checkEntityDead(playerId, searchPlayerPed) or GetEntityHealth(searchPlayerPed) <= 0 then
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'otherplayer', playerId)
checkPlayerIsNear(player)
inRobbery = true
else
SendTextMessage(Lang('INVENTORY_NOTIFICATION_NO_HANDSUP'), 'error')
end
else
SendTextMessage(Lang('INVENTORY_NOTIFICATION_NO_PLAYERS'), 'error')
end
end)
RegisterNetEvent(Config.InventoryPrefix .. ':client:playerRobbery')
AddEventHandler(Config.InventoryPrefix .. ':client:playerRobbery', function()
local player, distance = GetClosestPlayer(GetEntityCoords(PlayerPedId()))
if player ~= -1 and distance < 3.0 then
local searchPlayerPed = GetPlayerPed(player)
local playerId = GetPlayerServerId(player)
TriggerEvent(Config.InventoryPrefix .. ':client:forceCloseInventory')
Wait(500)
if checkEntityDead(playerId, searchPlayerPed) then
RequestAnimDict('amb@world_human_gardener_plant@male@base')
while not HasAnimDictLoaded('amb@world_human_gardener_plant@male@base') do
Wait(100)
end
TaskPlayAnim(PlayerPedId(), 'amb@world_human_gardener_plant@male@base', 'base', 8.0, -8, -1, 1, 0, 0, 0, 0)
ProgressBar('steal_playerdead', Lang('INVENTORY_PROGRESS_STEAL'), 5500, false, true, {
move = true,
car = true,
mouse = false,
combat = true,
}, {}, {}, {}, function() -- Done
TaskPlayAnim(PlayerPedId(), 'amb@world_human_gardener_plant@male@base', 'base', 8.0, -8, -1, 1, 0, 0, 0, 0)
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'otherplayer', playerId)
checkPlayerIsNear(player)
inRobbery = true
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
return
end
if DoesEntityExist(searchPlayerPed) and IsEntityPlayingAnim(searchPlayerPed, lib, anim, 3) and not checkEntityDead(playerId, searchPlayerPed) then
LoadAnimDict('combat@aim_variations@arrest')
TaskPlayAnim(PlayerPedId(), 'combat@aim_variations@arrest', 'cop_med_arrest_01', 8.0, -8, -1, 1, 0, 0, 0, 0)
ProgressBar('steal_player', Lang('INVENTORY_PROGRESS_STEAL'), 5500, false, true, {
move = true,
car = true,
mouse = false,
combat = true,
}, {}, {}, {}, function() -- Done
TaskPlayAnim(PlayerPedId(), 'combat@aim_variations@arrest', 'cop_med_arrest_01', 8.0, -8, -1, 1, 0, 0, 0, 0)
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'otherplayer', playerId)
SetPedConfigFlag(PlayerPedId(), 36, true)
checkPlayerIsNear(player)
inRobbery = true
end, function() -- Cancel
ClearPedTasks(PlayerPedId())
end)
else
SendTextMessage(Lang('INVENTORY_NOTIFICATION_NO_HANDSUP'), 'error')
end
end
end)
function checkPlayerRobbery(other)
if other and other.id then
local target = tonumber(other.id)
local playerTarget = GetPlayerFromServerId(target)
local pedTarget = GetPlayerPed(playerTarget)
if other ~= nil then
currentOtherInventory = other.name
end
if target and DoesEntityExist(pedTarget) then
local pos = GetEntityCoords(playerPed)
local targetPos = GetEntityCoords(pedTarget)
local distance = GetDistanceBetweenCoords(pos.x, pos.y, pos.z, targetPos.x, targetPos.y, targetPos.z, true)
if distance < 3.0 then
inInventory = true
deadPlayer = true
StealingPed = pedTarget
TriggerEvent(Config.InventoryPrefix .. ':client:RobPlayer', target)
end
end
else
local closestPlayer, closestDistance = GetClosestPlayer(GetEntityCoords(PlayerPedId()))
if closestPlayer and closestPlayer ~= -1 and closestDistance < 3.0 then
local playerId = GetPlayerServerId(closestPlayer)
local searchPlayerPed = GetPlayerPed(closestPlayer)
if searchPlayerPed and searchPlayerPed ~= 0 then
if Config.StealDeadPlayer and checkEntityDead(playerId, searchPlayerPed) then
inInventory = true
deadPlayer = true
StealingPed = searchPlayerPed
TriggerEvent(Config.InventoryPrefix .. ':client:RobPlayer', playerId)
end
if IsEntityPlayingAnim(searchPlayerPed, lib, anim, 3) then
inInventory = true
deadPlayer = false
StealingPed = searchPlayerPed
TriggerEvent(Config.InventoryPrefix .. ':client:RobPlayer', playerId)
end
end
end
end
end
RegisterNetEvent('inventory:robClosestPlayer', function()
checkPlayerRobbery()
end)

View file

@ -1,7 +0,0 @@
local function exportHandler(exportName, func)
AddEventHandler(('__cfx_export_qb-inventory_%s'):format(exportName), function(setCB)
setCB(func)
end)
end
exportHandler('HasItem', HasItem)

View file

@ -1,114 +0,0 @@
if not Config.UseTarget then
return
end
local target_name = GetResourceState('ox_target'):find('started') and 'qtarget' or 'qb-target'
CreateThread(function()
-- Selling
for k, v in pairs(Config.SellItems) do
exports[target_name]:AddBoxZone(k .. '_selling', vec3(v['coords'].x, v['coords'].y, v['coords'].z), 1.5, 1.5, {
name = k .. '_selling',
heading = 90.0,
debugPoly = Config.ZoneDebug,
minZ = v['coords'].z - 1,
maxZ = v['coords'].z + 1,
}, {
options = {
{
type = 'client',
icon = 'fa-solid fa-cash-register',
label = Lang('INVENTORY_TEXT_SELLING'),
canInteract = function(entity, distance, data)
return true
end,
action = function(entity)
local PawnshopItems = {}
PawnshopItems.label = k
PawnshopItems.items = v['items']
PawnshopItems.slots = #v['items']
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'selling', 'itemselling_' .. k, PawnshopItems)
end,
},
},
distance = 2.5
})
end
-- Crafting
if Config.Crafting then
for k, v in pairs(Config.CraftingTables) do
exports[target_name]:AddBoxZone(k .. '_crafting', vec3(v.location.x, v.location.y, v.location.z), 2.5, 2.5, {
name = k .. '_crafting',
heading = 90.0,
debugPoly = Config.ZoneDebug,
minZ = v.location.z - 1,
maxZ = v.location.z + 1,
}, {
options = {
{
type = 'client',
icon = 'fa-solid fa-hammer',
label = 'Crafting',
canInteract = function(entity, distance, data)
return true
end,
action = function(entity)
if isCrafting then return end
if v.isjob then
if IsPlayerAuthorized(v) then
CurrentCrafting = k
local crafting = {
label = v.name,
items = GeneralInfos(k)
}
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'crafting', math.random(1, 99), crafting)
end
else
CurrentCrafting = k
local crafting = {
label = v.name,
items = GeneralInfos(k)
}
TriggerServerEvent(Config.InventoryPrefix .. ':server:OpenInventory', 'crafting', math.random(1, 99), crafting)
end
end,
},
},
distance = 2.5
})
end
end
-- Vending shops
if Config.Vendings then
for k, v in pairs(Config.Vendings) do
exports[target_name]:AddTargetModel(v['Model'], {
options = {
{
icon = 'fa-solid fa-cash-register',
label = 'Vending',
action = function()
TriggerEvent(Config.InventoryPrefix .. ':client:openVending', { category = v['Category'] })
end
},
},
distance = 2.5
})
end
end
-- Gargabe Code
exports[target_name]:AddTargetModel(Config.GarbageObjects, {
options = {
{
icon = 'fa-solid fa-trash',
label = 'Open Garbage',
action = function()
ExecuteCommand('inventory')
end
},
},
distance = 1.0
})
end)

View file

@ -1,37 +0,0 @@
TriggerEvent('chat:addSuggestion', '/giveitem', 'Administrative command to give items to another player', {
{ name = 'id', help = 'Id of the player to whom the item will be delivered' },
{ name = 'item', help = 'Name of the item to deliver' },
{ name = 'amount', help = 'Quantity of the item, if it is a weapon it will be ammo' },
})
TriggerEvent('chat:addSuggestion', '/giveweapon', 'Administrative command to give weapons to another player', {
{ name = 'id', help = 'Id of the player to whom the weapon will be delivered' },
{ name = 'weapon', help = 'Name of the weapon to deliver' },
{ name = 'ammo', help = 'Amount of ammo for the weapon' },
})
TriggerEvent('chat:addSuggestion', '/resetinv', 'Administrative command to reset an inventory, it will not delete it', {
{ name = 'type', help = 'Type of inventory to reset, example: [stash], [trunk], [glovebox]' },
})
TriggerEvent('chat:addSuggestion', '/clearinv', 'Administrative command to remove all items of a certain player', {
{ name = 'id', help = 'Enter the id of the player whose inventory you want to empty' },
})
TriggerEvent('chat:addSuggestion', '/repairweapon', 'Administrative command to repair certain players weapons', {
{ name = 'id', help = 'Select the id of the player to repair his weapon' },
})
TriggerEvent('chat:addSuggestion', '/openinventorytarget', 'Administrative command to check the inventory of a target player', {
{ name = 'id', help = 'Select player id' },
})
TriggerEvent('chat:addSuggestion', '/inventory', 'Command to open the inventory, useful for keybinds', {})
TriggerEvent('chat:addSuggestion', '/hotbar', 'Command to open the hotbar inventory, useful for keybinds', {})
TriggerEvent('chat:addSuggestion', '/handsup', 'Command to raise your arms, useful for keybinds, if you have your arms raised they can steal you', {})
TriggerEvent('chat:addSuggestion', '/reloadweapon', 'Command to reload your weapon, useful for keybinds', {})
TriggerEvent('chat:addSuggestion', '/randomitems', 'Administrative command that delivers various random items to your inventory, helps with debugging', {})
TriggerEvent('chat:addSuggestion', '/searchplayer', 'Command to steal from a nearby player, although we recommend doing it with the NUI raising his hands', {})
TriggerEvent('chat:addSuggestion', '/rob', 'Exclusive qb command to steal players, used for police job frequently', {})
TriggerEvent('chat:addSuggestion', '/invitems', 'Example of code used for getInventory, it will return all the items in your inventory', {})
TriggerEvent('chat:addSuggestion', '/dataitem', 'Example command to give an item with customizable and automatic metadata', {})

View file

@ -1,414 +0,0 @@
local PlayerData = GetPlayerData()
local CanShoot, MultiplierAmount = true, 0
CurrentWeaponData = {}
exports('GetCurrentWeapon', function()
return CurrentWeaponData
end)
lib.callback.register('weapons:client:GetCurrentWeapon', function()
return CurrentWeaponData
end)
CreateThread(function()
while not Config.WeaponsOnVehicle do
Wait(250)
local playerPed = PlayerPedId()
if IsPedInAnyVehicle(playerPed, false) then
local playerVeh = GetVehiclePedIsIn(playerPed, false)
TriggerEvent('weapons:ResetHolster')
SetCurrentPedWeapon(playerPed, GetHashKey('WEAPON_UNARMED'), true)
RemoveAllPedWeapons(playerPed, true)
currentWeapon = nil
end
end
end)
RegisterNetEvent('weapons:client:SyncRepairShops', function(NewData, key)
Config.WeaponRepairPoints[key].IsRepairing = NewData.IsRepairing
Config.WeaponRepairPoints[key].RepairingData = NewData.RepairingData
end)
FiringWeapon = false
CreateThread(function()
while true do
local ped = PlayerPedId()
if IsPedArmed(ped, 7) == 1 and not inInventory then
if IsControlJustPressed(0, 24) or IsDisabledControlJustPressed(0, 24) then
FiringWeapon = true
elseif IsControlJustReleased(0, 24) or IsDisabledControlJustReleased(0, 24) and not inInventory then
FiringWeapon = false
end
end
Wait(0)
end
end)
CreateThread(function()
while true do
local ped = PlayerPedId()
local weapon = GetSelectedPedWeapon(ped)
if WeaponList[weapon] and WeaponList[weapon]['name'] == 'weapon_unarmed' and FiringWeapon then
FiringWeapon = false
end
Wait(500)
end
end)
---@return AttachmentItem?
local function componentIsTint(component)
local tints = GetConfigTints()
local attachment = table.find(tints, function(tint)
return tint.attachment == component
end)
return attachment
end
RegisterNetEvent('addAttachment', function(component, urltint)
local ped = PlayerPedId()
local weapon = GetSelectedPedWeapon(ped)
local WeaponData = WeaponList[weapon]
local tintData = componentIsTint(component)
if tintData then
if tintData.isUrlTint then
for i = 1, #Config.WeaponTints do
if tostring(weapon) == Config.WeaponTints[i].hash then
local txd = CreateRuntimeTxd(Config.WeaponTints[i].name)
local duiObj = CreateDui(urltint, 250, 250)
local dui = GetDuiHandle(duiObj)
CreateRuntimeTextureFromDuiHandle(txd, 'skin', dui)
while not IsDuiAvailable(duiObj) do Wait(150) end
AddReplaceTexture(Config.WeaponTints[i].ytd, Config.WeaponTints[i].texture, Config.WeaponTints[i].name, 'skin')
break
end
end
else
SetPedWeaponTintIndex(ped, weapon, tintData.tint)
end
return
end
GiveWeaponComponentToPed(ped, GetHashKey(WeaponData.name), GetHashKey(component))
end)
RegisterNetEvent('weapons:client:SetCurrentWeapon', function(data, bool)
if data ~= false then
CurrentWeaponData = data
else
CurrentWeaponData = {}
end
CanShoot = bool
end)
RegisterNetEvent('weapons:client:SetWeaponQuality', function(amount)
if CurrentWeaponData and next(CurrentWeaponData) then
TriggerServerEvent('weapons:server:SetWeaponQuality', CurrentWeaponData, amount)
TriggerEvent('weapons:client:SetCurrentWeapon', CurrentWeaponData, true)
end
end)
RegisterNetEvent('weapons:client:masterAmmo', function(amount, itemData)
local ped = PlayerPedId()
local weapon = GetSelectedPedWeapon(ped)
if CurrentWeaponData and WeaponList[weapon] and WeaponList[weapon]['name'] ~= 'weapon_unarmed' then
local weaponAmmoType = WeaponList[weapon]['ammotype']
if not weaponAmmoType then
SendTextMessage(Lang('INVENTORY_NOTIFICATION_NO_AMMO'), 'error')
return
end
TriggerEvent('weapons:client:AddAmmo', weaponAmmoType, amount, itemData, true)
else
SendTextMessage(Lang('INVENTORY_NOTIFICATION_NO_WEAPON'), 'error')
end
end)
lib.callback.register('weapons:addAmmo', function(itemData)
local ped = cache.ped
if IsPedReloading(ped) then
return
end
local weapon = GetSelectedPedWeapon(ped)
if not CurrentWeaponData or not WeaponList[weapon] or WeaponList[weapon]['name'] == 'weapon_unarmed' then
SendTextMessage(Lang('INVENTORY_NOTIFICATION_NO_WEAPON'), 'error')
return
end
local total = GetAmmoInPedWeapon(ped, weapon)
local retval = GetMaxAmmoInClip(ped, weapon, 1)
local _, ammoclip = GetAmmoInClip(ped, weapon)
local _, maxammo = GetMaxAmmo(ped, weapon)
if IsPedInAnyVehicle(ped, false) and Config.ForceToOnlyOneMagazine then
SendTextMessage(Lang('INVENTORY_NOTIFICATION_VEHICLE_ITEMS'), 'error')
return
end
if Config.ForceToOnlyOneMagazine and ammoclip > 0 then
SendTextMessage(Lang('INVENTORY_NOTIFICATION_MAGAZINE_LIMIT'), 'error')
return
end
if not retval then
return
end
retval = tonumber(retval)
if maxammo ~= total then
TriggerServerCallback('weapon:server:GetWeaponAmmo', function(ammo)
if ammo then
SetAmmoInClip(ped, weapon, 0)
AddAmmoToPed(ped, weapon, retval + ammoclip)
TriggerServerEvent('weapons:server:AddWeaponAmmo', CurrentWeaponData, total + retval)
--TriggerServerEvent("weapons:server:UpdateWeaponAmmo", CurrentWeaponData, total + retval)
TriggerServerEvent('weapons:server:removeWeaponAmmoItem', itemData)
end
end, CurrentWeaponData)
else
SendTextMessage(Lang('INVENTORY_NOTIFICATION_MAX_AMMO'), 'error')
end
end)
RegisterNetEvent('weapons:client:AddAmmo', function(ammoType, amount, itemData, masterAmmo)
local ped = PlayerPedId()
if IsPedReloading(ped) then
return -- SendTextMessage('Do not spam the reload', 'error')
end
local weapon = GetSelectedPedWeapon(ped)
if not CurrentWeaponData or not WeaponList[weapon] or WeaponList[weapon]['name'] == 'weapon_unarmed' then
SendTextMessage(Lang('INVENTORY_NOTIFICATION_NO_WEAPON'), 'error')
return
end
local weaponAmmoType = type(WeaponList[weapon]['ammotype']) == 'table' and WeaponList[weapon]['ammotype'] or { WeaponList[weapon]['ammotype'] }
if not table.includes(weaponAmmoType, ammoType:upper()) then
SendTextMessage(Lang('INVENTORY_NOTIFICATION_NO_AMMO'), 'error')
return
end
local total = GetAmmoInPedWeapon(ped, weapon)
local retval = GetMaxAmmoInClip(ped, weapon, 1)
local _, ammoclip = GetAmmoInClip(ped, weapon)
local _, maxammo = GetMaxAmmo(ped, weapon)
if IsPedInAnyVehicle(ped, false) and Config.ForceToOnlyOneMagazine then
SendTextMessage(Lang('INVENTORY_NOTIFICATION_VEHICLE_ITEMS'), 'error')
return
end
if Config.ForceToOnlyOneMagazine and ammoclip > 0 then
SendTextMessage(Lang('INVENTORY_NOTIFICATION_MAGAZINE_LIMIT'), 'error')
return
end
if retval then
retval = tonumber(retval)
itemData = lib.callback.await('weapons:GetWeaponAmmoItem', 0, ammoType, masterAmmo)
if not itemData then
print('Nice try forehead :)')
return
end
if maxammo ~= total then
TriggerServerCallback('weapon:server:GetWeaponAmmo', function(ammo)
if ammo then
SetAmmoInClip(ped, weapon, 0)
AddAmmoToPed(ped, weapon, retval + ammoclip)
TriggerServerEvent('weapons:server:AddWeaponAmmo', CurrentWeaponData, total + retval)
--TriggerServerEvent("weapons:server:UpdateWeaponAmmo", CurrentWeaponData, total + retval)
TriggerServerEvent('weapons:server:removeWeaponAmmoItem', itemData)
end
end, CurrentWeaponData)
else
SendTextMessage(Lang('INVENTORY_NOTIFICATION_MAX_AMMO'), 'error')
end
end
end)
RegisterNetEvent('weapons:client:ConfigureTint')
AddEventHandler('weapons:client:ConfigureTint', function(ItemData)
TintItemData = ItemData
SetFocus(true)
SendNUIMessage({
action = 'showTintMenu'
})
end)
function closeGui()
SetFocus(false)
SendNUIMessage({ action = 'hide' })
end
RegisterNUICallback('quit', function(data, cb)
closeGui()
TintItemData = {}
cb('ok')
end)
RegisterNUICallback('addtinturl', function(data, cb)
closeGui()
SendTextMessage(Lang('INVENTORY_NOTIFICATION_CUSTOM_TINT_ADDED') .. ' ' .. data.urldatatint, 'success')
local tinturl = tostring(data.urldatatint)
TriggerServerEvent('weapons:server:AddUrlTint', TintItemData, tinturl)
Wait(5)
TintItemData = {}
cb('ok')
end)
RegisterNetEvent('weapons:client:EquipAttachment', function(ItemData, attachment, WeaponData)
if WeaponData then
TriggerServerEvent('weapons:server:EquipAttachment', ItemData, WeaponData, Config.WeaponAttachments[WeaponData.name:upper()][attachment], true)
return
end
local ped = PlayerPedId()
local weapon = GetSelectedPedWeapon(ped)
local WeaponData = WeaponList[weapon]
if weapon == `WEAPON_UNARMED` then
SendTextMessage(Lang('INVENTORY_NOTIFICATION_NO_WEAPON'), 'error')
return
end
WeaponData.name = WeaponData.name:upper()
if not Config.WeaponAttachments[WeaponData.name] then
SendTextMessage(Lang('INVENTORY_NOTIFICATION_ATTACHMENT_NOT_COMPATIBLE'), 'error')
return
end
if not Config.WeaponAttachments[WeaponData.name][attachment] then
SendTextMessage(Lang('INVENTORY_NOTIFICATION_ATTACHMENT_NOT_COMPATIBLE'), 'error')
return
end
if Config.WeaponAttachments[WeaponData.name][attachment]['item'] == ItemData.name then
TriggerServerEvent('weapons:server:EquipAttachment', ItemData, CurrentWeaponData, Config.WeaponAttachments[WeaponData.name][attachment])
return
end
SendTextMessage(Lang('INVENTORY_NOTIFICATION_ATTACHMENT_NOT_COMPATIBLE'), 'error')
end)
function SplitStr(str, delimiter)
local result = {}
local from = 1
local delim_from, delim_to = string.find(str, delimiter, from)
while delim_from do
result[#result + 1] = string.sub(str, from, delim_from - 1)
from = delim_to + 1
delim_from, delim_to = string.find(str, delimiter, from)
end
result[#result + 1] = string.sub(str, from)
return result
end
CreateThread(function()
SetWeaponsNoAutoswap(true)
end)
LastUpdatedAmmoTime = nil
CreateThread(function()
while true do
local ped = PlayerPedId()
if IsPedArmed(ped, 7) == 1 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)
TriggerServerEvent('weapons:server:UpdateWeaponQuality', CurrentWeaponData, 1, fuel)
end)
---@param data ServerProgressBar
lib.callback.register('inventory:progressBarSync', function(data)
Debug('Progress bar sync: ', data)
local success = ProgressBarSync(data.name, data.label, data.duration, data.useWhileDead, data.canCancel, data.disableControls, data.anim, data.prop)
return success
end)
CreateThread(function()
while true do
local inRange = false
local ped = PlayerPedId()
local pos = GetEntityCoords(ped)
for k, data in pairs(Config.WeaponRepairPoints) do
local distance = #(pos - data.coords)
if distance < 10 then
inRange = true
if distance < 1 then
if data.IsRepairing then
if data.RepairingData.CitizenId ~= GetPlayerIdentifier() then
DrawText3Ds(data.coords.x, data.coords.y, data.coords.z, Lang('INVENTORY_TEXT_REPAIR_NOT_AVAILABLE'))
else
if not data.RepairingData.Ready then
DrawText3Ds(data.coords.x, data.coords.y, data.coords.z, Lang('INVENTORY_TEXT_REPAIR_REPAIRED'))
else
DrawText3D(data.coords.x, data.coords.y, data.coords.z, Lang('INVENTORY_TEXT_REPAIR_TAKE'), 'repair_take1', 'E')
end
end
else
if CurrentWeaponData and next(CurrentWeaponData) then
if not data.RepairingData.Ready then
local WeaponData = WeaponList[GetHashKey(CurrentWeaponData.name)]
DrawText3D(data.coords.x, data.coords.y, data.coords.z, Lang('INVENTORY_TEXT_REPAIR_PRICE') .. Config.WeaponRepairCosts[WeaponData.weapontype], 'repair_weapon', 'E')
if IsControlJustPressed(0, 38) then
TriggerServerCallback('weapons:server:RepairWeapon', function(HasMoney)
if HasMoney then
CurrentWeaponData = {}
end
end, k, CurrentWeaponData)
end
else
if data.RepairingData.CitizenId ~= GetPlayerIdentifier() then
DrawText3Ds(data.coords.x, data.coords.y, data.coords.z, Lang('INVENTORY_TEXT_REPAIR_NOT_AVAILABLE'))
else
DrawText3D(data.coords.x, data.coords.y, data.coords.z, Lang('INVENTORY_TEXT_REPAIR_TAKE'), 'repair_take2', 'E')
if IsControlJustPressed(0, 38) then
TriggerServerEvent('weapons:server:TakeBackWeapon', k, data)
end
end
end
else
if data.RepairingData.CitizenId == nil then
DrawText3Ds(data.coords.x, data.coords.y, data.coords.z, Lang('INVENTORY_TEXT_REPAIR_NO_WEAPON'))
elseif data.RepairingData.CitizenId == GetPlayerIdentifier() then
DrawText3D(data.coords.x, data.coords.y, data.coords.z, Lang('INVENTORY_TEXT_REPAIR_TAKE'), 'repair_take3', 'E')
if IsControlJustPressed(0, 38) then
TriggerServerEvent('weapons:server:TakeBackWeapon', k, data)
end
end
end
end
end
end
end
if not inRange then
Wait(1250)
end
Wait(3)
end
end)

View file

@ -1,515 +0,0 @@
--[[
Welcome to the **qs-inventory configuration**!
This configuration file contains essential settings to customize and optimize your inventory system. Before you begin modifying the settings, please ensure you have reviewed each section of the documentation linked below, as it provides step-by-step instructions and in-depth explanations for each configurable option.
Key settings within this file are designed for flexibility. You are encouraged to adjust and adapt these configurations to seamlessly integrate with your server's framework, creating a more personalized inventory experience for your players.
Editable configurations are located primarily in the **client/custom/** and **server/custom/** directories, making adjustments straightforward and organized.
📄 **Direct Documentation Link:**
Refer to the official documentation here for comprehensive details and guidance: https://docs.quasar-store.com/
]]
Config = Config or {}
Locales = Locales or {}
--[[
Choose your preferred language!
In this section, you can select the main language for your asset. We have a wide
selection of default languages available, located in the locales/* folder.
If your language is not listed, don't worry! You can easily create a new one
by adding a new file in the locales folder and customizing it to your needs.
🌐 Default languages available:
'ar' -- Arabic
'bg' -- Bulgarian
'ca' -- Catalan
'cs' -- Czech
'da' -- Danish
'de' -- German
'el' -- Greek
'en' -- English
'es' -- Spanish
'fa' -- Persian
'fr' -- French
'hi' -- Hindi
'hu' -- Hungarian
'it' -- Italian
'ja' -- Japanese
'ko' -- Korean
'nl' -- Dutch
'no' -- Norwegian
'pl' -- Polish
'pt' -- Portuguese
'ro' -- Romanian
'ru' -- Russian
'sl' -- Slovenian
'sv' -- Swedish
'th' -- Thai
'tr' -- Turkish
'zh-CN' -- Chinese (Simplified)
'zh-TW' -- Chinese (Traditional)
After selecting your preferred language, be sure to save your changes and test
the asset to ensure everything works as expected!
]]
Config.Language = 'de'
--[[
Framework Detection and Configuration Guide for qs-inventory
This inventory system automatically detects whether you are using 'qb-core', 'es_extended', or 'qbx_core'
as your main framework, assigning it to 'Config.Framework' accordingly. However, if you have renamed
any of these resources, or use a modified framework setup, you may need to update this configuration manually.
To set up manually:
1. Remove the automatic detection code by clearing 'Config.Framework''s value.
2. Replace it with the name of your custom framework setup.
3. Update any relevant framework-specific functions within the script's client and server files.
Warning:
The automatic framework detection is set for standard setups. Avoid modifying this section
unless you have a deep understanding of the framework structure, as incorrect modifications
could disrupt functionality.
Remember, for the inventory system to work seamlessly, make sure 'qb-core', 'es_extended',
or 'qbx_core' (or their equivalent files) are running at startup.
]]
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'
Config.QBX = qbxHas
--[[
Backward Compatibility Mode for qs-inventory Migration
The 'Config.FetchOldInventory' setting is designed for users migrating data from an older version of qs-inventory to the current system.
- **Purpose:** When set to 'true', this option initiates a one-time data migration process, transferring all relevant inventory data from the old qs-inventory to the updated version.
- **Completion Alert:** Once the migration is successfully finished, a message saying 'Backward compatibility has been completed' will display in your console.
- **IMPORTANT:** After the migration is complete, immediately switch 'Config.FetchOldInventory' back to 'false'. Keeping it enabled after migration can result in potential errors, as the script is not intended to run with backward compatibility enabled long-term.
- **Usage Warning:** Do not use or modify other settings in the script while 'Config.FetchOldInventory' is active, as this is a one-time migration setting designed solely for data transfer.
Ensure to read the documentation for any additional guidance on migration steps.
]]
Config.FetchOldInventory = false -- Set to 'true' only once to start the migration process, then return to 'false' immediately after.
Config.UseTarget = false -- Set to true to enable targeting with either 'qb-target' or 'ox_target', or false to disable entirely.
--[[
General Configuration Guide for the Inventory System
This section outlines various customization options available within the qs-inventory system. Each setting allows
for detailed customization, from item targeting methods to inventory slot configurations and item interaction options.
To adjust the settings for your server, carefully review each parameter below. Note that certain adjustments (e.g.,
slot limits or item weight capacities) may require special attention to avoid issues with existing inventories.
---- CONFIGURATION SETTINGS BREAKDOWN ----
]]
Config.ThrowKeybind = 'E' -- Sets the keybinding for throwing items from the inventory (default: 'E').
Config.BlockedSlot = true -- Locks the sixth slot to prevent stealing; valuable items placed here are protected.
Config.GiveItemHideName = false -- Hides item names during give-item actions, showing only the item ID for privacy.
Config.OpenProgressBar = true -- Enable to add a progress bar for inventory opening, reducing duplication risks.
Config.EnableSounds = false -- Select if you want the default inventory sounds completely muted
Config.EnableThrow = true -- Enables the ability to throw items from the inventory.
Config.EnableTrade = true -- Enables the option to execute safe trade, MMORPG style.
Config.EnableChangeLabel = true -- Enable option tu change item labels in one click.
Config.Handsup = true -- Toggle on/off the hands-up feature and enable/disable robbery options.
Config.StealDeadPlayer = true -- Allows players to loot items from dead players when enabled.
Config.StealWithoutWeapons = false -- Restricts robbery interactions; can only rob if target has hands raised without a weapon.
Config.InventoryWeight = { -- Player inventory capacity configurations:
['weight'] = 60000, -- Maximum weight capacity for inventory in grams. ⚠️ Changes require inventory wipe to avoid duplication issues.
['slots'] = 41, -- Total available slots. Set to 40 to remove the sixth (protected) slot.
}
Config.DropWeight = { -- Drop item weight and slot configurations:
['weight'] = 20000000, -- Maximum drop item weight in grams, managing ground clutter capacity.
['slots'] = 130, -- Total slot capacity for dropped items. Adjust to limit or increase ground item limits.
}
Config.LabelChange = true -- Enables players to rename inventory items for customization.
Config.LabelChangePrice = false -- Sets a price for label changes; set to 'false' to make renaming free.
Config.BlockedLabelChangeItems = { -- Restricts renaming for certain items:
['money'] = true, -- Prevents renaming of currency items.
['phone'] = true, -- Prevents renaming of phones.
}
Config.UsableItemsFromHotbar = true -- Enables quick access for item use directly from hotbar (slots 1-5).
Config.BlockedItemsHotbar = { -- Restricts specific items from hotbar use, requiring full inventory access for use.
'lockpick', -- Example item restricted from hotbar usage.
-- Add additional items as needed to restrict their hotbar access.
}
--[[
Quasar Store - Backpack Configuration for qs-inventory
This section configures backpack functionality within the inventory system. Backpacks are managed as unique items
with a limit of one per player. By defining items as non-storable or non-stealable, you can control item interactions
and storage rules for specific items. Additionally, this configuration allows for customization of item drop visuals,
clothing management, and gender identification in inventory contexts.
---- DETAILED CONFIGURATION SETTINGS ----
]]
Config.OnePerItem = {
-- Restricts certain items to a single instance per player. For example, only one backpack can be held at a time.
['backpack'] = 1,
-- Add more items here to set maximum quantity per item type.
}
Config.notStolenItems = {
-- Defines items that cannot be stolen from other players. Helps protect specific personal or essential items.
['id_card'] = true, -- ID cards cannot be stolen.
['water_bottle'] = true, -- Water bottles are non-stealable.
['tosti'] = true -- Additional protected item (example).
}
Config.notStoredItems = {
-- Defines items that cannot be stored in stashes or shared containers, ensuring these items stay in the player inventory.
['backpack'] = true, -- Prevents backpacks from being stored.
}
-- Enables or disables clothing system integration. Refer to the documentation for your framework setup:
-- ESX Documentation: https://docs.quasar-store.com/ Inventory > Functions > Clothing
-- QB Documentation: https://docs.quasar-store.com/
Config.Clothing = false -- Enables clothing options in the inventory, with a corresponding button.
---@type ClotheSlot[]
Config.ClothingSlots = {
{
name = 'helmet',
slot = 1,
type = 'head',
wearType = 'prop',
componentId = 0,
anim = {
dict = 'mp_masks@standard_car@ds@',
anim = 'put_on_mask',
flags = 49
}
},
{
name = 'mask',
slot = 2,
type = 'head',
wearType = 'drawable',
componentId = 1,
anim = {
dict = 'mp_masks@standard_car@ds@',
anim = 'put_on_mask',
flags = 49
}
},
{
name = 'glasses',
slot = 3,
type = 'head',
wearType = 'prop',
componentId = 1,
anim = {
dict = 'clothingspecs',
anim = 'take_off',
flags = 49
}
},
{
name = 'torso',
slot = 4,
type = 'body',
wearType = 'drawable',
componentId = 11,
anim = {
dict = 'missmic4',
anim = 'michael_tux_fidget',
flags = 49
}
},
{
name = 'tshirt',
slot = 5,
type = 'body',
wearType = 'drawable',
componentId = 8,
anim = {
dict = 'clothingtie',
anim = 'try_tie_negative_a',
flags = 49
}
},
{
name = 'jeans',
slot = 6,
type = 'body',
wearType = 'drawable',
componentId = 4,
anim = {
dict = 'missmic4',
anim = 'michael_tux_fidget',
flags = 49
}
},
{
name = 'arms',
slot = 7,
type = 'body',
wearType = 'drawable',
componentId = 3,
anim = {
dict = 'nmt_3_rcm-10',
anim = 'cs_nigel_dual-10',
flags = 49
}
},
{
name = 'shoes',
slot = 8,
type = 'body',
wearType = 'drawable',
componentId = 6,
anim = {
dict = 'random@domestic',
anim = 'pickup_low',
flags = 49
}
},
{
name = 'ears',
slot = 9,
type = 'body',
wearType = 'prop',
componentId = 2,
anim = {
dict = 'mp_cp_stolen_tut',
anim = 'b_think',
flags = 49
}
},
{
name = 'bag',
slot = 10,
type = 'addon',
wearType = 'drawable',
componentId = 5,
anim = {
dict = 'anim@heists@ornate_bank@grab_cash',
anim = 'intro',
flags = 49
}
},
{
name = 'watch',
slot = 11,
type = 'addon',
wearType = 'prop',
componentId = 6,
anim = {
dict = 'nmt_3_rcm-10',
anim = 'cs_nigel_dual-10',
flags = 49
}
},
{
name = 'bracelets',
slot = 12,
type = 'addon',
wearType = 'prop',
componentId = 7,
anim = {
dict = 'nmt_3_rcm-10',
anim = 'cs_nigel_dual-10',
flags = 49
}
},
{
name = 'chain',
slot = 13,
type = 'addon',
wearType = 'drawable',
componentId = 7,
anim = {
dict = 'nmt_3_rcm-10',
anim = 'cs_nigel_dual-10',
flags = 49
}
},
{
name = 'vest',
slot = 14,
type = 'addon',
wearType = 'drawable',
componentId = 9,
anim = {
dict = 'nmt_3_rcm-10',
anim = 'cs_nigel_dual-10',
flags = 49
}
},
}
Config.IsIllenium = GetResourceState('illenium-appearance') == 'started'
Config.TakePreviousClothes = false -- Determines if previously worn clothes are added back to inventory upon changing.
Config.ItemDropObject = 'prop_paper_bag_small' -- Sets the model for dropped items. Can be set to 'false' for no visual object.
Config.DropRefreshTime = 15 * 60 -- Sets how often dropped items are refreshed (in seconds).
Config.MaxDropViewDistance = 9.5 -- Maximum distance a player can view dropped items.
Config.Genders = {
-- Gender labels in the inventory system. No need to adjust unless expanding gender categories.
['m'] = 'Male',
['f'] = 'Female',
[1] = 'Male',
[2] = 'Female'
}
--[[
Visual Configuration Overview:
This section controls the visual and user interface settings of the resource.
Here, you can adjust everything from the animation style used to open the inventory,
to the logo and item icons within the inventory interface.
* 'InventoryOptions' includes options to display or hide sidebar information,
such as health, armor, and other character stats.
* 'Config.Defaults' contains settings for base character appearances, such as
clothing defaults, which you may need to modify if youre using custom clothes.
]]
Config.OpenInventoryAnim = true -- Enables a player animation when opening the inventory
Config.OpenInventoryScene = false -- Toggles the scene animation when the inventory is opened
Config.Logo = 'https://i.ibb.co/CJfj6KV/Mini-copia.png' -- Path to a logo image (use a URL or a local path such as './icons/logo.png') or set false
Config.IdleCamera = true -- Enables or disables idle camera functionality in the inventory screen
-- Configure additional sidebar options within the inventory display:
Config.InventoryOptions = {
-- Generic menus
['clothes'] = Config.Clothing, -- Controls visibility of clothing customization in Config.Clothing
['configuration'] = true, -- Toggle configuration options visibility in the inventory
-- Left sidebar items
['health'] = true, -- Displays player health status
['armor'] = true, -- Displays player armor status
['hunger'] = true, -- Displays hunger status (if applicable)
['thirst'] = true, -- Displays thirst status (if applicable)
-- Right sidebar items
['id'] = true, -- Shows player ID
['money'] = true, -- Displays player cash amount
['bank'] = false, -- Displays player bank balance
['blackmoney'] = true, -- Displays player 'black money' (if applicable)
}
-- Custom icons for items in the inventory UI, utilizing FontAwesome icons (https://fontawesome.com/)
Config.ItemMiniIcons = {
['tosti'] = {
icon = 'fa-solid fa-utensils', -- Icon for "tosti" item
},
['water_bottle'] = {
icon = 'fa-solid fa-utensils', -- Icon for "water bottle" item
},
}
-- -- Custom rarity items, here you can create new types of rarities.
Config.ItemRarities = {
{
name = 'common',
css = 'background-image: linear-gradient(to top, rgba(211,211,211,0.5), rgba(211,211,211,0) 60%)',
},
{
name = 'epic',
css = 'background-image: linear-gradient(to top, rgba(128,0,128,0.5), rgba(128,0,128,0) 60%)',
},
{
name = 'legendary',
css = 'background-image: linear-gradient(to top, rgba(255,215,0,0.5), rgba(255,215,0,0) 60%)',
},
}
-- Default character appearance options (adjust as needed for custom clothing setups)
Config.Defaults = {
['female'] = {
torso = 18,
jeans = 19,
shoes = 34,
arms = 15,
helmet = -1,
glasses = -1,
mask = 0,
tshirt = 2,
ears = -1,
bag = 0,
watch = -1,
chain = 0,
bracelets = -1,
vest = 0,
},
['male'] = {
torso = 15,
jeans = 14,
shoes = 34,
arms = 15,
helmet = -1,
glasses = -1,
mask = 0,
tshirt = 15,
ears = -1,
bag = 0,
watch = -1,
chain = 0,
bracelets = -1,
vest = 0
}
}
--[[
Turns your inventory into a compact, side-mounted system that
lets you move around while using it, in true Quasar style.
]]
Config.CompactInventory = true -- Enables a compact inventory view, reducing the size of the inventory window for a more streamlined appearance.
-- Key Bindings: Configure shortcut keys for inventory actions
-- Check the documentation for guidelines on modifying these key mappings
Config.KeyBinds = {
['inventory'] = 'F2', -- Open inventory
['hotbar'] = 'TAB', -- Show hotbar
['reload'] = 'R', -- Reload action
['handsup'] = 'X', -- Hands-up/robbery gesture
}
--[[
Debug Configuration:
This section is primarily for development purposes, enabling debug mode allows you to view
various logs and prints related to script actions, events, and errors. This is useful for
identifying issues and fine-tuning the script during the development stage.
NOTE: Enable these options only if you are actively developing or troubleshooting,
as they may increase server load and provide detailed output that isnt necessary
for standard gameplay.
]]
--[[
Interval in milliseconds to save the player inventory to the database
To solve dupe problems we are not using the old one's system (Save inventory when inventory is closed)
The new system is detects when the inventory is updated and saves it to the database after a certain time.
But you need to be careful and avoid frequent script restarts. Because it doesn't work when the script is restarted.
you can use /save-inventories for save all inventories to the database (if you need to restart the script)
]]
Config.Debug = true -- Enables detailed print logs for debugging; leave off for production
Config.ZoneDebug = false -- Toggles additional debug information for zones; use only if you're troubleshooting specific zones
Config.InventoryPrefix = 'inventory' -- Prefix for inventory references in the codebase; modifying this requires codebase-wide adjustments
Config.SaveInventoryInterval = 1000

View file

@ -1,254 +0,0 @@
--[[
Configuring the Crafting System
The qs-inventory's crafting system is entirely independent, meaning it operates without
needing additional DLC. This crafting system is designed to be intuitive and adaptable
to your server needs, allowing you to create complex recipes and control crafting outcomes
with ease.
Noteworthy features:
- Customizable success rates per item (1-100%), which sets the probability of successful crafting.
- Reputation-based access to crafting recipes (specific to QBCore) that allows items to unlock
based on a player's reputation points.
Read through each section to understand the structure of the system, and check examples below
for reference on crafting items.
**Important:** If you use the Reputation system, be sure to configure the 'rep' fields and thresholds
based on your servers design.
]]
Config.Crafting = true -- Toggle the crafting system on or off
--[[
Reputation System (Exclusive to QBCore Framework)
The reputation system restricts certain crafting items until a player reaches a required level.
This can be configured per item in the crafting recipes. For example, a higher-level item
may require a specific amount of reputation points to unlock.
Built-in Reputation Types for QBCore:
- 'craftingrep' and 'attachmentcraftingrep'
Set thresholds to only show items that match or exceed a players reputation level.
]]
Config.CraftingReputation = false -- Enable to activate reputation gating for crafting items (QBCore only)
Config.ThresholdItems = false -- Items only visible if rep >= threshold; QBCore-only feature
--[[
Crafting Recipes Configuration
Below is an example of how to define crafting items. Each entry contains:
- Item name and amount crafted
- Resource costs required for crafting
- Slot position, item type, and crafting time
- Reputation requirements and chance of successful crafting
Customize each field to suit your server, and remember to set 'chance' carefully.
Higher chance values reduce the likelihood of item breakage.
]]
-- Example Item Entry Structure
--[[
[1] = {
name = "weapon_pistol", -- The name of the item being crafted
amount = 50, -- Quantity available for crafting
info = {}, -- Information field for metadata (ignore if unsure)
costs = { -- List of required materials to craft this item
["iron"] = 80,
["metalscrap"] = 120,
["rubber"] = 8,
["steel"] = 133,
["lockpick"] = 5,
},
type = "weapon", -- Specify if 'item' or 'weapon'
slot = 1, -- Position slot in the crafting menu
rep = 'attachmentcraftingrep', -- Required reputation type (QBCore only)
points = 1, -- Reputation points awarded on crafting (QBCore only)
threshold = 0, -- Required reputation level for visibility (QBCore only)
time = 5500, -- Crafting time in milliseconds
chance = 100 -- Success chance percentage (1-100)
},
]]
--[[
Custom Event for Crafting
External scripts can call the crafting system using the following sample structure.
Set up custom crafting recipes and triggers based on your server events.
]]
-- Sample External Crafting Event
function OpenCrafting()
local CustomCrafting = {
[1] = {
name = 'weapon_pistol',
amount = 50,
info = {},
costs = { ['tosti'] = 1 },
type = 'weapon',
slot = 1,
rep = 'attachmentcraftingrep',
points = 1,
threshold = 0,
time = 5500,
chance = 100
},
[2] = {
name = 'water_bottle',
amount = 1,
info = {},
costs = { ['tosti'] = 1 },
type = 'item',
slot = 2,
rep = 'attachmentcraftingrep',
points = 1,
threshold = 0,
time = 8500,
chance = 100
},
}
local crafting = {
label = 'Craft',
items = exports['qs-inventory']:SetUpCrafing(CustomCrafting)
}
TriggerServerEvent('inventory:server:SetInventoryItems', CustomCrafting)
TriggerServerEvent('inventory:server:OpenInventory', 'customcrafting', crafting.label, crafting)
end
--[[ Crafting Tables Definition
Define specific crafting tables for different jobs or locations:
- Each table can have unique items and requirements.
- You can control access based on job roles, grades, or specific blip visibility on the map.
]]
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
},
}
},
-- Continue with the same structure for the other Crafting Tables...
}

View file

@ -1,28 +0,0 @@
/*
Default Color Configuration Settings
This section sets up the color scheme for the interface. Please ensure
each color is specified using hexadecimal format (e.g., "#FFFFFF") and
that opacity values are defined between "0.0" and "1.0" for proper
functionality. Avoid using RGB or other color formats as these may
interfere with the default rendering.
Tip: Use the RESET button to restore all color values to the default settings.
Primary and Secondary Colors:
- primary: Base color for primary UI elements (e.g., buttons, main backgrounds).
- secondary: Used for secondary components, keeping design balance.
Border and Text:
- border: Determines border styles for UI elements.
- text: Sets the main text color for all standard display elements.
*/
const defaultPrimaryColor = "#0E151B"; // Primary color for main UI backgrounds and components
const defaultPrimaryOpacity = "0.2"; // Opacity for primary color (range: 0.0 to 1.0)
const defaultSecondaryColor = "#0E151B"; // Secondary color for complementary elements
const defaultSecondaryOpacity = "1.0"; // Full opacity for secondary elements, preserving visibility
const defaultBorderColor = "#00A3FF"; // Border color across the UI, emphasizing interactive areas
const defaultBorderOpacity = "0.6"; // Sets semi-transparency for borders
const defaultBorderRadius = "1px"; // Defines corner rounding for UI elements
const defaultTextColor = "#FFFFFF"; // Standard text color, ensuring readability on dark backgrounds

View file

@ -1,330 +0,0 @@
--[[
Welcome to the Garbage Settings Configuration!
In this section, youll find settings related to garbage cans and their loot items. Each item listed
under Config.GarbageItemsForProp will appear randomly when interacting with a garbage can, providing
an immersive experience where players can search for random loot.
**Config.GarbageObjects**:
- This list contains object names used to represent garbage cans across the map.
- These objects are registered for targeting. If your server doesnt use targeting, feel free to ignore this.
**Config.GarbageItemsForProp**:
- This configuration maps specific garbage can models to lootable items.
- Each object (like 'prop_dumpster_02a') has defined slots and random item possibilities.
- The items assigned to each garbage object spawn with variable amounts, as set in each items configuration.
- Adjust min and max amounts per item as desired to tailor gameplay rewards.
]]
Config.GarbageItems = {}
Config.GarbageObjects = {
'prop_dumpster_02a', -- Standard dumpster
'prop_dumpster_4b', -- Large blue dumpster
'prop_dumpster_4a', -- Large green dumpster
'prop_dumpster_3a', -- Smaller gray dumpster
'prop_dumpster_02b', -- Alternate dumpster model
'prop_dumpster_01a' -- Basic dumpster model
}
Config.GarbageItemsForProp = {
[joaat('prop_dumpster_02a')] = {
label = 'Garbage', -- Label shown to players when interacting
slots = 30, -- Number of item slots available in the dumpster
items = {
[1] = {
[1] = {
name = 'aluminum', -- Item name: aluminum scrap
amount = {
min = 1, -- Minimum amount spawned per search
max = 5 -- Maximum amount spawned per search
},
info = {}, -- Additional item information
type = 'item', -- Type of loot (e.g., 'item' or 'weapon')
slot = 1, -- Slot position within the garbage inventory
},
[2] = {
name = 'metalscrap', -- Item name: metal scrap
amount = {
min = 1, -- Minimum amount spawned per search
max = 5 -- Maximum amount spawned per search
},
info = {}, -- Additional item information
type = 'item', -- Type of loot (e.g., 'item' or 'weapon')
slot = 2, -- Slot position within the garbage inventory
},
},
[2] = {
[1] = {
name = 'iron',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 1,
},
[2] = {
name = 'steel',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 2,
},
},
}
},
[joaat('prop_dumpster_4b')] = {
label = 'Garbage',
slots = 30,
items = {
[1] = {
[1] = {
name = 'aluminum',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 1,
},
[2] = {
name = 'plastic',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 2,
},
},
[2] = {
[1] = {
name = 'plastic',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 1,
},
[2] = {
name = 'metalscrap',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 2,
},
},
}
},
[joaat('prop_dumpster_4a')] = {
label = 'Garbage',
slots = 30,
items = {
[1] = {
[1] = {
name = 'aluminum',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 1,
},
[2] = {
name = 'metalscrap',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 2,
},
},
[2] = {
[1] = {
name = 'glass',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 1,
},
[2] = {
name = 'joint',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 2,
},
},
}
},
[joaat('prop_dumpster_3a')] = {
label = 'Garbage',
slots = 30,
items = {
[1] = {
[1] = {
name = 'aluminum',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 1,
},
[2] = {
name = 'lighter',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 2,
},
},
[2] = {
[1] = {
name = 'metalscrap',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 1,
},
[2] = {
name = 'rubber',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 2,
},
},
}
},
[joaat('prop_dumpster_02b')] = {
label = 'Garbage',
slots = 30,
items = {
[1] = {
[1] = {
name = 'metalscrap',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 1,
},
[2] = {
name = 'rubber',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 2,
},
},
[2] = {
[1] = {
name = 'iron',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 1,
},
[2] = {
name = 'steel',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 2,
},
},
}
},
[joaat('prop_dumpster_01a')] = {
label = 'Garbage',
slots = 30,
items = {
[1] = {
[1] = {
name = 'plastic',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 1,
},
[2] = {
name = 'metalscrap',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 2,
},
},
[2] = {
[1] = {
name = 'lighter',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 1,
},
[2] = {
name = 'metalscrap',
amount = {
min = 1,
max = 5
},
info = {},
type = 'item',
slot = 2,
},
},
}
},
}

View file

@ -1,350 +0,0 @@
/*
Metadata-based Item Information Display
This function, `FormatItemInfo`, is responsible for dynamically displaying detailed item information based on metadata associated with the item.
It identifies and structures specific data for items like ID cards and phones, which use metadata for unique identifiers like names, phone numbers, and citizen details.
The `phoneMeta` array defines the specific item names recognized as phone items. This ensures items in this array receive custom data display for attributes like phone number, firstname, and lastname.
Function Breakdown:
- First, the function checks if `itemData` and `itemData.info` are not empty, confirming the item has metadata to display.
- If the item has the `showItemData` flag set in its info, it will display a structured table of its metadata, using the `tableToString()` helper to convert metadata into a readable format.
- For ID cards (`id_card` items), it displays customized details like CSN, name, birthdate, gender, and nationality, populating these based on the `itemData.info`.
- If the item name matches one in `phoneMeta` and includes a phone number in `itemData.info`, it displays custom phone information, including phone number, firstname, and lastname.
Detailed Comments:
*/
let phoneMeta = ['phone', 'black_phone', 'yellow_phone', 'red_phone', 'green_phone'];
function FormatItemInfo(itemData) {
// Checks if itemData is valid and contains metadata info
if (itemData != null && itemData.info != "") {
let label = itemData?.info?.label || itemData?.label; // Sets the item label, prioritizing info metadata
// If item has showItemData flag, display all metadata in a table format
if (itemData.info.showItemData) {
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html("<p>" + tableToString(itemData.info) + "</p>");
return;
}
// ID Card: Display CSN, first and last name, birthdate, gender, and nationality
if (itemData.name == "id_card") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html(
"<p><strong>CSN: </strong><span>" +
(itemData.info.citizenid !== undefined ? itemData.info.citizenid : 'ID-Card ' + Math.floor(Math.random() * 99999)) +
"</span></p><p><strong>First Name: </strong><span>" +
itemData.info.firstname +
"</span></p><p><strong>Last Name: </strong><span>" +
itemData.info.lastname +
"</span></p><p><strong>Birth Date: </strong><span>" +
itemData.info.birthdate +
"</span></p><p><strong>Gender: </strong><span>" +
(itemData.info.gender !== undefined ? itemData.info.gender : 'AH-64 Apache Helicopter') +
"</span></p><p><strong>Nationality: </strong><span>" +
(itemData.info.nationality !== undefined ? itemData.info.nationality : 'No information') +
"</span></p>"
);
}
// Phone Items: Check if item is a phone and display relevant details if available
else if (phoneMeta.includes(itemData.name) && itemData.info.phoneNumber) {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html(
"<p><strong>Phone Number: </strong><span>" +
itemData.info.phoneNumber +
"</span></p><p><strong>Firstname: </strong><span>" +
itemData.info.charinfo.firstname +
"</span></p><p><strong>Lastname: </strong><span>" +
itemData.info.charinfo.lastname +
"</span></p>"
);
// Other items
} else if (itemData.name == "tradingcard_psa") {
$(".item-info-title").html("<p>" + label + "</p>");
$(".item-info-description").html(
"<p><strong>PSA ID: </strong><span>" +
itemData.info.serial +
"</span></p>"
);
} else if (itemData.name == "photo") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html(
"<p><span>" +
itemData.info.location +
"</span></p><span>" +
itemData.info.date + "</span></p>"
);
} else if (itemData.name == "vehiclekeys") {
$(".item-info-title").html("<p>" + label + "</p>");
$(".item-info-description").html(
"<p><strong>Plate: </strong><span>" +
itemData.info.plate +
"</span></p><p><strong>Model: </strong><span>" +
itemData.info.description +
"</span></p>"
);
} else if (itemData.name == "plate") {
$(".item-info-title").html("<p>" + label + "</p>");
$(".item-info-description").html(
"<p><strong>Plate: </strong><span>" +
itemData.info.plate +
"</span></p>"
);
} else if (itemData.name == "backpack") {
$(".item-info-title").html("<p>" + label + "</p>");
$(".item-info-description").html(
"<p><strong>ID: </strong><span>" +
itemData.info.ID +
"</span></p><p><strong>Weight: </strong><span>" +
itemData.info.weight +
"</span></p><p><strong>Slots: </strong><span>" +
itemData.info.slots +
"</span></p>"
);
} else if (itemData.name == "backpack2") {
$(".item-info-title").html("<p>" + label + "</p>");
$(".item-info-description").html(
"<p><strong>ID: </strong><span>" +
itemData.info.ID +
"</span></p><p><strong>Weight: </strong><span>" +
itemData.info.weight +
"</span></p><p><strong>Slots: </strong><span>" +
itemData.info.slots +
"</span></p>"
);
} else if (itemData.name == "briefcase") {
$(".item-info-title").html("<p>" + label + "</p>");
$(".item-info-description").html(
"<p><strong>ID: </strong><span>" +
itemData.info.ID +
"</span></p><p><strong>Weight: </strong><span>" +
itemData.info.weight +
"</span></p><p><strong>Slots: </strong><span>" +
itemData.info.slots +
"</span></p>"
);
} else if (itemData.name == "paramedicbag") {
$(".item-info-title").html("<p>" + label + "</p>");
$(".item-info-description").html(
"<p><strong>ID: </strong><span>" +
itemData.info.ID +
"</span></p><p><strong>Weight: </strong><span>" +
itemData.info.weight +
"</span></p><p><strong>Slots: </strong><span>" +
itemData.info.slots +
"</span></p>"
);
} else if (itemData.name == "driver_license") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html(
"<p><strong>First Name: </strong><span>" +
itemData.info.firstname +
"</span></p><p><strong>Last Name: </strong><span>" +
itemData.info.lastname +
"</span></p><p><strong>Birth Date: </strong><span>" +
itemData.info.birthdate +
"</span></p><p><strong>Licenses: </strong><span>" +
itemData.info.type +
"</span></p>"
);
} else if (itemData.name == "weaponlicense") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html(
"<p><strong>First Name: </strong><span>" +
itemData.info.firstname +
"</span></p><p><strong>Last Name: </strong><span>" +
itemData.info.lastname +
"</span></p><p><strong>Birth Date: </strong><span>" +
itemData.info.birthdate +
"</span></p>"
);
} else if (itemData.name == "lawyerpass") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html(
"<p><strong>Pass-ID: </strong><span>" +
itemData.info.id +
"</span></p><p><strong>First Name: </strong><span>" +
itemData.info.firstname +
"</span></p><p><strong>Last Name: </strong><span>" +
itemData.info.lastname +
"</span></p><p><strong>CSN: </strong><span>" +
itemData.info.citizenid +
"</span></p>"
);
} else if (itemData.name == "harness") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html(
"<p>" + itemData.info.uses + " uses left.</p>"
);
} else if (itemData.name == "weapontint_url") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html(
"<p><strong>Tint status: </strong><span> " +
(itemData.info.urltint !== undefined ? "Used" : "Without use") +
"</span></p><p><strong>URL Link: </strong><span>" +
(itemData.info.urltint !== undefined ? itemData.info.urltint.substring(0, 40) + "..." : "N/A") +
"</span></p>"
);
} else if (itemData.type == "weapon") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
if (itemData.info.ammo == undefined) {
itemData.info.ammo = 0;
} else {
itemData.info.ammo != null ? itemData.info.ammo : 0;
}
if (itemData.info.attachments != null) {
var attachmentString = "";
$.each(itemData.info.attachments, function (i, attachment) {
if (i == itemData.info.attachments.length - 1) {
attachmentString += attachment.label;
} else {
attachmentString += attachment.label + ", ";
}
});
$(".item-info-description").html(
"<p><strong>Serial Number: </strong><span>" +
itemData.info.serie +
"</span></p><p><strong>Munition: </strong><span>" +
itemData.info.ammo +
"</span></p><p><strong>Attachments: </strong><span>" +
attachmentString +
"</span></p>"
);
} else {
$(".item-info-description").html(
"<p><strong>Serial Number: </strong><span>" +
itemData.info.serie +
"</span></p><p><strong>Munition: </strong><span>" +
itemData.info.ammo +
"</span></p><p>" +
itemData.description +
"</p>"
);
}
} else if (itemData.name == "filled_evidence_bag") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
if (itemData.info.type == "casing") {
$(".item-info-description").html(
"<p><strong>Evidence material: </strong><span>" +
itemData.info.label +
"</span></p><p><strong>Type number: </strong><span>" +
itemData.info.ammotype +
"</span></p><p><strong>Caliber: </strong><span>" +
itemData.info.ammolabel +
"</span></p><p><strong>Serial Number: </strong><span>" +
itemData.info.serie +
"</span></p><p><strong>Crime scene: </strong><span>" +
itemData.info.street +
"</span></p><br /><p>" +
itemData.description +
"</p>"
);
} else if (itemData.info.type == "blood") {
$(".item-info-description").html(
"<p><strong>Evidence material: </strong><span>" +
itemData.info.label +
"</span></p><p><strong>Blood type: </strong><span>" +
itemData.info.bloodtype +
"</span></p><p><strong>DNA Code: </strong><span>" +
itemData.info.dnalabel +
"</span></p><p><strong>Crime scene: </strong><span>" +
itemData.info.street +
"</span></p><br /><p>" +
itemData.description +
"</p>"
);
} else if (itemData.info.type == "fingerprint") {
$(".item-info-description").html(
"<p><strong>Evidence material: </strong><span>" +
itemData.info.label +
"</span></p><p><strong>Fingerprint: </strong><span>" +
itemData.info.fingerprint +
"</span></p><p><strong>Crime Scene: </strong><span>" +
itemData.info.street +
"</span></p><br /><p>" +
itemData.description +
"</p>"
);
} else if (itemData.info.type == "dna") {
$(".item-info-description").html(
"<p><strong>Evidence material: </strong><span>" +
itemData.info.label +
"</span></p><p><strong>DNA Code: </strong><span>" +
itemData.info.dnalabel +
"</span></p><br /><p>" +
itemData.description +
"</p>"
);
}
} else if (
itemData.info.costs != undefined &&
itemData.info.costs != null
) {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html("<p>" + itemData.info.costs + "</p>");
} else if (itemData.name == "stickynote") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html("<p>" + itemData.info.label + "</p>");
} else if (itemData.name == "moneybag") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html(
"<p><strong>Amount of cash: </strong><span>$" +
itemData.info.cash +
"</span></p>"
);
} else if (itemData.name == "markedbills") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html(
"<p><strong>Worth: </strong><span>$" +
itemData.info.worth +
"</span></p>"
);
} else if (itemData.name == "visa" || itemData.name == "creditcard") {
$(".item-info-title").html('<p>' + label + '</p>')
var str = "" + itemData.info.cardNumber + "";
var res = str.slice(12);
var cardNumber = "************" + res;
$(".item-info-description").html('<p><strong>Card Owner: </strong><span>' + itemData.info.ownerName + '</span></p><p><strong>Card Type: </strong><span>' + itemData.info.cardType + '</span></p><p><strong>Card Number: </strong><span>' + cardNumber + '</span></p>');
} else if (itemData.name == "motelkey" && itemData.info) {
$(".item-info-title").html('<p>' + label + '</p>')
$(".item-info-description").html('<p>Motel Key: ' + itemData.info.motel + '</p>');
} else if (itemData.name == "labkey") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html("<p>Lab: " + itemData.info.lab + "</p>");
} else if (itemData.name == "ls_liquid_meth" || itemData.name == "ls_meth") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html(
"<p><strong>Strain: </strong><span>" +
itemData.info.strain +
"</span></p><p><strong>Purity: </strong><span>" +
itemData.info.purity +
"%</span></p>"
);
} else if (itemData.name == "ls_ammonia" || itemData.name == "ls_iodine" || itemData.name == "ls_acetone") {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html(
"<p><strong>Remaining: </strong><span>" +
itemData.info.quality +
"%</span></p>"
);
} else {
$(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
$(".item-info-description").html("<p>" + itemData.description + "</p>");
}
} else {
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html("<p>" + itemData.description + "</p>");
}
}
const tableToString = (data) => {
let table = '<table class="table table-striped table-dark">';
for (const [key, value] of Object.entries(data)) {
table += `<tr><td>${key}</td><td>${value}</td></tr>`;
}
table += '</table>';
return table;
}

View file

@ -1,73 +0,0 @@
--[[
Welcome to the Seller Settings Configuration!
This section allows you to configure the in-game store items,
prices, and related settings. It includes options for item
selling and a vending system, as well as customizable blip
settings for each store location.
To configure each store:
- Define unique stores with specific items and prices.
- Set up blips that make stores visible on the map with
customizable icons, names, and account types for payments.
]]
Config.SellItems = {
['Seller item'] = { -- Store configuration for an in-game seller NPC
coords = vec3(2682.7588, 3284.8857, 55.2103), -- Location of the seller on the map
blip = { -- Blip settings for marking the seller location on the map
active = true, -- Enables or disables the blip visibility
name = 'Seller', -- Name displayed on the blip icon
sprite = 89, -- Icon type for the blip
color = 1, -- Color setting for the blip icon
scale = 0.5, -- Size scale of the blip icon
account = 'money' -- Account type associated with purchases (e.g., 'money', 'bank')
},
items = { -- Items available for sale in this store
{
name = 'sandwich', -- Name of the item in the store
price = 3, -- Sale price per item
amount = 1, -- Number of items available in this slot
info = {}, -- Additional information or metadata for the item
type = 'item', -- Type of inventory entity ('item' or 'weapon')
slot = 1 -- Position slot for this item in the store's inventory
},
{
name = 'tosti',
price = 2,
amount = 1,
info = {},
type = 'item',
slot = 2
},
{
name = 'water_bottle',
price = 2,
amount = 1,
info = {},
type = 'item',
slot = 3
},
}
},
['24/7'] = { -- Another store configuration, labeled '24/7'
coords = vec3(2679.9326, 3276.6897, 54.4058),
blip = {
active = true,
name = '24/7 Store',
sprite = 89,
color = 1,
scale = 0.5,
account = 'money'
},
items = {
{
name = 'tosti',
price = 1,
amount = 1,
info = {},
type = 'item',
slot = 1
},
}
}
}

View file

@ -1,42 +0,0 @@
--[[
This configuration system defines items that act as containers or boxes holding other items inside them.
For example, a cigarette box item that, when opened, contains multiple individual cigarettes inside. This allows for
immersive gameplay where items can act as mini-inventories. Players can interact with these containers, and the contents
are managed through the inventory system.
Each container (e.g., a box of cigarettes) has properties like maximum weight, number of slots, and predefined
contents. The configuration here enables you to customize the container's behavior, appearance, and its default items.
How it works:
- You define a "container" item (e.g., `cigarettebox`) with properties like weight, slots, and predefined items.
- When the container is opened, the items inside become accessible to the player.
- You can specify the default items that come pre-loaded inside the container, their properties, and interactions.
This system adds depth and realism to gameplay, making it ideal for roleplay servers or scenarios requiring inventory
complexity.
]]
Config.Storage = {
[1] = {
['name'] = "cigarettebox", -- The unique name/identifier of the container item.
['label'] = "Cigarette Box", -- The display name of the container in the inventory.
['weight'] = 50, -- The maximum weight that this container can hold. Set this lower than the container's weight to prevent self-nesting.
['slots'] = 1, -- The number of inventory slots available within the container. This limits how many different item types can fit.
['items'] = { -- Defines the default contents of the container when created or opened.
[1] = {
name = "cigarette", -- The unique name/identifier of the item stored inside the container.
label = "Cigarette", -- The display name of the item in the inventory.
description = "A single cigarette", -- A brief description of the item.
useable = true, -- Whether the item can be used directly by the player.
type = "item", -- The type of object; usually "item".
amount = 20, -- The default quantity of this item inside the container.
weight = 1, -- The weight of each individual item.
unique = false, -- Determines if the item is unique (e.g., has metadata that makes it non-stackable).
slot = 1, -- The slot number inside the container where this item will be stored.
info = {}, -- Additional metadata for the item, e.g., custom data or properties.
},
-- Add more items here.
}
},
-- Add more storages here.
}

View file

@ -1,133 +0,0 @@
--[[
Vehicle Configuration System!
This section enables custom configurations for vehicles in terms of ownership,
access to storage (trunks and gloveboxes), and weight capacities.
Key features:
- Allows for control over who can access vehicle trunks and gloveboxes.
- Includes the option to disable item usage and weapon storage within vehicles.
- Configures custom storage for specific vehicles.
- Supports unique vehicle setups like front-mounted trunks for certain car models.
]]
Config.IsVehicleOwned = false -- Only owned vehicles have saved trunk data if true.
Config.UseItemInVehicle = true -- Disables item usage inside vehicles when set to false.
Config.WeaponsOnVehicle = true -- Disables weapon storage in vehicles; setting to false can impact performance.
Config.OpenTrunkAll = true -- Enables all players to open any vehicle trunk. Set to false to restrict trunk access to vehicle owners only.
Config.OpenTrunkPolice = true -- Allows police to access trunks regardless of ownership restrictions (only applies if above is set to false).
Config.OpenTrunkPoliceGrade = 0 -- Minimum police grade required to access trunks (applicable only if restricted to owners).
Config.OpenGloveboxesAll = true -- Enables all players to access any vehicle glovebox. Set to false to restrict glovebox access to owners only.
Config.OpenGloveboxesPolice = true -- Allows police to access gloveboxes regardless of ownership restrictions (only applies if above is set to false).
Config.OpenGloveboxesPoliceGrade = 0 -- Minimum police grade required to access gloveboxes (applicable only if restricted to owners).
--[[
Config.VehicleClass:
Defines storage capacities for various vehicle classes.
Each class has settings for the glovebox and trunk, including maximum weight and slot capacity.
Classes refer to the vehicle type, as per the FiveM class list (https://docs.fivem.net/natives/?_0x29439776AAA00A62).
]]
Config.VehicleClass = {
-- Basic example:
-- [class_id] = {
-- ['glovebox'] = { maxweight = 100000, slots = 5 },
-- ['trunk'] = { maxweight = 38000, slots = 30 }
-- },
[0] = { ['glovebox'] = { maxweight = 15000, slots = 5 }, ['trunk'] = { maxweight = 30000, slots = 30 } },
[1] = { ['glovebox'] = { maxweight = 15000, slots = 5 }, ['trunk'] = { maxweight = 75000, slots = 40 } },
[2] = { ['glovebox'] = { maxweight = 15000, slots = 5 }, ['trunk'] = { maxweight = 80000, slots = 50 } },
[3] = { ['glovebox'] = { maxweight = 15000, slots = 5 }, ['trunk'] = { maxweight = 20000, slots = 30 } },
[4] = { ['glovebox'] = { maxweight = 15000, slots = 5 }, ['trunk'] = { maxweight = 70000, slots = 30 } },
[5] = { ['glovebox'] = { maxweight = 15000, slots = 5 }, ['trunk'] = { maxweight = 20000, slots = 20 } },
[6] = { ['glovebox'] = { maxweight = 15000, slots = 5 }, ['trunk'] = { maxweight = 50000, slots = 30 } },
[7] = { ['glovebox'] = { maxweight = 15000, slots = 5 }, ['trunk'] = { maxweight = 20000, slots = 20 } },
[8] = { ['glovebox'] = { maxweight = 1000, slots = 2 }, ['trunk'] = { maxweight = 5000, slots = 10 } },
[9] = { ['glovebox'] = { maxweight = 50000, slots = 5 }, ['trunk'] = { maxweight = 60000, slots = 35 } },
[10] = { ['glovebox'] = { maxweight = 50000, slots = 5 }, ['trunk'] = { maxweight = 60000, slots = 35 } },
[11] = { ['glovebox'] = { maxweight = 50000, slots = 5 }, ['trunk'] = { maxweight = 60000, slots = 35 } },
[12] = { ['glovebox'] = { maxweight = 50000, slots = 5 }, ['trunk'] = { maxweight = 140000, slots = 35 } },
[13] = { ['glovebox'] = { maxweight = 0, slots = 0 }, ['trunk'] = { maxweight = 0, slots = 0 } },
[14] = { ['glovebox'] = { maxweight = 50000, slots = 5 }, ['trunk'] = { maxweight = 50000, slots = 50 } },
[15] = { ['glovebox'] = { maxweight = 50000, slots = 5 }, ['trunk'] = { maxweight = 120000, slots = 50 } },
[16] = { ['glovebox'] = { maxweight = 50000, slots = 5 }, ['trunk'] = { maxweight = 120000, slots = 50 } },
[17] = { ['glovebox'] = { maxweight = 50000, slots = 5 }, ['trunk'] = { maxweight = 120000, slots = 50 } },
[18] = { ['glovebox'] = { maxweight = 50000, slots = 5 }, ['trunk'] = { maxweight = 120000, slots = 50 } },
[19] = { ['glovebox'] = { maxweight = 50000, slots = 5 }, ['trunk'] = { maxweight = 120000, slots = 50 } },
[20] = { ['glovebox'] = { maxweight = 50000, slots = 5 }, ['trunk'] = { maxweight = 200000, slots = 50 } }
}
-- Custom trunk storage settings for specific vehicles by model.
-- Defines storage capacities for particular vehicles regardless of class.
Config.CustomTrunk = {
[joaat('adder')] = { slots = 5, maxweight = 100000 },
[joaat('trailers')] = { slots = 100, maxweight = 250000 },
[joaat('trailers3')] = { slots = 100, maxweight = 250000 },
[joaat('trailers2')] = { slots = 100, maxweight = 250000 },
[joaat('trailers4')] = { slots = 100, maxweight = 250000 },
[joaat('trailersmall')] = { slots = 50, maxweight = 100000 },
[joaat('pounder2')] = { slots = 50, maxweight = 200000 },
[joaat('pounder')] = { slots = 50, maxweight = 200000 },
[joaat('Hauler')] = { slots = 0, maxweight = 0 },
[joaat('Phantom2')] = { slots = 0, maxweight = 0 },
[joaat('Phantom')] = { slots = 0, maxweight = 0 },
[joaat('brickade')] = { slots = 0, maxweight = 200000 },
}
-- Custom glovebox storage settings for specific vehicles by model.
-- Defines glovebox capacities for particular vehicles regardless of class.
Config.CustomGlovebox = {
[joaat('adder')] = { slots = 5, maxweight = 100000 },
[joaat('pounder2')] = { slots = 5, maxweight = 50000 },
[joaat('Phantom2')] = { slots = 5, maxweight = 50000 },
[joaat('Phantom')] = { slots = 5, maxweight = 50000 },
[joaat('Hauler')] = { slots = 5, maxweight = 50000 },
}
--[[
Config.BackEngineVehicles:
For vehicles with rear-engine setups, enabling the trunk at the front of the vehicle.
These models require the trunk to be accessed from the front.
]]
Config.BackEngineVehicles = {
[`ninef`] = true,
[`adder`] = true,
[`vagner`] = true,
[`t20`] = true,
[`infernus`] = true,
[`zentorno`] = true,
[`reaper`] = true,
[`comet2`] = true,
[`comet3`] = true,
[`jester`] = true,
[`jester2`] = true,
[`cheetah`] = true,
[`cheetah2`] = true,
[`prototipo`] = true,
[`turismor`] = true,
[`pfister811`] = true,
[`ardent`] = true,
[`nero`] = true,
[`nero2`] = true,
[`tempesta`] = true,
[`vacca`] = true,
[`bullet`] = true,
[`osiris`] = true,
[`entityxf`] = true,
[`turismo2`] = true,
[`fmj`] = true,
[`re7b`] = true,
[`tyrus`] = true,
[`italigtb`] = true,
[`penetrator`] = true,
[`monroe`] = true,
[`ninef2`] = true,
[`stingergt`] = true,
[`surfer`] = true,
[`surfer2`] = true,
[`gp1`] = true,
[`autarch`] = true,
[`tyrant`] = true,
-- Additional vehicle models with front-access trunks...
}

View file

@ -1,226 +0,0 @@
--[[
Vending Machine Configuration
This section allows you to configure vending machines, including the item categories
they offer, specific items within each category, and the models of vending machines used.
Main elements:
- `Config.VendingMachines`: Defines categories of items available in vending machines and
specifies each item within those categories.
- `Config.Vendings`: Lists the vending machine models in the game world and assigns each
to a specific item category, enabling targeted interaction based on machine type.
]]
Config.VendingMachines = {
['drinks'] = { -- Category: Drinks
['Label'] = 'Drinks',
['Items'] = {
[1] = {
['name'] = 'ecola_dose', -- Item name (as it appears in inventory system)
['price'] = 4, -- Price of the item
['amount'] = 50, -- Available stock for each machine reset or refill
['info'] = {}, -- Additional info, usually empty unless specific details required
['type'] = 'item', -- Type of entry, typically 'item' for consumables
['slot'] = 1 -- Slot in the vending menu
},
[2] = {
['name'] = 'ecola_zero_dose',
['price'] = 4,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
[3] = {
['name'] = 'sprunk_dose',
['price'] = 4,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
[4] = {
['name'] = 'sprunk_zero_dose',
['price'] = 4,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
[5] = {
['name'] = 'orange_o_tang_dose',
['price'] = 4,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
[6] = {
['name'] = 'orange_o_tang_zero_dose',
['price'] = 4,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
}
},
['snack'] = { -- Category: Candy
['Label'] = 'Snacks',
['Items'] = {
[1] = {
['name'] = 'snikkel_candy', -- Item name for candy machine
['price'] = 4,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
[2] = {
['name'] = 'twerks_candy', -- Item name for candy machine
['price'] = 4,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
[3] = {
['name'] = 'tims_instant_nudeln', -- Item name for snack machine
['price'] = 6,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
}
},
['coffee'] = { -- Category: Coffee
['Label'] = 'Heiße Getränke',
['Items'] = {
[1] = {
['name'] = 'billokaffee', -- Coffee item for coffee vending machines
['price'] = 4,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
[2] = {
['name'] = 'kakao', -- Coffee item for coffee vending machines
['price'] = 4,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
}
},
['energy'] = { -- Category: energy
['Label'] = 'Energy',
['Items'] = {
[1] = {
['name'] = 'junk_energy',
['price'] = 4,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
}
},
['cig'] = { -- Category: energy
['Label'] = 'Zigaretten',
['Items'] = {
[1] = {
['name'] = 'redwoodpack',
['price'] = 10,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
}
},
['beer'] = { -- Category: energy
['Label'] = 'Bier',
['Items'] = {
[1] = {
['name'] = 'pißwasser',
['price'] = 10,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
}
},
['water'] = { -- Category: Water
['Label'] = 'Wasser',
['Items'] = {
[1] = {
['name'] = 'water_bottle', -- Water bottle available in water machines
['price'] = 4,
['amount'] = 50,
['info'] = {},
['type'] = 'item',
['slot'] = 1
},
}
},
}
Config.Vendings = {
[1] = {
['Model'] = 'prop_vend_coffe_01', -- Prop model for coffee vending machine
['Category'] = 'coffee', -- Linked to coffee items in Config.VendingMachines
},
[2] = {
['Model'] = 'prop_vend_water_01', -- Model for water vending machine
['Category'] = 'water', -- Linked to water items
},
[3] = {
['Model'] = 'prop_watercooler', -- Model for standard water cooler
['Category'] = 'water', -- Also linked to water category
},
[4] = {
['Model'] = 'prop_watercooler_Dark', -- Model for a darker water cooler variant
['Category'] = 'water', -- Linked to water items as well
},
[5] = {
['Model'] = 'prop_vend_snak_01', -- Model for snack vending machine
['Category'] = 'snack',
},
[6] = {
['Model'] = 'prop_vend_snak_01_tu', -- Another variant of the snack machine
['Category'] = 'snack',
},
[7] = {
['Model'] = 'prop_vend_fridge01', -- Model for fridge vending machine
['Category'] = 'drinks', -- Linked to drink items
},
[8] = {
['Model'] = 'prop_vend_soda_01', -- Soda vending machine model 1
['Category'] = 'drinks', -- Linked to drinks
},
[9] = {
['Model'] = 'prop_vend_soda_02', -- Soda vending machine model 2
['Category'] = 'drinks' -- Linked to drinks category
},
[10] = {
['Model'] = 'm23_2_prop_m32_vend_drink_01a', -- Soda vending machine model 2
['Category'] = 'energy' -- Linked to drinks category
},
[11] = {
['Model'] = 'sf_prop_sf_vend_drink_01a', -- Soda vending machine model 2
['Category'] = 'energy' -- Linked to drinks category
},
[12] = {
['Model'] = 'prop_vend_fags_01a', -- Cig vending machine
['Category'] = 'cig' -- Linked to cig category
},
[13] = {
['Model'] = 'bzzz_prop_beer_machine', -- Beer vending machine
['Category'] = 'beer' -- Linked to beer category
},
}

File diff suppressed because it is too large Load diff

View file

@ -1,87 +0,0 @@
fx_version 'cerulean'
game 'gta5'
lua54 'yes'
version '3.3.87'
data_file 'WEAPONINFO_FILE_PATCH' 'weaponsnspistol.meta'
-- 'http://127.0.0.1:5500/html/ui.html'
ui_page 'html/ui.html'
ox_libs {
'table',
}
files {
'config/*.js',
'html/ui.html',
'html/css/*.css',
'html/js/*.js',
'html/js/modules/*.js',
'html/images/*.png',
'html/images/*.jpg',
'html/cloth/*.png',
'html/icons/**',
'html/font/**',
'html/*.ttf',
'weaponsnspistol.meta',
'html/sounds/*.wav',
}
shared_scripts {
'@ox_lib/init.lua',
'shared/*.lua',
'config/*.lua',
'locales/*.lua',
}
client_script {
'client/custom/framework/*.lua',
'client/*.lua',
'client/modules/*.lua',
'client/custom/misc/*.lua',
'client/custom/target/*.lua',
'client/custom/provider/*.lua'
}
server_scripts {
'@oxmysql/lib/MySQL.lua',
'server/custom/framework/*.lua',
'server/custom/webhook/*.lua',
'server/*.lua',
'server/modules/*.lua',
'server/custom/**/**.lua',
}
escrow_ignore {
'shared/items.lua',
'shared/weapons.lua',
'config/*.lua',
'locales/*.lua',
'client/custom/framework/*.lua',
'client/custom/misc/*.lua',
'client/custom/target/*.lua',
'client/custom/provider/*.lua',
'client/modules/suggestion.lua',
'server/custom/framework/*.lua',
'server/custom/webhook/*.lua',
'server/custom/misc/*.lua',
'client/modules/weapons.lua',
'server/modules/weapons.lua',
}
dependencies {
'/server:4752', -- ⚠PLEASE READ⚠ This requires at least server build 4700 or higher
'ox_lib', -- Required
}
provide {
-- 'ox_inventory' -- Uncomment this line only if you have qbx but better way is the remove 'ox_inventory' dependency on every scripts.
}
dependency '/assetpacks'
dependency '/assetpacks'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Some files were not shown because too many files have changed in this diff Show more