Installation

Welcome to MBT Meta Clothes Installation Guide!

1. Before starting

Welcome to the MBT Meta Clothes installation guide, this resource giving you the possibility to turn your clothes into unique items.

Undress yourself using a clean and simple NUI and have fun swapping your outfits with your friends!

Therefore you must carefully follow all the steps that you will see in this installation guide.

2. Asset download

To get started, you'll need to download your new resource from malibu-tech.tebex or out official Github page. For that we must log in with our account at keymaster and look for the Asset grants section, there we will find our complete package.

Updates will be announced via Changelog in our community

3. Dependencies

4. Asset positioning

It is important to maintain a good order on our server, either in folders or in our cfg file, where we will place the start of our resources.

Example

ensure ox_lib
ensure ox_inventory
ensure mbt_meta_clothes
OTHERS SCRIPTS

5. Database installation

For this step, we always recommend making sure you have the latest version of mysql on your computer or dedicated server, with this we make sure that the import of the sql file works successfully.

6. Items configuration

  • ox_inventory/data/items.lua

['topdress'] = {
		label 		= 'Top Dress',
		description = 'YOUR_DESCRIPTION',
		weight 		= 100,
		stack 		= true,
		close 		= true,
		client = {
			anim = { dict = 'clothingshirt', clip = 'try_shirt_positive_d', flag = 51 },
			usetime = 1200,
		}
	},
  ['jacket'] = {
		label 		= 'Jacket',
		description = 'YOUR_DESCRIPTION',
		weight 		= 100,
		stack 		= true,
		close 		= true,
		client = {
			anim = { dict = 'clothingshirt', clip = 'try_shirt_positive_d', flag = 51 },
			usetime = 1200,
		}
	},
  ['trousers'] = {
		label 		= 'Trousers',
		description = 'YOUR_DESCRIPTION',
		weight 		= 100,
		stack 		= true,
		close 		= true,
		client = {
			anim = { dict = 're@construction', clip = 'out_of_breath', flag = 51 },
			usetime = 1200,
		}
	},
  ['shoes'] = {
		label 		= 'Shoes',
		description = 'YOUR_DESCRIPTION',
		weight 		= 100,
		stack 		= true,
		close 		= true,
		client = {
			anim = { dict = 'random@domestic', clip = 'pickup_low', flag = 0 },
			usetime = 1200,
		}
	},
  ['hat'] = {
		label 		= 'Hat',
		description = 'YOUR_DESCRIPTION',
		weight 		= 100,
		stack 		= true,
		close 		= true,
		client = {
			anim = { dict = 'missheist_agency2ahelmet', clip = 'take_off_helmet_stand', flag = 51 },
			usetime = 1200,
		}
	},
  ['glasses'] = {
		label 		= 'Glasses',
		description = 'YOUR_DESCRIPTION',
		weight 		= 100,
		stack 		= true,
		close 		= true,
		client = {
			anim = { dict = 'clothingspecs', clip = 'take_off', flag = 51 },
			usetime = 1200,
		}
	},
  ['earaccess'] = {
		label 		= 'Ear Accessories',
		description = 'YOUR_DESCRIPTION',
		weight 		= 100,
		stack 		= true,
		close 		= true,
		client = {
			anim = { dict = 'mp_cp_stolen_tut', clip = 'b_think', flag = 51 },
			usetime = 1200,
		}
	},
  ['chain'] = {
		label 		= 'Torso Accessories',
		description = 'Torso Accessories',
		weight 		= 100,
		stack 		= true,
		close 		= true,
		client = {
			anim = { dict = 'clothingtie', clip = 'try_tie_positive_a', flag = 51 },
			usetime = 2500,
		}
	},
  ['watch'] = {
		label 		= 'Watch',
		description = 'Watch',
		weight 		= 100,
		stack 		= true,
		close 		= true,
		client = {
			anim = { dict = 'nmt_3_rcm-10', clip = 'cs_nigel_dual-10', flag = 51 },
			usetime = 900,
		}
	},
  • ox_inventory/data/items.lua

Item('topdress', function(data, slot)
	local sexLabel = { ["m"] = "man", ["f"] = "woman"}
	if PlayerData.sex ~= slot.metadata.sex then 
    	-- Trigger your notify here
    	-- Text: This piece of clothing is not for "..sexLabel[PlayerData.sex]
	end

	TriggerEvent("mbt_metaclothes:checkDress", {
		type = "Drawables",
		index = slot.metadata,
		sex = PlayerData.sex,
		cb = function(canDress)
			if not canDress then
				-- Trigger your notify here
				return 
			end 
			
			ox_inventory:useItem(data, function(data)
				if data then
					TriggerEvent("mbt_metaclothes:applyKitDress", slot.metadata)
				end
			end)
		end
	})
end)

Item('trousers', function(data, slot)
	local sexLabel = { ["m"] = "man", ["f"] = "woman"}
	if PlayerData.sex ~= slot.metadata.sex then
	  	-- Trigger your notify here
    	-- Text: This piece of clothing is not for "..sexLabel[PlayerData.sex]     
	end
  
	TriggerEvent("mbt_metaclothes:checkDress", {
		type = "Drawables",
		index = slot.metadata.index, 
		sex = PlayerData.sex,
		cb = function(canDress)
			if not canDress then
				-- Trigger your notify here
				return 
			end 
			
			ox_inventory:useItem(data, function(data)
				if data then
					TriggerEvent("mbt_metaclothes:applyDress", slot.metadata)
				end
			end)
		end
	})
end)

Item('shoes', function(data, slot)
	local sexLabel = { ["m"] = "man", ["f"] = "woman"}
	if PlayerData.sex ~= slot.metadata.sex then
		-- Trigger your notify here
    	-- Text: This piece of clothing is not for "..sexLabel[PlayerData.sex]    
	end
	
	TriggerEvent("mbt_metaclothes:checkDress", {
		type = "Drawables",
		index = slot.metadata.index, 
		sex = PlayerData.sex,
		cb = function(canDress)
			if not canDress then
				-- Trigger your notify here
				return 
			end 
			
			ox_inventory:useItem(data, function(data)
				if data then
					TriggerEvent("mbt_metaclothes:applyDress", slot.metadata)
				end
			end)
		end
	})
end)

Item('chain', function(data, slot)
	local sexLabel = { ["m"] = "man", ["f"] = "woman"}
	if PlayerData.sex ~= slot.metadata.sex then
	  	-- Trigger your notify here
    	-- Text: This piece of clothing is not for "..sexLabel[PlayerData.sex]     
	end
  
	TriggerEvent("mbt_metaclothes:checkDress", {
		type = "Drawables",
		index = slot.metadata.index, 
		sex = PlayerData.sex,
		cb = function(canDress)
			if not canDress then
				-- Trigger your notify here
				return 
			end 
			
			ox_inventory:useItem(data, function(data)
				if data then
					TriggerEvent("mbt_metaclothes:applyProps", slot.metadata)
				end
			end)
		end
	})
end)

Item('watch', function(data, slot)
	local sexLabel = { ["m"] = "man", ["f"] = "woman"}
	if PlayerData.sex ~= slot.metadata.sex then
		-- Trigger your notify here
   		-- Text: This piece of clothing is not for "..sexLabel[PlayerData.sex]   
	end
  
	TriggerEvent("mbt_metaclothes:checkDress", {
		type = "Props",
		index = slot.metadata.index, 
		sex = PlayerData.sex,
		cb = function(canDress)
			if not canDress then
				-- Trigger your notify here
				return 
			end 
			
			ox_inventory:useItem(data, function(data)
				if data then
					TriggerEvent("mbt_metaclothes:applyProps", slot.metadata)
				end
			end)
		end
	})
end)

Item('hat', function(data, slot)
	local sexLabel = { ["m"] = "man", ["f"] = "woman"}
	if PlayerData.sex ~= slot.metadata.sex then
		-- Trigger your notify here
   		-- Text: This piece of clothing is not for "..sexLabel[PlayerData.sex]   
	end
  
	TriggerEvent("mbt_metaclothes:checkDress", {
		type = "Props",
		index = slot.metadata.index, 
		sex = PlayerData.sex,
		cb = function(canDress)
			if not canDress then
				-- Trigger your notify here
				return 
			end 
			
			ox_inventory:useItem(data, function(data)
				if data then
					TriggerEvent("mbt_metaclothes:applyProps", slot.metadata)
				end
			end)
		end
	})
end)

Item('glasses', function(data, slot)
	local sexLabel = { ["m"] = "man", ["f"] = "woman"}
	if PlayerData.sex ~= slot.metadata.sex then
		-- Trigger your notify here
    	-- Text: This piece of clothing is not for "..sexLabel[PlayerData.sex]      
	end
  
	TriggerEvent("mbt_metaclothes:checkDress", {
		type = "Props",
		index = slot.metadata.index, 
		sex = PlayerData.sex,
		cb = function(canDress)
			if not canDress then
				-- Trigger your notify here
				return 
			end 
			
			ox_inventory:useItem(data, function(data)
				if data then
					TriggerEvent("mbt_metaclothes:applyProps", slot.metadata)
				end
			end)
		end
	})
end)

Item('earaccess', function(data, slot)
	local sexLabel = { ["m"] = "man", ["f"] = "woman"}
	if PlayerData.sex ~= slot.metadata.sex then
		-- Trigger your notify here
    	-- Text: This piece of clothing is not for "..sexLabel[PlayerData.sex]      
	end
  
	TriggerEvent("mbt_metaclothes:checkDress", {
		type = "Props",
		index = slot.metadata.index, 
		sex = PlayerData.sex,
		cb = function(canDress)
			if not canDress then
				-- Trigger your notify here
				return 
			end 
			
			ox_inventory:useItem(data, function(data)
				if data then
					TriggerEvent("mbt_metaclothes:applyProps", slot.metadata)
				end
			end)
		end
	})
end)

7. Asset configuration

We are already in the final stretch of this installation, so all that remains is to configure the asset to our liking, in config.lua we will find all the necessary configurations explained in Configuration Page.

Last updated