Clothing System

Quasar Inventory now brings a clothing system that was requested by multiple customers in our community, which is based on turning any clothing store into a clothing store with metadata, the metadata will share information between players and each garment will have its own data, allowing us to use different clothes as items.

If you use qbcore, add the following items in qb-core/shared/items.lua

If we use qb-core, we will not have these items by default, therefore we will have to add them before using the clothing system.

['tshirt'] 						 = {['name'] = 'tshirt', 						['label'] = 'T-shirt', 					['weight'] = 0, 		['type'] = 'item', 		['image'] = 'tshirt.png', 			['unique'] = true, 		['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Tshirt'},
['torso'] 						 = {['name'] = 'torso', 						['label'] = 'Torso', 					['weight'] = 0, 		['type'] = 'item', 		['image'] = 'torso.png', 			['unique'] = true, 		['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Torso'},
['arms'] 						 = {['name'] = 'arms', 							['label'] = 'Arms', 					['weight'] = 0, 		['type'] = 'item', 		['image'] = 'arms.png', 			['unique'] = true, 		['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Arms'},
['jeans'] 						 = {['name'] = 'jeans', 						['label'] = 'Jeans', 					['weight'] = 0, 		['type'] = 'item', 		['image'] = 'jeans.png', 			['unique'] = true, 		['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Jeans'},
['shoes'] 						 = {['name'] = 'shoes', 						['label'] = 'Shoes', 					['weight'] = 0, 		['type'] = 'item', 		['image'] = 'shoes.png', 			['unique'] = true, 		['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Shoes'},
['mask'] 						 = {['name'] = 'mask', 							['label'] = 'Mask', 					['weight'] = 0, 		['type'] = 'item', 		['image'] = 'mask.png', 			['unique'] = true, 		['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Mask'},
['ears'] 						 = {['name'] = 'ears', 							['label'] = 'Ears', 					['weight'] = 0, 		['type'] = 'item', 		['image'] = 'ears.png', 			['unique'] = true, 		['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Ears'},
['glasses'] 					         = {['name'] = 'glasses', 						['label'] = 'Glasses', 					['weight'] = 0, 		['type'] = 'item', 		['image'] = 'glasses.png', 			['unique'] = true, 		['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Glasses'},
['helmet'] 						 = {['name'] = 'helmet', 						['label'] = 'Helmet', 					['weight'] = 0, 		['type'] = 'item', 		['image'] = 'helmet.png', 			['unique'] = true, 		['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Helmet'},
['bag'] 						 = {['name'] = 'bag', 							['label'] = 'Bag', 					['weight'] = 0, 		['type'] = 'item', 		['image'] = 'bag.png', 				['unique'] = true, 		['useable'] = true, 	['shouldClose'] = true,	   ['combinable'] = nil,   ['description'] = 'Bag'},
I receive thousands of garments when entering my clothing system

If this is your case, then I do not apply the exports correctly, since the system contains a loop that is interrupted by the corresponding export and starts again once the store closes.

Use the export correctly or contact your clothing store supplier, if the system is free you can ask a developer to do it for you if you don't have the programming skills.

Can I deactivate the following feature from my inventory?

Of course, you can disable this function and the inventory button using Config.Clothing, which will not allow the use of clothes as items.


Exports for clothing use

We will have to make a small modification in our clothing system, although many paid clothing systems will already bring this modification by default, if not ask the creator of your clothing store system and he will help you without hesitation.

To use this feature, we must first understand how it works. Our asset has a loop that will constantly check your clothes, that way you will always have your clothes as items within our NUI. But when you open your clothing store, you will have to stop said loop using a unique export from our system, and rerun this loop once your clothing menu is closed, then we attach the event to open your clothing store and to close it:

exports['qs-inventory']:setInClothing(true)

Note that this export will only work on the client side.

Last updated