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

## ITEMS

<details>

<summary>QB INVENTORY</summary>

Go to <mark style="color:purple;">qb-core/shared/items.lua</mark> and add this :&#x20;

```lua
    -- Pharmacy
    boltcutter          = { name = 'boltcutter', label = 'Bolt Cutter', weight = 7000, type = 'item', image = 'boltcutter.png', unique = false, useable = false, shouldClose = true, description = 'Bolt Cutter' },
    pharmacycard        = { name = 'pharmacycard', label = 'Pharmacy Card', weight = 7000, type = 'item', image = 'pharmacycard.png', unique = false, useable = false, shouldClose = true, description = 'Pharmacy Card' },
    pseudoephedrine     = { name = 'pseudoephedrine', label = 'Pseudoephedrine', weight = 7000, type = 'item', image = 'pseudoephedrine.png', unique = false, useable = false, shouldClose = true, description = 'Pseudoephedrine' },
    acetone             = { name = 'acetone', label = 'Acetone', weight = 7000, type = 'item', image = 'acetone.png', unique = false, useable = false, shouldClose = true, description = 'Acetone' },
    bicarbonatesodium   = { name = 'bicarbonatesodium', label = 'Bicarbonate Sodium', weight = 7000, type = 'item', image = 'bicarbonatesodium.png', unique = false, useable = false, shouldClose = true, description = 'Bicarbonate Sodium' },
    kitaminvials        = { name = 'kitaminvials', label = 'Kitamin Vials', weight = 7000, type = 'item', image = 'kitaminvials.png', unique = false, useable = false, shouldClose = true, description = 'Kitamin Vials' },
    alprazolampowder    = { name = 'alprazolampowder', label = 'Alprazolam powder', weight = 7000, type = 'item', image = 'alprazolampowder.png', unique = false, useable = false, shouldClose = true, description = 'Alprazolam powder' },
    salviatinctures     = { name = 'salviatinctures', label = 'Salvia tinctures', weight = 7000, type = 'item', image = 'salviatinctures.png', unique = false, useable = false, shouldClose = true, description = 'Salvia tinctures' },
    rollcash            = { name = 'rollcash', label = 'Rolled Cash', weight = 0, type = 'item', image = 'rollcash.png', unique = true, useable = true, shouldClose = true, description = 'Rolled Cash' },
```

</details>

<details>

<summary>OX INVENTORY</summary>

Go to <mark style="color:purple;">ox\_inventory/data/items.lua</mark> and add this :&#x20;

```lua
	["acetone"] = {
		label = "Acetone",
		weight = 7000,
		stack = true,
		close = true,
		description = "Acetone",
		client = {
			image = "acetone.png",
		}
	},

	["bicarbonatesodium"] = {
		label = "Bicarbonate Sodium",
		weight = 7000,
		stack = true,
		close = true,
		description = "Bicarbonate Sodium",
		client = {
			image = "bicarbonatesodium.png",
		}
	},

	["kitaminvials"] = {
		label = "Kitamin Vials",
		weight = 7000,
		stack = true,
		close = true,
		description = "Kitamin Vials",
		client = {
			image = "kitaminvials.png",
		}
	},

	["alprazolampowder"] = {
		label = "Alprazolam powder",
		weight = 7000,
		stack = true,
		close = true,
		description = "Alprazolam powder",
		client = {
			image = "alprazolampowder.png",
		}
	},

	["pseudoephedrine"] = {
		label = "Pseudoephedrine",
		weight = 7000,
		stack = true,
		close = true,
		description = "Pseudoephedrine",
		client = {
			image = "pseudoephedrine.png",
		}
	},

	["salviatinctures"] = {
		label = "Salvia tinctures",
		weight = 7000,
		stack = true,
		close = true,
		description = "Salvia tinctures",
		client = {
			image = "salviatinctures.png",
		}
	},

	["pharmacycard"] = {
		label = "Pharmacy Card",
		weight = 7000,
		stack = true,
		close = true,
		description = "Pharmacy Card",
		client = {
			image = "pharmacycard.png",
		}
	},

	["boltcutter"] = {
		label = "Bolt Cutter",
		weight = 7000,
		stack = true,
		close = true,
		description = "Bolt Cutter",
		client = {
			image = "boltcutter.png",
		}
	},
	["rollcash"] = {
		label = "Cash Roll",
		weight = 100,
		stack = false,
		close = true,
		description = "",
		client = {
			image = "rollcash.png",
		}
	},
```

</details>

<details>

<summary>QS INVENTORY</summary>

Go to  <mark style="color:purple;">qs-inventory/shared/items.lua</mark> and add this :

```lua
['acetone'] = {
    name = 'acetone',
    label = 'Acetone',
    weight = 7000,
    type = 'item',
    image = 'acetone.png',
    unique = false,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Acetone',
},

['bicarbonatesodium'] = {
    name = 'bicarbonatesodium',
    label = 'Bicarbonate Sodium',
    weight = 7000,
    type = 'item',
    image = 'bicarbonatesodium.png',
    unique = false,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Bicarbonate Sodium',
},

['kitaminvials'] = {
    name = 'kitaminvials',
    label = 'Kitamin Vials',
    weight = 7000,
    type = 'item',
    image = 'kitaminvials.png',
    unique = false,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Kitamin Vials',
},

['alprazolampowder'] = {
    name = 'alprazolampowder',
    label = 'Alprazolam powder',
    weight = 7000,
    type = 'item',
    image = 'alprazolampowder.png',
    unique = false,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Alprazolam powder',
},

['pseudoephedrine'] = {
    name = 'pseudoephedrine',
    label = 'Pseudoephedrine',
    weight = 7000,
    type = 'item',
    image = 'pseudoephedrine.png',
    unique = false,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Pseudoephedrine',
},

['salviatinctures'] = {
    name = 'salviatinctures',
    label = 'Salvia tinctures',
    weight = 7000,
    type = 'item',
    image = 'salviatinctures.png',
    unique = false,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Salvia tinctures',
},

['pharmacycard'] = {
    name = 'pharmacycard',
    label = 'Pharmacy Card',
    weight = 7000,
    type = 'item',
    image = 'pharmacycard.png',
    unique = false,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Pharmacy Card',
},

['boltcutter'] = {
    name = 'boltcutter',
    label = 'Bolt Cutter',
    weight = 7000,
    type = 'item',
    image = 'boltcutter.png',
    unique = false,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Bolt Cutter',
},

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

```

</details>

## DIALOG

<details>

<summary>ZAT DIALOG</summary>

If you have [zat-dialog](https://www.youtube.com/watch?v=4NqP8-TCgFg) then add this to <mark style="color:purple;">zat-dialog/shared/config.lua</mark>

```lua
    -- Pharmacy Heist
    {
        img         = 'https://i.ibb.co/3y4XLP98/image.png',
        ped         = 's_m_m_doctor_01',
        anim        = 'CODE_HUMAN_MEDIC_TIME_OF_DEATH',
        coords      = vector4(334.51, -1431.18, 45.51, 136.45),
        job         = "all", -- { ["police"] = 0, ["ambulance"] = 0}  
        gang        = "all", -- { ["ballas"] = 2, ["thelostmc"] = 0}  
        groups      = "all", -- { ["police"] = 2, ["ambulance"] = 0}  
        firstname   = 'MACK',
        lastname    = 'TREVIS',
        rep         = 0,
        mission     = 'pharmacyheist',
        text        = 'Listen, I need a few things from the pharmacy. Think you can grab them?',
        buttons     = {
            {
                text= 'Something Risky ?',
                rep = 0,
                answer ='“Alright… I’ve got a job for you. There’s a pharmacy on the west side. Owner’s gone for the night. They’ve got meds, supplies, and some cash in the back. Nothing too bulky, but definitely worth it. I’ll let you know when the coast is clear.',
                buttons={
                    {
                        text = 'I’m in',
                        shop = false,
                        rep = 0,
                        action= {
                            isServer= false,
                            event= 'zat-pharmacyheist:client:StartRandomRobbery',
                            data= {}
                        },
                        canInteract = true,
                    },
                    {
                        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 = 'Sell Items',
                rep = 0,
                shop = false,
                action= {
                    isServer= true,
                    event= 'zat-pharmacyheist:server:SellItems',
                    data= {}
                },
                canInteract = true
            },
            {
                text    = 'Open Shop',
                rep = 0,
                shop    = true,
                answer  = nil,
                canInteract = true
            },
        },
        items={
            {
                name   = 'boltcutter',
                label  = 'Bilt Cutter',
                image  = 'nui://'..Config.Img..'boltcutter.png',
                type   = 'Equipment',
                price  = 1000,
                rep    = 0,
                amount = 0,
                info   = {},
                canInteract = true
            },   
        }
    },
```

</details>

## ENSURE RESOURCES

* [ ] ensure zat-ui
* [ ] ensure zat-newgames
* [ ] ensure zat-pharmacyheist\_props
* [ ] ensure zat-pharmacyheist
