[RELEASE] [PAID] K9 Script (w/ Logs)

Hey all! This is a script that allows police officers on your FiveM server to enforce the law with a K9 dog and beautiful UI (courtesy of NeroHiro). It also has a detailed logging feature which logs to a file and/or server console (configurable) whenever a player orders their K9 to do certain things. I hope you all enjoy and find this useful for the players on your server!

Updates since release

12/01/2021 - QBCORE
↳ Added the ability to search players
↳ Added the ability to log to Discord (webhook)
↳ Added the ability to whitelist multiple jobs

12/03/2021 - QBCORE
↳ You no longer need to use nh-context/nh-keyboard for the menus and keyboard inputs - if you prefer to use qb-menu/qb-input, there is now an option for that in the config

Features:
↳ Logs
↳ Extensive configuration
↳ Sit/stay, follow/recall, bark, lay down, enter/exit vehicle, attack functions
… and even more coming in future updates!

Dependencies:
NeroHiro’s Context Menu v2
NeroHiro’s Keyboard v2

Buy ($5):
Tebex (QBCore)
Tebex (Standalone)

Showcase:

K9 Script (w/ Logs) | @NadPlayz (Try this link if preview does not work)

Configuration:

Config = {}
Locale = {}

-- [[ 🟢 Configuration 🟢 ]] --

-- QBCore
Config.qbVersion = 'old' -- Change to 'new' if you are using the new QBCore version. If you do not, core functions of the script will simply not work!

-- General
Config.job = 'police' -- Job needed to use the script
Config.defaultKeybind = 'k' -- Default keybind to open menu
Config.defaultKeybindAttack = 'LMENU' -- Default keybind to attack
Config.command = 'k9' -- Command to open menu
Config.commandAttack = 'attack' -- Command to attack

-- Dog Images
Config.rottweilerIMG = "https://docs.fivem.net/peds/a_c_rottweiler.webp"
Config.huskyIMG = "https://docs.fivem.net/peds/a_c_husky.webp"
Config.retrieverIMG = "https://docs.fivem.net/peds/a_c_retriever.webp"
Config.shepherdIMG = "https://docs.fivem.net/peds/a_c_shepherd.webp"

-- Logs
Config.enableLogs = true -- Change this to false if you want to disable logs
Config.logToFile = true -- Change this to false if you do not want to log to a file // NOTE: Must have a 'log.txt' file in the resource folder.
Config.printToConsole = false -- Change this to false if you do not want every event to print to server console

-- [[ 🔴 Configuration 🔴 ]] --


-- [[ 🟢 Locale 🟢 ]] --

-- General
Locale.menu = "Police K9 Menu"

Locale.noName = "Name your police dog."
Locale.noBreed = "Set the breed of your police dog."

-- Menu Functions
Locale.sit = "Sit/Stay"
Locale.sitDesc = "Sits your dog down."

Locale.follow = "Follow/Recall"
Locale.followDesc = "Makes your dog follow you."

Locale.bark = "Bark"
Locale.barkDesc = "Makes your dog bark."

Locale.lay = "Lay Down"
Locale.layDesc = "Makes your dog lay down."

Locale.enter = "Enter Vehicle"
Locale.enterDesc = "Makes your dog enter your vehicle."

Locale.exit = "Exit Vehicle"
Locale.exitDesc = "Makes your dog exit your vehicle."

Locale.attack = "Attack"
Locale.attackDesc = "Makes your dog attack a player."
Locale.attackDesc2 = "Target Player ID"
Locale.attackDesc3 = "Police K9 Attack"

Locale.despawn = "Despawn"
Locale.despawnDesc = "Despawns your dog."

-- K9 Creation Menu Functions
Locale.setName = "Set Name"
Locale.k9Name = "K9 Name"
Locale.setBreed = "Set Breed"
Locale.createK9 = "Create K9"
Locale.createK9Desc1 = "Create your police dog."
Locale.createK9Desc2 = "Spawn your K9 into the world!"
Locale.goBack = "< Go Back"

-- Notifications
Locale.insideVehicle = "K9 is inside a vehicle"
Locale.mustBeInsideVehicle = "You must be inside a vehicle"
Locale.alreadyInsideVehicle = "K9 is already inside a vehicle"
Locale.notInsideVehicle = "K9 is not inside a vehicle"

Locale.despawned = " despawned successfully"
Locale.killed = " has been killed"

-- Logs
Locale.logSit = " sat their K9."
Locale.logFollow = " made their K9 follow."
Locale.logBark = " made their K9 bark."
Locale.logLay = " made their K9 lay down."
Locale.logEnter = " made their K9 enter a vehicle."
Locale.logExit = " made their K9 exit a vehicle."
Locale.logDespawn = " despawned their K9."
Locale.logSpawn = " spawned a K9."
Locale.logKilled = " K9 was killed."

-- [[ 🔴 Locale 🔴 ]] --

Note:
Protected by FiveM Asset Escrow system.

If you have any questions, please feel free to message me here - I would be more than happy to help. I appreciate feedback and constructive criticism. Thank you! :heart:

6 Likes

can you use this for vMenu based servers or only ESX

1 Like

This is for servers running the QBCore Framework - so unfortunately, it will not work standalone on a vMenu server. If there is enough interest in a standalone version of this script, however, I will definitely work on creating one. Thanks for your comment!

3 Likes

using escrow or open source ?

3 Likes

It’s using the new Asset Escrow system.

1 Like

no probs was just curious as our framework is based off QB but edited a fair bit so most core functions are similar but renamed QBCore to our one, thanks for the reply anyways looks great

1 Like

Ah, gotcha. I can tell you that the QBCore framework implementation is just used for job/rank checking and notifications in the script.

1 Like

why would you take a free script, change menu and make money from it?

2 Likes

Literally this script

just without warmenu.

2 Likes

I haven’t taken any free script and simply changed the menu?

I have taken inspiration for this script from a number of older ones that I found here on the forums, hence why it may seem very akin to them. However, the entire reason why I created this script in the first place, is because I could not find any newer, affordable K9 scripts without bugs and issues. My script is not a copy of any of them (although it may have similar functions), and I have plenty more features on the way in the next updates.

2 Likes

You just said its copy. Functions is the only thing that is in a K9 script.

Enter/Exit animation is 100% the same and that proves the other things are too. Just the difference is qbcore notify (idk why do you depend on qbcore when you can just add client triggers for notify without importing whole qbcore) and the nh-context menu and you are asking money for it?

Even encrypting it with escrow? what are you even encrypting when “functions” are copied from free script lol.

4 Likes

use this bro. works on vmenu server and its “FREE”

3 Likes

Are you planning on adding a search function? Like the dog walks around the car and if the car has “x” items in the truck or glovebox the dog sends an “alert”?

3 Likes

Yes, I do plan on adding a search function in the next update. Thanks for your comment.

2 Likes

Very intresting script!

1 Like

Nice bro!

2 Likes

Thanks! :heart:

1 Like

Nice bro !

1 Like

Thank you! :heart:

1 Like

Just got the script and I’m loving it so far! One suggestion I have would be have the dog attack whoever your pointing your weapon at when you hit left alt instead of having to stand next to the person so that you could send the dog from farther away.