Configuration

Available configuration for resource.

CFG = {}
CFG.SETTINGS = {
	lang = 'en', -- 'en'
	notify = 'ox', -- 'ox', 'qb', 'esx', 'native'

	--[[ if you aren't using any supported database, you can enable this feature 
		to save everything into database.json file into your server ]]
	server_saving = {
		enabled = false,
		savingInterval = 5 * (60 * 1000) -- 5 minutes
	},

	-- https://docs.fivem.net/docs/game-references/controls/ -- list of controls
	controls = {
		aim = {
			attack = 38, -- E
			go = 47 -- G
		},
		cam = { -- camera keys
			up =  172, -- arrow up
			down = 173, -- arrow down
			cancel = 177, -- ESC, BACKSPACE, RIGHT CLICK
			zoomUp = 241, -- scroll up
			zoomDown = 242 -- scroll down
		}
	},

	restrictions = {
		--[[ 
			ACE PERMS 
			- put this into your server cfg and edit identifier to yours

			add_ace k9 k9 allow
			add_principal identifier.license:830e0a2add6393cf28f45474dbf6ac4577f0652a k9 #sheen
		]]
		use_ace_perms = false, -- true / false

		--[[ 
			!!! ONLY FOR BADGER_DISCORD_API USERS !!!
			- Keep in mind that ACE perms and badger_discord_api don't work together, 
			- badger_discord is always prioritized before ace_perms if it's enabled...
		]]
		badger_discord = {
			enable = false, -- true/false
			roles = {
				-- id of role from your discord
				['907104457018449941'] = true,
			}
		},

		--[[
			JOB RESTRICTIONS (only with QBCore/QBX/ESX/ND)
			- jobs and grades that have access to k9 menu
			- it's disabled if ace perms or badger_discord_api are enabled
		]]
		jobs = {
			-- job name, grade numbers
			['police'] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, 
		}
	},

	-- you can lower this value if you want decrease damage of K9
	-- keep in mind that it will be set for all animals that are able to attack
	-- FYI, if player has 100 HP or lower, he will get instakilled automatically, thats how the game works
	damage_modifier = 1.0, -- default is 1.0, min 0.01 - max 1.0,,, i personally suggest 0.7
	
	-- if false then headshot will deal same damage as any other body shots
	insta_headshot = true, -- true/false

	max_dogs = 3, -- max registered dogs per character

	tackle = {
		enable = true, -- true or false to disable
		chance = 30, -- this value is used only if level system is disabled
		type = 2 -- 1 = animation, 2 = ragdoll
	},

	-- BETA FEATURE -- COULD HAVE SOME DESYNC ISSUES, COULD CONFLICT WITH ANTICHEAT
	speeding = { -- changes base speed of dog
		enable = false, -- true or false to disable
		value = 1.5 -- minimal 1.0, max 2.0
	},

	delete_dog = { -- delete dog if
		dog_dead = false, -- if u want to use this option, then disable saving of health and armor below
		owner_dead = false 
	},

	vehicle_entering = {
		-- If you set it to true it will let the dog enter the vehicles with more realistic animations
		-- This feature is still in BETA phase, it works but sometimes other players can see it differently
		new = true,
	
		vans = { -- some van vehicles, so it will switch animation of entering, keep in mind that this script was intended for small regular vehicles so the van entering is not perfect
			[`rumpo`] = true, [`rumpo2`] = true,
			[`speedo`] = true, [`speedo2`] = true,
			[`speedo3`] = true, [`policet`] = true
		}
	},

	spawn_areas = {
		-- With this feature you can restrict everyone to spawn/despawn dog anywhere but in certain areas.
		enable = false, -- true / false
		require_house = false, -- cops will need to spawn dog house in the area first, it will also spawn the dog inside of the house
		areas = {
			{ radius = 30.0, coords = vector3(432.3, -981.64, 30.71) }, -- area 1
			-- { radius = 30.0, coords = vector3(432.3, -981.64, 30.71) }, -- example
		}
	},

	tracking = {
		radius = 75.0, -- units, smell radius
		speed = 1.0, -- dog following track speed, from 1.0 to 5.0, this value is used if you are not using LVL SYSTEM
		cooldown = 3 -- minutes, make it 0 for removing cooldown
	},
	
	search = {
		-- !!! ONLY FOR FRAMEWORK AND INVENTORY USERS !!!
		all_weapons = true, -- true/false, it will automatically add all items that start with 'weapon' word to the list so you don't have to add them
		items = { -- items that can be found by the dog

			-- 'item_name', 'type' (item types are below)
			thermite = 'explosives',
			weed_brick = 'drugs',
			-- add more here
		},

		--[[ 
			!!! FOR EVERYONE !!!
			If you are standalone (without framework/inventory), it will generate random type if search was successful.
	
			If you using supported scripts, it assigns item type to items from above.
		]]
		item_types = {
			explosives = 'Smells like explosives...',
			drugs = 'Smells like drugs...',
			-- add other types here

			weapons = 'Smells like weapon...', -- only if all_weapons = true
		},

		-- duration of searching player/npc
		search_time = 3, -- seconds

		-- what happens if dog finds something
		onSuccess = 'bark', -- 'bark', 'sit', 'laydown' or make it false to do nothing

		-- player settings
		player = {
			chance = 30, -- % this parameter is used only if you are not using any framework/inventory
		},

		-- vehicle settings
		vehicle = {
			open_doors = true, -- open all doors while searching vehicle

			-- chance to find something illegal in the vehicle
			chance = 30, -- % this parameter is used only if you are not using any framework/inventory
		},

		-- npc settings
		npc = {
			chance = 30, -- % chance to find something ilegall

			onSuccess = { -- if your dog finds ilegal items, npc could flee from the scene
				flee = {
					enabled = true, -- true / false
					chance = 30, -- % chance to flee
					attack = true, -- should dog attack if npc tries to flee (if u using lvl system, it still depends on chances from each lvl)
				}
			},
			onFail = { -- if dog doesnt find anything ilegal
				walk_away = true, -- send npc to walk away
			}
		}
	},

	status = {
		ui = {
			disable_in_vehicle = true -- true/false - disables UI when player enters vehicle
		},
		
		-- new registered dog spawns automatically with maxHealth
		-- fyi if dog has 100 hp or lower, he always get killed after one shot... that's how the game works xd
		-- u can set any max values
		maxHealth = 200,
		maxArmor = 100,
	
		--[[ 
			true = it will don't save these values into database, 
			so players are able to respawn their dog through menu without reviving option
		]]
		disable_hp_and_armor_saving = false, 
	
		heal = {
			revive_timer = 3, -- reviving dog
	
			timer = 3, -- for applying
			amount = {from = 10, to = 25}, -- how much hp will be added to the dog
		},
		armor = {
			timer = 3,
			amount = {from = 10, to = 25}, -- how much armor will be added to the dog
		},
	
		feed = {
			-- thirst and hunger gets decreased every 10 seconds
			-- min 0.0, max 1.0
			thirst = { from = 0.1, to = 0.3 },
			hunger = { from = 0.1, to = 0.3 },
	
			warning = 20, -- warns player if thirst/hunger is under x %
			get_damaged = true, -- true/false - if dog is hungry/thirsty it will slowly decrease health
		
			-- dog will be forced to pee / poo 
			-- he'll do the action after getting fed 2-3x times
			peeing = true, pooping = true
		}
	},

	leash = {
		-- 1 to 4 are thick ropes. 5 and up are thin ropes. An invalid rope type such as 0 will crash the game.
		-- be careful because some ropes type have graphic glitches that's why i choosed the type 1
		type = 5,
		max_length = 5.0 -- units, max length of leash
	},

	binding_system = { -- fivem keybinding system
		enable = true, -- true/false
		commands = {
			--[[ 
				- three parameters -
					command is name of command from the list below
					key is primary key for triggering
					label is showed in FiveM keybinds as description for bind

				- list of usable keys
				https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
			]]

			[1] = { command = 'k9', key = 'K', label = 'Open K9 Menu' }, -- binding command k9 to K key (example)
			-- [2] = { command = 'k9follow', key = 'L', label = 'K9 Follow' },
		},
	},

	commands = {
		--[[
			LIST OF COMMANDS
			- code_name and name of command
			- change only name of command if you need to!
		]]

		-- menu pos
		menu_top = 'k9top',
		menu_down = 'k9down',
		menu_left = 'k9left',
		menu_right = 'k9right',

		-- main
		register_dog = 'k9register',
		reselect = 'k9reselect',
		main_menu = 'k9',
		save_dog = 'k9save',
		spawn = 'k9spawn',
		
		-- -- -- --
		delete = 'k9delete', -- delete k9 completely

		-- actions
		follow = 'k9follow',
		lead = 'k9lead',
		vehicle = 'k9vehicle',
		search_player = 'k9searchped',
		search_car = 'k9searchcar',
		search_npc = 'k9searchnpc',
		leash = 'k9leash',
		heal = 'k9heal',
		armor = 'k9armor',
		track = 'k9trackall',
		track_player = 'k9trackplayer',
		track_by_vehicle = 'k9trackveh',

		-- others
		house = 'k9house',
		go_into_house = 'k9enterhouse',
		ball = 'k9ball',
		frisbee = 'k9frisbee',
		fetch = 'k9fetch',
		gps = 'k9gps',
		feed = 'k9feed',
		carry = 'k9carry',

		-- camera
		toggle_camera = 'k9camera',
		mount_camera = 'k9mount',

		-- anim commands
		sit = 'k9sit',
		laydown = 'k9lay',
		bark = 'k9bark',
		indicate = 'k9indicate',
		sniff = 'k9sniff',
		beg = 'k9beg',
		paw = 'k9paw',
		petting = 'k9petting'
	}
}

Last updated