# 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>

<details>

<summary>XSOUND</summary>

You will need the latest version of [xsound](https://github.com/Xogy/xsound)

* 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
    -- cash exchange
    rfid_cloner             = { name = 'rfid_cloner',                  label = 'RFID Cloner',                   weight = 100,       type = 'item',      image = 'rfid_cloner.png',                                          unique = true, useable = true,     shouldClose = true,    combinable = nil,   description = 'RFID Cloner' },    
    moneyprinter            = { name = 'moneyprinter',                 label = 'Money Printer',                 weight = 100,       type = 'item',      image = 'moneyprinter.png',                                         unique = true, useable = true,     shouldClose = true,    combinable = nil,   description = 'Money Printer' },    
    ink                     = { name = 'ink',                          label = 'Special ink',                   weight = 100,       type = 'item',      image = 'ink.png',                                                  unique = true, useable = true,     shouldClose = true,    combinable = nil,   description = 'Special ink' },    
    paper                   = { name = 'paper',                        label = 'Paper',                         weight = 100,       type = 'item',      image = 'paper.png',                                                unique = true, useable = true,     shouldClose = true,    combinable = nil,   description = 'Paper' }, 

```

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

```javascript
         case "rfid_cloner":
            if (itemData.info.uses == undefined) {
                return `<p>Uses: 5</p>`;  
            }else{
                return `<p>Uses: ${itemData.info.uses}</p>`;  
            }
```

</details>

<details>

<summary>QS INVENTORY</summary>

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

```lua
    ['rfid_cloner']                  = {
        ['name'] = 'rfid_cloner',
        ['label'] = 'RFID cloner',
        ['weight'] = 0,
        ['type'] = 'item',
        ['image'] = 'rfid_cloner.png',
        ['unique'] = true,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil,
        ['description'] = 'RFID cloner...'
    },
    ['moneyprinter']  = {
        ['name'] = 'moneyprinter',
        ['label'] = 'Money Printer',
        ['weight'] = 0,
        ['type'] = 'item',
        ['image'] = 'moneyprinter.png',
        ['unique'] = true,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil,
        ['description'] = 'Money Printer...'
    },
    ['ink'] = {
        ['name'] = 'ink',
        ['label'] = 'Special Ink',
        ['weight'] = 0,
        ['type'] = 'item',
        ['image'] = 'ink.png',
        ['unique'] = false,
        ['useable'] = false,
        ['shouldClose'] = true,
        ['combinable'] = nil,
        ['description'] = 'Special Ink...'
    },
    ['paper'] = {
        ['name'] = 'paper',
        ['label'] = 'Paper',
        ['weight'] = 0,
        ['type'] = 'item',
        ['image'] = 'paper.png',
        ['unique'] = false,
        ['useable'] = false,
        ['shouldClose'] = true,
        ['combinable'] = nil,
        ['description'] = 'Paper...'
    },
    ['rollcash']  = {
        ['name'] = 'rollcash',
        ['label'] = 'Rollcash',
        ['weight'] = 0,
        ['type'] = 'item',
        ['image'] = 'rollcash.png',
        ['unique'] = false,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil,
        ['description'] = 'Rollcash...'
    },
```

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

```lua
CreateUsableItem('moneyprinter', function(source, item)
    local src = source
    TriggerClientEvent("zat-cashexchange:client:UseItem", src, 'moneyprinter', 'prop_cash_printer_c')
end)
```

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

```javascript
} else if (itemData.name == "rfid_cloner") {
            $(".item-info-title").html("<p>" + `${itemData.info.label || label}` + "</p>");
            $(".item-info-description").html("<p>Uses: " + itemData.info.uses + "</p>");
```

</details>

<details>

<summary>OX INVENTORY</summary>

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

```lua
	["rfid_cloner"] = {
		label = "RFID Cloner",
		weight = 100,
		stack = false,
		close = true,
		description = "RFID Cloner",
		client = {
			image = "rfid_cloner.png",
		}
	},
	["moneyprinter"] = {
		label = "Money Printer",
		weight = 100,
		stack = false,
		close = true,
		description = "Money Printer",
		client = {
			image = "moneyprinter.png",
		}
	},

	["paper"] = {
		label = "Paper",
		weight = 100,
		stack = true,
		close = true,
		description = "Paper",
		client = {
			image = "paper.png",
		}
	},

	["ink"] = {
		label = "Special ink",
		weight = 100,
		stack = true,
		close = true,
		description = "Special ink",
		client = {
			image = "ink.png",
		}
	},
```

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

```lua
Item('moneyprinter', function(data, slot)
	ox_inventory:useItem(data, function(data)
		if data then
			TriggerEvent("zat-cashexchange:client:UseItem", 'moneyprinter', 'prop_cash_printer_c')
		end
	end)
end)
```

</details>

***

<details>

<summary>ZAT DIALOG </summary>

```lua
-- exchange
    {
        img         = 'https://i.ibb.co/w4LKs4w/Five-M-b2944-GTAProcess-O90d-Wh83-Wq.png',
        ped         = 'a_m_m_socenlat_01',
        anim        = 'CODE_HUMAN_MEDIC_TIME_OF_DEATH',
        coords      =  vector4(1213.85, -1238.6, 35.33, 92.7),
        job         = "all", -- { ["police"] = 0, ["ambulance"] = 0}  if you are using target
        gang        = "all", -- { ["ballas"] = 2, ["thelostmc"] = 0}  if you are using target
        groups      = "all", -- { ["police"] = 2, ["ambulance"] = 0}  if you are using intearaction
        firstname   = 'BARK',
        lastname    = 'MOORE',
        rep         = 0,
        mission     = 'cashexchange',
        text        = 'Hey there, looking for a side gig, huh? I’ve got an idea that’s a bit unconventional, but trust me, it’ll pay off. Picture this: you and your crew sneak into a cashexchange office, and grap all the money in there!.',
        buttons     = {
            {
                text= 'I want to work',
                rep = 0,
                answer ='Ready for a day of hard work?',
                buttons={{
                        text = 'yes',
                        shop =false,
                        rep = 0,
                        action= {
                            isServer= false,
                            event= 'zat-cashexchange:client:StartWorking',
                            data= {}
                        },
                        canInteract = CanToggleSignIn(),
                    },
                    {
                        text = 'Leave Conversation',
                        shop =false,
                        rep = 0,
                        action= {
                            isServer= false,
                            event= 'zat-dialog:client:HideUi',
                            data= {}
                        },
                        canInteract = true
                    }
                },
                canInteract = true
            },
            {
                text = 'Join/Create Group',
                rep = 0,
                shop =false,
                action= {
                    isServer= false,
                    event= 'zat-groups:client:OpenUi',
                    data= {}
                },
                canInteract = true
            },
            {
                text    = 'Open Shop',
                rep = 0,
                shop    = true,
                answer  = null,
                canInteract = true
            },
        },
        items={
            {
                name   = 'rfid_cloner',
                label  = 'RFID Cloner',
                image  = 'nui://'..Config.Img..'rfid_cloner.png',
                type   = 'Equipement',
                price  = 1000,
                rep    = 0,
                amount = 0, -- keep it 0
                info   = {},
                canInteract = true
            },     
        }
    }, 
```

</details>

***

## ENSURE RESOURCES

* [ ] ensure xsound
* [ ] ensure zat-gizmo
* [ ] ensure zat-gizmo\_ui
* [ ] ensure zat-groups
* [ ] ensure zat-minigames
* [ ] ensure zat-minigames\_2
* [ ] ensure zat-minigames\_3
* [ ] ensure zat-ui
* [ ] ensure zat-cashexchange\_props
* [ ] ensure zat-cashexchange


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zat-scripts.gitbook.io/zat-scripts/qbcore/cash-exchange-heist/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
