[Free][Release] Police K9 Script

For ESX or QBCore.

This is a lite Police K9 Script that provides enough functionality to get a solid K9 unit rolling. Main functionality:

  • Enter/Exit Vehicles
  • Search/Attack Players
  • Stay
  • Follow
  • Job & Rank Lock
  • Third-Eye Spawn/Despawn
  • Easily add more illegal items to script
    ** QBCORE ONLY **
  • Search player owned vehicles

Buttons for commands can easily be swapped in the config.

GitHub Link: Police Dog
Youtube Link: Video

Other Free Scripts By Me:
Elevators
Free VIN Scratch
Car Flipping
Metal Detectors
Loot Boxes
Gang Heist
Police Database Search
Police K9
Yacht Heist
Billing
Medical Diseases / Illnesses
Drug Harvest
Police Cell Ping
Number Game
Civilian Job Mega Pack
Simple Craft
Target Ping
Full Steal
Bank Truck Robbery

Paid Scripts by Me:
Fuel Delivery Job
Rep Based Vehicle Heist
Mining/Delivery Job
Police Tracker
Police Impound & Tow Job
Bank Job

20 Likes

Great script thought i am having a issue getting the dog to actually sit in the car?

2 Likes

Is the dog going inside the car?

1 Like

No its just walking into the car but doesnt actually get in

Same issue with vehicles

1 Like

Please download the newest client version. I have fixed the issue.

So far so good, thank you. I’ll work on the ESX car searching.

Oop…Something else, when i shoot my weapon the dog attacks me :smile:

I was unable to replicate this; I even shot the dog and it wouldn’t attack me.

So i updated and everything and it was working but then i changed the keys to tell the dog to stay and follow and now it wont get in the cars

EDIT- I just restarted it and now it works but is there away to make them stay in the cars

In the client change line 238 from

while inVehicle do

to

while inVehicle and Follow do

That should make them stay in the vehicle if the stay command is used before getting out.

Ok, Thxs. Also when you try to Search people some times it attacks them.

Edit also we cant get the K9 to get out the car after we tell it to stay

Did you try to use the follow command before getting out?
The suggested fix was haphazard at best; I am more surprised it kept the Dog in.

Something else real quick, is it possible for a quick edit to make the third eye function work to take the dog if the player has an item on them? I tried to do it but give up. (ESX) I want any rank PD to get the dog, if they are holding K9 certification.

Ok So when you tell the K9 to search a car or player after it searches them it wont get back in the car with you anymore.

Ya its possible to do; in the client side about line 84 (where the target function is) you would replace

action = function(entity)
    TriggerEvent('angelicxs-k9script:jobchecker')
end,

with


action = function(entity)
 PlayerData = ESX.GetPlayerData()
 local hasItem = false
 for k, v in ipairs(PlayerData.inventory) do
   if v.name == 'k9certificationitemname' and v.count > 0 then
       hasItem = true
       break
   end
 end
  if hasItem then
      TriggerEvent('angelicxs-k9script:jobchecker')
  end
end,
1 Like

So newest push fixes these problems; it also natively has the ability to have the dog stay in the car when the stay command is used. Just note if you tell the dog to follow you after it has been left in the car (via the stay command) it will teleport behind the player.

Ok thxs for all the help your the best.

Just made it a native option for the entire script; go ahead and get the new client/config.

Sorry i think i asked this before but If you tell it to search a player sometimes it will just randomly attack