Veil Development Documentation
  • General
    • Documentation
    • Support
  • Paid Resources
    • Gang System
      • Installing the Resource
      • Creating Gang Sprays
      • Setup
      • Activity System Guide
      • Listeners
      • Common Errors
      • Available Functions
      • Commands
    • Government System
      • Installing the Resource
      • Setup
      • Listeners and Exports
      • Item Setup
    • K9 System
      • Installing the Resource
    • Image Placer
      • Installing the Resource
      • Setup
Powered by GitBook
On this page
  1. Paid Resources
  2. K9 System

Installing the Resource

Guide to install our K9 System

PreviousK9 SystemNextImage Placer

Last updated 8 months ago

Dependencies ox_lib -

Items

OX Inventory Add this item to ox_inventory/data/items.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

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

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

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

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

Download Here