# Installation

<figure><img src="/files/i5dvJobPn6t2InalGrEf" alt=""><figcaption></figcaption></figure>

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

<details>

<summary>POLYZONE</summary>

You will need the latest version of [polyzone](https://github.com/mkafrin/PolyZone).

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

</details>

### Installing the resource

* Make sure you have the [dependencies](#dependencies) listed above installed.
* Extract the contents of the archive to your resources folder.
* Add items to ox\_inventory/data/items.lua

  ```lua
  ["zatecola"] = {
  	label = "eCola",
  	weight = 1,
  	stack = false,
  	close = true,
  	description = "eCola Drinks..",
  	client = {
  		image = "zatecola.png",
  	}
  },

  ["zatfries"] = {
  	label = "Fries",
  	weight = 1,
  	stack = false,
  	close = true,
  	description = "French Fries...",
  	client = {
  		image = "zatfries.png",
  	}
  },

  ["zatburger"] = {
  	label = "Burger",
  	weight = 1,
  	stack = false,
  	close = true,
  	description = "Burger..",
  	client = {
  		image = "zatburger.png",
  	}
  },

  ["zatfoodcontainer"] = {
  	label = "Food container",
  	weight = 1,
  	stack = false,
  	close = true,
  	description = "Some Spicy Food in here..",
  	client = {
  		image = "zatfoodcontainer.png",
  	}
  },

  ["zatecolalight"] = {
  	label = "eCola Light",
  	weight = 1,
  	stack = false,
  	close = true,
  	description = "eCola Light Drinks..",
  	client = {
  		image = "zatecolalight.png",
  	}
  },

  ["zatsprunk"] = {
  	label = "Sprunk",
  	weight = 1,
  	stack = false,
  	close = true,
  	description = "Sprunk Drinks..",
  	client = {
  		image = "zatsprunk.png",
  	}
  },

  ["zatorangotang"] = {
  	label = "Orang-O-tang",
  	weight = 1,
  	stack = false,
  	close = true,
  	description = "orang-o-tang Drinks..",
  	client = {
  		image = "zatorangotang.png",
  	}
  },
  ["snr_cheese"] = {
  	label = "Cheese",
  	weight = 100,
  	stack = true,
  	close = true,
  	description = "Cheese",
  	client = {
  		image = "snr_cheese.png",
  	}
  },

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

  ["snr_potatos"] = {
  	label = "Potatos",
  	weight = 100,
  	stack = true,
  	close = true,
  	description = "Potatos",
  	client = {
  		image = "snr_potatos.png",
  	}
  },
  ["snr_pickles"] = {
  	label = "Pickles",
  	weight = 100,
  	stack = true,
  	close = true,
  	description = "Pickles",
  	client = {
  		image = "snr_pickles.png",
  	}
  },

  ["snr_lettuce"] = {
  	label = "Lettuce",
  	weight = 100,
  	stack = true,
  	close = true,
  	description = "Lettuce",
  	client = {
  		image = "snr_lettuce.png",
  	}
  },
  ["snr_onions"] = {
  	label = "Onions",
  	weight = 100,
  	stack = true,
  	close = true,
  	description = "Onions",
  	client = {
  		image = "snr_onions.png",
  	}
  },
  ```
* Add the images inside your ox\_inventory/web/images.
* Add into ox\_inventory/modules/items/client.lua<br>

  ```lua
  Item('zatfoodcontainer', function(data, slot)
  	ox_inventory:useItem(data, function(data)
  		if data then
  			TriggerServerEvent("zat-snrbuns:server:UseContainer", slot)
  		end
  	end)
  end)

  Item('zatburger', function(data, slot)
  	ox_inventory:useItem(data, function(data)
  		if data then
  			TriggerServerEvent("zat-snrbuns:server:EatDrink", slot)
  		end
  	end)
  end)

  Item('zatsprunk', function(data, slot)
  	ox_inventory:useItem(data, function(data)
  		if data then
  			TriggerServerEvent("zat-snrbuns:server:EatDrink", slot)
  		end
  	end)
  end)

  Item('zatecola', function(data, slot)
  	ox_inventory:useItem(data, function(data)
  		if data then
  			TriggerServerEvent("zat-snrbuns:server:EatDrink", slot)
  		end
  	end)
  end)

  Item('zatecolalight', function(data, slot)
  	ox_inventory:useItem(data, function(data)
  		if data then
  			TriggerServerEvent("zat-snrbuns:server:EatDrink", slot)
  		end
  	end)
  end)

  Item('zatorangotang', function(data, slot)
  	ox_inventory:useItem(data, function(data)
  		if data then
  			TriggerServerEvent("zat-snrbuns:server:EatDrink", slot)
  		end
  	end)
  end)

  Item('zatfries', function(data, slot)
  	ox_inventory:useItem(data, function(data)
  		if data then
  			TriggerServerEvent("zat-snrbuns:server:EatDrink", slot)
  		end
  	end)
  end)
  ```
* Add this emote to your emote menu : \
  \-  rpemotes\client\ AnimationList.lua :&#x20;

```lua
["fries"] = { 
    "mp_player_inteat@burger",
    "mp_player_int_eat_burger",
    "Fries",
    AnimationOptions = {
        Prop = 'prop_burger_friesbox_f',
        PropBone = 60309,
        PropPlacement = {
            0.0500,
            -0.0200,
            -0.0200,
            0.0,
            -66.7427,
            68.3677
        },
        EmoteMoving = true
    }
},
```

* ensure the following resources :\
  1 - ensure zat-snrbuns\
  2 -  ensure zat-snrbuns\_props


---

# 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/snrbuns/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.
