[FREE][QBCORE] Loot Crates

This resource lets you create usable loot crates, that will drop items that you associate with them.

Loot Crates

  • Custom weighted chances to drop specific items
  • Use local or remote images for spinner
  • Create multiple cases, each with the own set of items
  • Randomized, server-sided item selection and validation
  • Included several CSGO case inventory images, and included 2 creates as an example in the config

Credit

  • Dimka Zheleznov for the UI code and posting it to codepen. Wherever you are, hats off to you. I absolutely copied near-100% to make this work.

Dependencies

qb-core
qb-inventory

Free

GITHUB

Preview

Case Opening

Config

Cases

13 Likes

Great job, as always. :smiley:

I’ll do the ESX version if it doesn’t cause any problems.

1 Like

is there any way to add cars to ?

1 Like

is there a way to add a amount of one particular item you win, for example 10 waterbottles

I can add that. Good idea!

Go to config.lua and add for each item this line:
amount = ‘2’,
This should look like this:
[1] = {
item = ‘weapon_p226’, --Item name in your inventory. Can be any item.
amount = ‘2’,
image = ‘img/weapon_p226.png’, --Image location of item. This can also be changed to a remote image, ex ‘https://i.imgur.com/aCTLp4L.png
weight = 70 --Weighted chance of item dropping. Higher the number, higher the chance. 70/100 == high chance, common. 5/100 == low chance, rare. Duh.
},

NOTICE! You need to add the amount line to each item !

Then go to server/main.lua and edit line 29 to be like this:
if Player.Functions.AddItem(Config.Rewards[k][random][‘item’], Config.Rewards[k][random][‘amount’]) then

I’m not tested but must to work!

Mine looks like this:

Can you make it for standart esx iventory

can you share this?

Anybody have a clean version of a Loot Crate system willing to pay PM me

sorry I’m late to respond but I will try it out thank you so much

how did add the vehicles sir?

I put my modified version of this script here, is not finished and i will not provide support because i don’t have time for that.

Is not completed but can be completed very easy.

Have fun!

3 Likes

do u mind sharing how u added ur own ui ect