# Installation

## Dependencies :

<details>

<summary>ES EXTENDED</summary>

You will need the latest version of [esx\_core](https://github.com/esx-framework/esx_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

```lua
   laundromatusb                = { name = 'laundromatusb',      label = 'USB',               weight = 100,       type = 'item',      image = 'laundromatusb.png',                                      unique = false, useable = true,     shouldClose = true,    combinable = nil,   description = 'USB...' },
   goldcoin                     = { name = 'goldcoin',           label = 'Coins',             weight = 100,       type = 'item',      image = 'goldcoin.png',                                           unique = false, useable = true,     shouldClose = true,    combinable = nil,   description = 'Coins...' },
```

</details>

<details>

<summary>QS INVENTORY</summary>

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

```lua
 ['laundromatusb']                  = {
        ['name'] = 'laundromatusb',
        ['label'] = 'USB',
        ['weight'] = 0,
        ['type'] = 'item',
        ['image'] = 'laundromatusb.png',
        ['unique'] = true,
        ['useable'] = true,
        ['shouldClose'] = false,
        ['combinable'] = nil,
        ['description'] = '...'
    },
    ['goldcoin']                  = {
        ['name'] = 'goldcoin',
        ['label'] = 'Gold Coin',
        ['weight'] = 0,
        ['type'] = 'item',
        ['image'] = 'goldcoin.png',
        ['unique'] = true,
        ['useable'] = true,
        ['shouldClose'] = false,
        ['combinable'] = nil,
        ['description'] = '...'
    },

```

</details>

<details>

<summary>OX INVENTORY</summary>

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

```lua

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

    ["goldcoin"] = {
        label = "Gold Coin",
        weight = 100,
        stack = true,
        close = true,
        description = "Gold Coin...",
        client = {
            image = "goldcoin.png",
        }
    },
```

</details>

***

## Dialog :

<details>

<summary>ZAT DIALOG</summary>

Add the code below to zat-dialog/shared/config.lua

```lua
-- laundromat
    {
        img         = 'https://live.staticflickr.com/65535/54170502885_2d3aa67a37_o.png',
        ped         = 'a_m_m_eastsa_02',
        anim        = 'CODE_HUMAN_MEDIC_TIME_OF_DEATH',
        coords      =  vector4(510.69, -1951.57, 23.99, 307.67),
        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   = 'ASTA',
        lastname    = 'CLEAN',
        rep         = 0,
        mission     = 'Laundromat',
        text        = 'Hey there, always on the lookout for a side gig, huh? I have got this idea that is a bit out there, but trust me, it pays off. Imagine sneaking onto Suds Law laundromat and break all the whashmachines 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-laundromat: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 = 'Abandon Mission',
                rep = 0,
                shop =false,
                action= {
                    isServer= false,
                    event= 'zat-laundromat:client:StopWorking',
                    data= {}
                },
                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   = 'laundromatusb',
                label  = 'USB',
                image  = 'nui://'..Config.Img..'laundromatusb.png',
                type   = 'Equipement',
                price  = 1000,
                rep    = 0,
                amount = 0, -- keep it 0
                info   = {},
                canInteract = true
            },        
        }
    }, 
```

</details>

## Doorlock:

<details>

<summary>QB DOORLOCK</summary>

copy <mark style="color:green;">laundromat.lua</mark> doorlock file and paste it in qb-doorlock/configs

</details>

<details>

<summary>OX DOORLOCK</summary>

Just import the <mark style="color:green;">ox\_doorlock.sql</mark> into your Database.

</details>

## ENSURE RESOURCES

* [ ] ensure zat-ui
* [ ] ensure zat-groups
* [ ] ensure zat-minigames
* [ ] ensure xsound
* [ ] ensure zat-laundromat


---

# 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/esx/laundromat/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.
