> For the complete documentation index, see [llms.txt](https://veil-development.gitbook.io/veil-development-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://veil-development.gitbook.io/veil-development-documentation/paid-resources/k9-system/installing-the-resource.md).

# Installing the Resource

Guide to install our K9 System

**Dependencies**\
ox\_lib - [Download Here](https://github.com/overextended/ox_lib)

Items

OX Inventory\
Add this item to ox\_inventory/data/items.lua

```lua
['k9'] = {
	label = "Police K9",
	description = "A Police K9",
	stack = false,
	client = {
		image = "k9.png"
	}
},
```

And this block of code to `modules/items/client.lua`

```lua
Item('k9', function(data, slot)
    TriggerEvent('veil-policejob:client:K9')
end)
```

QB Inventory (And other qb-core inventories)\
Add this item to qbcore/shared/items.lua

```lua
k9 = { name = "k9", label = "Police K9", weight = 5000, type = "item", image = "k9.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A Police K9" },
```

And add this block of code to any server sided file

```lua
local QBCore = exports['qb-core']:GetCoreObject()

QBCore.Functions.CreateUseableItem('k9', function(source, item)
    local src = source
    local Player = QBCore.Functions.GetPlayer(src)
    if Player.Functions.GetItemByName(item.name) then
        TriggerClientEvent('veil-policejob:client:K9', src)
    end
end)
```

Download this image and place it in the inventory's image folder\
For ox\_inventory -> `ox_inventory/web/images`\
For qb inventories -> `qb-inventory/html/images`

<figure><img src="https://1056301872-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCincZRFUCvxZ1wE3EcAE%2Fuploads%2F95RFdPaPVl2V5HCOsjwf%2Fk9.png?alt=media&amp;token=033f963d-86ec-49ad-bfff-49493c67d0b1" alt=""><figcaption></figcaption></figure>

**Configuration**

In `shared/shared.lua` ensure to set these variables to your server setup or you will encounter errors

* Shared.Database
* Shared.Framework
* Shared.Inventory
* Shared.Jobs
* Shared.IllegalItems

**Shared.IllegalItems are the items the K9 can search vehicles and alert to**
