Configuration
Available configuration for resource.
CFG = {}
CFG.SETTINGS = {
lang = 'en', -- 'en'
notify = 'ox', -- 'ox', 'qb', 'esx', 'native'
-- https://docs.fivem.net/docs/game-references/controls/ -- list of controls
controls = {
aim = {
attack = 38, -- E
go = 47 -- G
},
cam = { -- camera keys
up = 172,
down = 173,
cancel = 177, -- ESC, BACKSPACE, RIGHT CLICK
zoomUp = 241, -- scroll up
zoomDown = 242 -- scroll down
}
},
menu = {
type = 'ox', -- 'ox', 'menuv', 'war'
-- 'menuv' uses: topright (default), topleft, bottomright, bottomleft
-- 'ox' uses: top-right (default), top-left, bottom-right, bottom-left
-- 'war' doesn't have any settings yet...
pos = 'top-right',
-- these settings are only for MenuV
size = 'size-125', -- menu size
colour = { r = 250, g = 20, b = 60 }, -- https://www.rapidtables.com/web/color/RGB_Color.html
banner = 'none', -- 'none', 'default', 'default_native'
banner_text = false, -- 'TEXT'
},
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},
}
},
lvl_system = {
disable = true, -- true/false - if true then dog will always follow your orders, you will don't receive any XP/LVLS
xp_per_action = {from = 5, to = 20}, -- randomised
levels = {
-- u can add unlimited levels
-- xp = what XP you need to have to reach this lvl
-- Fail = percentage/chance of dog to fail to comply (actions, searching, tracking etc)
-- tracking_speed = how fast is gonna follow the track, from 1.0 to 5.0
-- tackle_chance = percentage/chance to tackle player while attacking (only if tackle is enabled)
[1] = { xp = 0, Fail = 30, tracking_speed = 1.0, tackle_chance = 10 },
[2] = { xp = 150, Fail = 20, tracking_speed = 2.0, tackle_chance = 20 },
[3] = { xp = 350, Fail = 10, tracking_speed = 3.0, tackle_chance = 30 },
[4] = { xp = 800, Fail = 5, tracking_speed = 4.0, tackle_chance = 30 },
[5] = { xp = 1500, Fail = 0, tracking_speed = 5.0, tackle_chance = 30 },
}
},
-- 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
blip = true, -- creates blip for k9 on the map
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 desynced
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 will 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
}
},
camera = {
disable = false, -- true = disables camera options
-- required item for mounting camera, add the item by yourself
-- you can make it false if you don't wanna use it
item = false, -- 'k9_camera'
-- new options coming soon... sooon.... soooon...
},
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 QBCORE / QBX USERS !!!
- if you want to use advanced searching you need to use code provided from documentation
- true = means it will search all vehicle trunks and gloveboxes
- false = it will search vehicles that are owned by players
]]
advanced = false,
-- !!! 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 = {
-- 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, -- applying bandage
amount = {from = 10, to = 25}, -- how much hp will be added to dog
item = 'bandage',
},
armor = {
timer = 3,
amount = {from = 10, to = 25}, -- how much armor will be added to dog
item = 'armor',
},
feed = {
prop = `v_res_mbowl`, -- object
item = 'water_bottle', -- item that is required
-- 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
}
},
dogs = {
-- Only these dog models i found can attack
-- label and spawn name
['Shepherd'] = `a_c_shepherd`,
['Rottweiler'] = `a_c_rottweiler`,
['Chop'] = `a_c_chop`,
},
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 = 'k9animations', key = 'L', label = 'Open K9 Animations' },
},
},
commands = {
--[[
LIST OF COMMANDS
- code_name and name of command
- change only name of command if you need to!
]]
disable = false, -- true = disable all commands
-- main
['register_dog'] = 'k9register',
['reselect'] = 'k9reselect',
['main_menu'] = 'k9',
['save_dog'] = 'k9save',
['check_dog'] = 'k9check',
['spawn'] = 'k9spawn',
['animations'] = 'k9animations',
-- actions
['follow'] = 'k9follow',
['lead'] = 'k9lead',
['vehicle'] = 'k9vehicle',
['ball'] = 'k9ball',
['fetch'] = 'k9fetch',
['search_player'] = 'k9searchped',
['search_car'] = 'k9searchcar',
['feed'] = 'k9feed',
['heal'] = 'k9heal',
['armor'] = 'k9armor',
['carry'] = 'k9carry',
['track'] = 'k9trackall',
['track_player'] = 'k9trackplayer',
-- camera
['toggle_camera'] = 'k9camera',
['mount_camera'] = 'k9mount',
-- anim commands
['sit'] = 'k9sit',
['laydown'] = 'k9laydown',
['bark'] = 'k9bark',
-- delete k9
['delete'] = 'k9delete'
},
animations = {
--[[
FLAGS:
1 = repeat animation
2 = stop on last frame of animation
0 = normal
]]
[1] = {
name = "Sit",
dict = "creatures@rottweiler@tricks@", anim = "sit_enter", flags = 2,
},
[2] = {
name = "Lay Down / Get Up",
dict = "creatures@rottweiler@amb@sleep_in_kennel@", anim = "sleep_in_kennel", flags = 2,
},
[3] = {
name = "Bark",
dict = "creatures@rottweiler@amb@world_dog_barking@idle_a", anim = "idle_a", flags = 1,
},
[4] = {
name = "Indication",
dict = "creatures@rottweiler@indication@", anim = "indicate_high", flags = 1,
},
[5] = {
name = "Sniff",
dict = "creatures@rottweiler@indication@", anim = "indicate_low", flags = 2,
},
[6] = {
name = "Beg",
dict = "creatures@rottweiler@tricks@", anim = "beg_enter", flags = 2,
},
[7] = {
name = "Gimme Paw",
dict = "creatures@rottweiler@tricks@", anim = "paw_right_enter", flags = 2,
},
[8] = {
name = "Petting",
dict = "creatures@rottweiler@tricks@", anim = "petting_chop", flags = 2,
},
}
-- TODO -- -- TODO -- -- TODO -- -- TODO -- -- TODO -- -- TODO --
--[[ !!! ONLY FOR FRAMEWORK AND INVENTORY USERS !!! ]]--
--[[
shop = {
enable = true,
npc = {
skin = `s_m_y_cop_01`,
pos = vec4(455.3849, -990.3512, 42.6916, 271.3181),
scenario = 'WORLD_HUMAN_COP_IDLES' -- https://wiki.rage.mp/index.php?title=Scenarios
},
header = 'K9 SHOP',
items = {
{
label = 'House',
description = 'Place house for your dog buddy.',
icon = 'fa-house',
item = 'dog_house',
price = 0,
},
{
label = 'Camera',
description = 'Mount bodycam and watch his perspective.',
icon = 'fa-camera',
item = 'dog_camera',
price = 0,
},
{
label = 'GPS',
description = 'Never lose location of your doggie.',
icon = 'fa-location-dot',
item = 'dog_gps',
price = 0,
},
{
label = 'Food',
description = "Give him some snacks, he's hungry!",
icon = 'fa-bone',
item = 'water_bottle',
price = 0,
},
{
label = 'Leash',
description = "Take him for the walk.",
icon = 'fa-dog',
item = 'dog_leash',
price = 0,
},
},
},
]]
}
Last updated