Files
Elite-Gaming-FiveM/resources/night_ers_k9/config/config.lua
T
2025-07-17 21:11:54 -07:00

338 lines
20 KiB
Lua

Config = {
ConfigVersion = "1.0.0",
--====================== DEVELOPER SETTINGS ======================--
Debug = false, -- Enable or disable debug.
EventPrefix = "night_ers_k9", -- Leave this be.
--====================== PERMISSIONS FOR SHIFT ACCESS (on/off shift) ======================--
EveryoneHasPermission = true,
Enable_Night_DiscordApi_Permissions = false, -- server/s_functions.lua
Enable_Ace_Permissions = false, -- server/s_functions.lua
Enable_ESX_Permissions = {
Check_By_Job = false, -- server/s_functions.lua
Check_By_Permissions = false, -- server/s_functions.lua
},
Enable_QBCore_Permissions = {
Check_By_Job = false, -- server/s_functions.lua
Check_By_Permissions = false, -- server/s_functions.lua
},
-- The role or group that has permission to work with a K9 dog.
K9HandlerPermissionRoles = {
"Manager",
"Administrator",
"police",
},
--====================== GENERAL SETTINGS ======================--
AddChatSuggestions = true, -- Adds chat suggestions to the script commands.
DistanceToKeepFromPlayer = 1.0, -- The distance the K9 dog will keep from their handler.
ChanceToSurrenderToDogs = 50, -- Applies a 50% chance to make the NPC target surrender when being attacked by a K9 dog.
AllowRevivingInjuredK9 = true, -- Allows the dog handler to revive their own injured K9 dog.
AllowK9InFrontSeat = false, -- Allows the K9 dog to be in the front passenger seat of a vehicle.
AllowCarryK9 = true, -- Allows the dog handler to carry the dog.
AllowK9ToKillNPCs = false, -- Allows the K9 dog to kill NPCs, setting it false will replicate the attack, but not damage the NPC. They will still be able to kill players.
AllowK9ToAttackPlayers = true, -- Allows the K9 dog to attack players, if set to false the dog will decline attacks on players.
--====================== K9 DOG HANDLER VEHICLES ======================--
K9Vehicles = {
-- Base game vehicle example
{hash = `policet`, spawnOffset = vector3(0.0 --[[Right/-Left]], -4.0 --[[Front/-Rear]], 0.5 --[[Up/-Down]]), dogModelName = "a_c_shepherd"},
-- Custom vehicle example
{hash = `forddsumo7`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `23gmcleo`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `23gmcleoslick`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `sahp18tahoe`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp21tahoe`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp23charg`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp20fpiup`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp23durango`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasd06cvpisd7100`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasd15k9`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasd20k9`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasdcrownvic`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasdsd7100`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasdvicslicktop`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasd20tunm`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasd15tunm`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lafdtahoe`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `16lapdexpk9`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `20lapdexpk9`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `SHOP80693`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `SHOP81622`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `SHOP83039`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `SHOP89471`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasdexp`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasdexp2`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasdtahoe2`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `20expk9rb`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `23smallboat`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `23smallboatblue`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `23smallboatfd`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `214x41bpd`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `214x41bwpd`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `214x41bypd`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `214x41pd`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `214x42bpd`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `214x42bypd`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `214x42pd`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `214x42pdw`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `214x44pdyw`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `2016fpiutraining`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `animalcontrol1`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `animalcontrol3`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp1`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp2`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp3`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp4`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp5`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp6`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp11cvpi`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp11cvpiS`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp13fpiu`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp13fpiuS`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp18charger`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp18chargerS`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp20tahoe`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp20tahoeS`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `chp181charger`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `hp1`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `hp2`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `hp3`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `hp4`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `hp4`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `hp5`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `hp9`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasd08tahoe`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasd08tahoe2`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `lasd14tahoe`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `PD23Suburban`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `sof250k9`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `valor11sedank9`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `valor13sedan`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `valor13suv`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `valor16utilityk9`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `valor18sedank9`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `valor151500`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `valor162500`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `valor182500`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `valor183500`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `valor191500`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `valor203500`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `walkinarrow`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `hp14fpiu1`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `hp14fpiu2`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `hp15fpiu1`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `hp15fpiu2`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `hp16fpiu1`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
{hash = `hp16fpiu2`, spawnOffset = vector3(0.0, -4.0, 0.5), dogModelName = "a_c_shepherd"},
-- More examples
-- {hash = `police`, spawnOffset = vector3(0.0, -3.0, 0.5), dogModelName = "a_c_husky"},
-- {hash = `police2`, spawnOffset = vector3(0.0, -3.0, 0.5), dogModelName = "a_c_husky"},
-- {hash = `police3`, spawnOffset = vector3(0.0, -3.0, 0.5), dogModelName = "a_c_husky"},
},
--====================== CONTROLS, COMMANDS, KEYMAPPING ======================--
-- https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
Controls = {
-- Hint: These can be changed by individual players. So each client has control over which keys these use for what commands.
SpawnOrDeleteK9 = {
input = "keyboard",
command = "k9spawnordelete",
label = "Spawn or Delete K9 Dog",
chatsuggestion = "Spawns or deletes a K9 Dog when near a suitable dog handler vehicle.",
keymapping = "NUMPAD0", -- NUMPAD0
},
K9Follow = {
input = "keyboard",
command = "k9follow",
label = "K9 Follow",
chatsuggestion = "Orders your own K9 Dog to follow you.",
keymapping = "NUMPAD1", -- NUMPAD1
},
K9Idle = {
input = "keyboard",
command = "k9idle",
label = "K9 Idle",
chatsuggestion = "Orders your own K9 Dog to idle at it's current position.",
keymapping = "NUMPAD2", -- NUMPAD1
},
K9Alert = {
input = "keyboard",
command = "k9alert",
label = "K9 Alert",
chatsuggestion = "Orders your own K9 Dog to alert by barking.",
keymapping = "NUMPAD3", -- NUMPAD3
},
K9Pet = {
input = "keyboard",
command = "k9pet",
label = "K9 Pet",
chatsuggestion = "Attempt to pet your own nearby K9 Dog.",
keymapping = "NUMPAD4", -- NUMPAD4
},
K9Carry = {
input = "keyboard",
command = "k9carry",
label = "K9 Carry",
chatsuggestion = "Carry your own K9 Dog.",
keymapping = "NUMPAD5", -- NUMPAD5
},
K9ReleaseLastTarget = { -- This releases the last target manually (assigned via K9 attack/search/taunt), so they get cleaned up by the GTA engine when it finds it suitable.
input = "keyboard",
command = "k9release",
label = "K9 Release",
chatsuggestion = "Release the last target the K9 Dog was interacting with.",
keymapping = "NUMPAD6", -- NUMPAD6
},
-- Actions: Attack, Search (ped/veh), Taunt.
K9SelectActionMode = {
input = "keyboard",
command = "k9selectactionmode",
label = "K9 Select Action Mode",
chatsuggestion = "Selects the action mode for the K9 Dog on the highlighted target (Attack, Search, Taunt).",
keymapping = "LMENU", -- Left ALT
}
},
--====================== HOTKEYS ======================--
-- https://docs.fivem.net/docs/game-references/controls/
-- Hint: These can not be changed by individual players, only via this config file.
HotKeys = {
K9Revive = {
inputKeyId = 38, -- E
inputKeyName = "~INPUT_CONTEXT~",
inputKeyLabel = "E"
},
K9Attack = {
inputKeyId = 38, -- E
inputKeyName = "~INPUT_CONTEXT~",
inputKeyLabel = "E"
},
K9Search = {
inputKeyId = 74, -- H
inputKeyName = "~INPUT_VEH_HEADLIGHT~",
inputKeyLabel = "H"
},
K9Taunt = {
inputKeyId = 182, -- L
inputKeyName = "~INPUT_CELLPHONE_CAMERA_FOCUS_LOCK~",
inputKeyLabel = "L"
},
Cancel = {
inputKeyId = 202, -- ESC/BACKSPACE
inputKeyName = "~INPUT_FRONTEND_RRIGHT~",
inputKeyLabel = "BACKSPACE"
},
},
--====================== K9 Dog Settings ======================--
K9BlipData = {
Enabled = true,
BlipName = "Canine (K9)",
BlipSpriteID = 898,
BlipDisplay = 2,
BlipCone = true,
BlipScale = 0.5,
BlipColourID = 10,
},
--====================== K9 Dog Target Marker Settings ======================--
MarkerHeight = 2.0,
TargetMarkerData = {
MarkerId = 21,
dirX = 0, dirY = 0, dirZ = 0,
rotX = 0, rotY = 180.0, rotZ = 0,
scaleX = 1.0, scaleY = 1.0, scaleZ = 1.0,
red = 255, green = 0, blue = 0, alpha = 125,
bobUpAndDown = false, faceCamera = true,
p19 = 0, rotate = false,
textureDict = 0, textureName = 0,
drawOnEnts = 0
},
--====================== LOCALES / LANGUAGE ======================--
Messages = {
Usage = "Usage",
Spawn = "Spawn",
K9Dog = "K9 Dog",
SpawnK9Dog = "Take out K9 dog from the vehicle",
DeleteK9Dog = "Put K9 dog in the vehicle",
K9Spawned = "Successfully summoned K9 dog.",
K9Deleted = "Successfully dismissed K9 dog.",
K9Injured = "Your K9 dog is injured. You have 10 seconds to revive them.",
K9PassedAway = "Your K9 dog has passed away. Please summon a new one.",
AlreadyHaveK9 = "You already have a K9 dog assigned to you...",
AssignedK9 = "Successfully assigned K9 dog to you.",
K9TooFarAway = "Your K9 dog is too far away from you. They have been tasked to return to you.",
ToSendTheDogToAttack = "K9 Attack",
ToSearchTarget = "K9 Search",
ToSendDogToTaunt = "K9 Taunt",
ToCancel = "Cancel",
ToReviveK9 = "Revive K9",
K9Revived = "Successfully revived your K9 dog.",
OrderedToIdle = "You've ordered the K9 dog to idle.",
AlreadyIdling = "Your K9 dog is already idling...",
OrderedToFollow = "You've ordered the K9 dog to follow you.",
AlreadyFollowing = "Your K9 dog is already following you...",
EnteredAttackMode = "You've entered attack mode. Press E to attack a highlighted target.",
OrderToAttackTarget = "You've ordered the K9 dog to attack a target.",
OrderedToSearch = "You've ordered the K9 dog to search the target.",
OrderedToTaunt = "You've ordered the K9 dog to taunt the target.",
OrderedToAlert = "You've ordered the K9 dog to alert by barking.",
YouArePettingTheDog = "You are petting the K9 dog.",
YouPickedUpTheK9 = "You picked up the K9 dog.",
YouReleasedTheK9 = "You released the K9 dog.",
DogIsTooFarAway = "The K9 dog is too far away for this action...",
SuspectIsFleeing = "The suspect is fleeing from the K9 dog...",
ReleasedTarget = "The last target the K9 dog was interacting with has been released...",
NoValidTargetToRelease = "There is no valid target to release...",
CouldNotReleaseTarget = "Could not release the last target, they seem to have other tasks...",
DogHasFoundNothing = "The K9 dog has not been triggered during the search, it is now returning to you...",
DogIsAlertingAfterSearching = "The K9 dog is triggered by something...",
VehicleDataTimeout = "A timeout occured on retrieving vehicle data in night_ers. Please try again.",
PedDataTimeout = "A timeout occured on retrieving ped data in night_ers. Please try again.",
EnteredSelectActionMode = "You've entered select K9 action mode.",
CannotSpawnK9WhilstNotOnShift = "You cannot spawn a K9 dog whilst not on shift for ERS...",
VehicleIsNotEmpty = "The vehicle is not empty... The dog can not search it.",
VehicleNotAllowedToBeSearched = "This vehicle can not be searched by the K9 dog...",
CanceledK9ActionMode = "Canceled K9 Action mode.",
DismissedK9DogTooFarAway = "Dismissed your K9 dog. They went too far away from you...",
CannotSpawnOrDeleteK9WhilstInVehicle = "You cannot spawn or delete a K9 dog whilst in a vehicle...",
YouHaveNoK9 = "You have no K9 dog...",
K9NotFound = "K9 dog not found...",
NoVehicleFound = "No suitable vehicle found to spawn a K9 dog...",
NoPermission = "You do not have the required permission to spawn a K9 dog...",
InvalidLocationIndex = "Invalid location index. Please provide a number...",
PickupCooldownActive = "K9 dog summon cooldown active. Please wait before summoning a K9 dog again.",
--========= NUI TRANSLATIONS =========--
K9ControlsTitlePed = "K9 Dog Controls (NPC)",
K9ControlsTitleVehicle = "K9 Dog Controls (Vehicle)",
AvailableHotkeysAndControls = "Available hotkeys and controls",
K9ControlsSubtitle = "Aim at the target and press the hotkey to perform the action.",
K9Attack = "Attack",
K9Search = "Search",
K9Taunt = "Taunt",
Cancel = "Cancel",
},
}