# Installation



## Dependencies :

<details>

<summary>ES-EXTENDED</summary>

You will need the latest version of [es\_extended](https://github.com/ESX-Official/es_extended).

* Extract the contents of the archive to your resources folder.

- Start the resource near the top of your resources in your server.cfg.

</details>

***

## Inventories : &#x20;

<details>

<summary>QB-INVENTORY</summary>

Add the items below to the qb-core/shared/items.lua:&#x20;

```
    --advanced washmoney
    wm_fan             = { name = 'wm_fan', label = 'Fan', weight = 100, type = 'item', image = 'wm_fan.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Fan.' },
    wm_generator       = { name = 'wm_generator', label = 'Generator', weight = 100, type = 'item', image = 'wm_generator.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Generator.' },
    wm_basket          = { name = 'wm_basket', label = 'Basket', weight = 100, type = 'item', image = 'wm_basket.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Basket.' },
    wm_washmachine     = { name = 'wm_washmachine', label = 'Washmachine', weight = 100, type = 'item', image = 'wm_washmachine.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Washmachine.' },
    wm_fuel            = { name = 'wm_fuel', label = 'Gasoline', weight = 100, type = 'item', image = 'wm_fuel.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Gasoline.' },
```

</details>

<details>

<summary>OX_INVENTORY</summary>

Add the items below into your ox-inventory/data/items.lua

```lua
	["wm_washmachine"] = {
		label = "Washmachine",
		weight = 100,
		stack = false,
		close = true,
		description = "Washmachine.",
		client = {
			image = "wm_washmachine.png",
		}
	},

	["wm_basket"] = {
		label = "Basket",
		weight = 100,
		stack = false,
		close = true,
		description = "Basket.",
		client = {
			image = "wm_basket.png",
		}
	},

	["wm_generator"] = {
		label = "Generator",
		weight = 100,
		stack = false,
		close = true,
		description = "Generator.",
		client = {
			image = "wm_generator.png",
		}
	},

	["wm_fan"] = {
		label = "Fan",
		weight = 100,
		stack = false,
		close = true,
		description = "Fan.",
		client = {
			image = "wm_fan.png",
		}
	},
	["wm_fuel"] = {
		label = "Fuel",
		weight = 100,
		stack = true,
		close = true,
		description = "Fuel.",
		client = {
			image = "wm_fuel.png",
		}
	},
```

Add this into ox\_inventory/modules/items/client.lua

```lua
local WMProps = {
    ['washmachine']     = { on = 'bkr_prop_prtmachine_dryer_spin', off = 'bkr_prop_prtmachine_dryer_op'},
    ['generator']       = { prop = 'prop_generator_01a'},
    ['fan']             = { prop = 'prop_aircon_s_04a'},
    ['basket']          = { prop = 'v_res_fh_laundrybasket'},
	-- in case you don't like the prop or the prop not loading you can change from here : https://forge.plebmasters.de/objects
}

Item('wm_washmachine', function(data, slot)
	ox_inventory:useItem(data, function(data)
		if data then
			TriggerEvent('zat-advancedwashmoney:client:PreviewProp', "wm_washmachine", WMProps['washmachine'].off, slot.metadata)
		end
	end)
end)

Item('wm_basket', function(data, slot)
	ox_inventory:useItem(data, function(data)
		if data then
			TriggerEvent('zat-advancedwashmoney:client:PreviewProp', "wm_basket", WMProps['basket'].prop, slot.metadata)
		end
	end)
end)

Item('wm_generator', function(data, slot)
	ox_inventory:useItem(data, function(data)
		if data then
			TriggerEvent('zat-advancedwashmoney:client:PreviewProp', "wm_generator", WMProps['generator'].prop, slot.metadata)
		end
	end)
end)

Item('wm_fan', function(data, slot)
	ox_inventory:useItem(data, function(data)
		if data then
			TriggerEvent('zat-advancedwashmoney:client:PreviewProp', "wm_fan", WMProps['fan'].prop, slot.metadata)
		end
	end)
end)
```

</details>

<details>

<summary>QS-INVENTORY</summary>

Add the items below into your qs-inventory/shared/items.lua

```lua
['wm_washmachine'] = {
    ['name'] = 'wm_washmachine',
    ['label'] = 'Washmachine',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'wm_washmachine.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Washmachine.'
},

['wm_basket'] = {
    ['name'] = 'wm_basket',
    ['label'] = 'Basket',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'wm_basket.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Basket.'
},

['wm_generator'] = {
    ['name'] = 'wm_generator',
    ['label'] = 'Generator',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'wm_generator.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Generator.'
},

['wm_fan'] = {
    ['name'] = 'wm_fan',
    ['label'] = 'Fan',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'wm_fan.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Fan.'
},

['wm_fuel'] = {
    ['name'] = 'wm_fuel',
    ['label'] = 'Fuel',
    ['weight'] = 100,
    ['type'] = 'item',
    ['image'] = 'wm_fuel.png',
    ['unique'] = false,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['combinable'] = nil,
    ['description'] = 'Fuel.'
},

```

Add this into qs-inventory/server/custom/misc/CreateUseableItem.lua

```lua
local WMProps = {
    ['washmachine']     = { on = 'bkr_prop_prtmachine_dryer_spin', off = 'bkr_prop_prtmachine_dryer_op'},
    ['generator']       = { prop = 'prop_generator_01a'},
    ['fan']             = { prop = 'prop_aircon_s_04a'},
    ['basket']          = { prop = 'v_res_fh_laundrybasket'},
}

-- Washmachine
CreateUsableItem('wm_washmachine', function(source, item)
    local src = source
    local metadata = item.metadata or {}
    TriggerClientEvent('zat-advancedwashmoney:client:PreviewProp', src, "wm_washmachine", WMProps['washmachine'].off, metadata)
end)

-- Basket
CreateUsableItem('wm_basket', function(source, item)
    local src = source
    local metadata = item.metadata or {}
    TriggerClientEvent('zat-advancedwashmoney:client:PreviewProp', src, "wm_basket", WMProps['basket'].prop, metadata)
end)

-- Generator
CreateUsableItem('wm_generator', function(source, item)
    local src = source
    local metadata = item.metadata or {}
    TriggerClientEvent('zat-advancedwashmoney:client:PreviewProp', src, "wm_generator", WMProps['generator'].prop, metadata)
end)

-- Fan
CreateUsableItem('wm_fan', function(source, item)
    local src = source
    local metadata = item.metadata or {}
    TriggerClientEvent('zat-advancedwashmoney:client:PreviewProp', src, "wm_fan", WMProps['fan'].prop, metadata)
end)

-- Fuel
CreateUsableItem('wm_fuel', function(source, item)
    local src = source
    local metadata = item.metadata or {}
    TriggerClientEvent('zat-advancedwashmoney:client:PreviewProp', src, "wm_fuel", nil, metadata)
end)

```

</details>



***

## ADDITIONAL SETUP

<details>

<summary>IMAGES</summary>

* Copy the contents of the `[images]` folder into your inventory's image directory.

</details>

<details>

<summary>SQL</summary>

* Import the SQLs from the \[sql] folder into your database

</details>

## ENSURE RESOURCES

* [ ] ensure zat-gizmo
* [ ] ensure zat-gizmo\_ui
* [ ] ensure zat-advancedmoneywash

