# Installation

## Dependencies :

<details>

<summary>QBCore</summary>

You will need the latest version of [qb-core](https://github.com/qbcore-framework/qb-core)

* Extract the contents of the archive to your resources folder.
* Start the resource near the top of your resources in your server.cfg.

</details>

<details>

<summary>INTERACT OR TARGET</summary>

You will need the latest version of [Interact](https://github.com/darktrovx/interact) or [qb-target](https://github.com/qbcore-framework/qb-target)

* 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 :

<details>

<summary>QB INVENTORY</summary>

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

```lua
    -- ATMs    
    atmcardreader         = { name = 'atmcardreader',                   label = 'ATM Card Reader',                   weight = 100,       type = 'item',      image = 'atmcardreader.png',                                           unique = true, useable = true,     shouldClose = true,    combinable = nil,   description = 'ATM Card Reader' }, 
    datatablet            = { name = 'datatablet',                      label = 'Data Tablet',                       weight = 100,       type = 'item',      image = 'datatablet.png',                                              unique = true, useable = true,     shouldClose = true,    combinable = nil,   description = 'Data Tablet' }, 
    atmusb                = { name = 'atmusb',                          label = 'USB',                               weight = 100,       type = 'item',      image = 'atmusb.png',                                                  unique = true, useable = true,     shouldClose = true,    combinable = nil,   description = 'USB' }, 


```

Add this into your qb-inventory js file:&#x20;

```javascript
        case "atmusb":
            if (itemData.info.used != null){
                return `<p><strong>Storage: </strong><span>${itemData.info.used}/${itemData.info.max}</span></p>`;
            }
```

</details>

<details>

<summary>QS INVENTORY</summary>

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

```lua
   ['atmcardreader']                  = {
        ['name'] = 'atmcardreader',
        ['label'] = 'ATM Card Reader',
        ['weight'] = 0,
        ['type'] = 'item',
        ['image'] = 'atmcardreader.png',
        ['unique'] = true,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil,
        ['description'] = 'ATM Card Reader...'
    },
    ['datatablet']                  = {
        ['name'] = 'datatablet',
        ['label'] = 'Data Tablet',
        ['weight'] = 0,
        ['type'] = 'item',
        ['image'] = 'datatablet.png',
        ['unique'] = true,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil,
        ['description'] = 'Data Tablet...'
    },
    ['atmusb']                  = {
        ['name'] = 'atmusb',
        ['label'] = 'USB',
        ['weight'] = 0,
        ['type'] = 'item',
        ['image'] = 'atmusb.png',
        ['unique'] = true,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil,
        ['description'] = 'USB...'
    },
```

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

```lua
CreateUsableItem('datatablet', function(source, item)
    local src = source
    TriggerClientEvent("zat-atmheist:client:ToggleTablet", src)
end)
```

Add this into qs-inventory/config/metadata.js

```javascript
        } else if (itemData.name == "atmusb") {
            $(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
            if (itemData.info.used != null){
                $(".item-info-description").html(
                    "<p>Storage : " + itemData.info.used + " / " + itemData.info.max + "</p>"
                );
            }
```

</details>

<details>

<summary>OX INVENTORY</summary>

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

```lua

	["atmcardreader"] = {
		label = "ATM Card Reader",
		weight = 100,
		stack = false,
		close = true,
		description = "ATM Card Reader",
		client = {
			image = "atmcardreader.png",
		}
	},

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

	["datatablet"] = {
		label = "Data Tablet",
		weight = 100,
		stack = false,
		close = true,
		description = "Data Tablet",
		client = {
			image = "datatablet.png",
		}
	},

```

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

```lua

Item('datatablet', function(data, slot)
	ox_inventory:useItem(data, function(data)
		if data then
			TriggerEvent("zat-atmheist:client:ToggleTablet")
		end
	end)
end)

```

</details>

***

## ENSURE RESOURCES

* [ ] ensure zat-atmheist
