[Free][Release] Police K9 Script

It was a rare instance before; not much that could be done to stop it. I think it did have an audio cue of the dog barking. So if the handler hears a bark they should use the follow command and try again.

Appreciate that, it doest seem to work though. No errors in F8 or server console:

{
options = {
{
icon = ā€œfas fa-hand-point-upā€,
label = ā€œGet/Return K9ā€,
action = function(entity)
PlayerData = ESX.GetPlayerData()
local hasItem = false
for k, v in ipairs(PlayerData.inventory) do
if v.name == ā€˜k9certā€™ and v.count > 0 then
hasItem = true
break
end
end
if hasItem then
TriggerEvent(ā€˜angelicxs-k9script:jobcheckerā€™)
end
end,
},
},
job = Config.LEOJobName,
distance = 1.5
})

end)

Just use the new version of the client/config. It has it all in properly.

is there away to change the model of the dog

line 139 is local hash = HashGrabber(ā€˜a_c_shepherdā€™)
Simply change ā€˜a_c_shepherdā€™ to whatever model you want.

hey angelicxs getting a issue where the dog keeps attacking when we get it to Search

The ped seems to be temperamental at times. There is an audio cue when attacking (the dog barks) so if the player hears that they should use the Follow command to stop the dog and try again.

Yeah we have tried the follow and sot commands to the dog being like stuck in attack mode lol

That is really weird, any console errors?

@angelicxs Is there a way to increase the dogs Health? Someone punched the dog once and it died. Thanks

At about line 150 add this:

SetEntityHealth(Dog,200)

where is the download link

It is the github link found in the body of the initial post.

Hello, im facing a issue where the dog is not spawning while retreiving it from the PD, it gives no errors aswell, any tips

As per DMā€™s a different script was blocking the ped spawning.

What framework are you using? Have your properly selected the appropriate one in the Config?

Iā€™m currently getting this

Iā€™m using ESX and only changed the coords for where you can spawn the k9 as im using a map mod for the police station so the layout is different

Have you made any edits to the client or server .lua files? I was unable to replicate your error on a fresh ESX server.

I will also note that this script does NOT natively support ox_target and you will need to add the appropriate export yourself.

1 Like

The error you show indicates that the client side files may have been adjusted. Please only use the config for customization purposes unless you are confident in your coding skills.

I recommend re-downloading the file again to fix the problem. I also note that you are getting an AddBoxZone error for qb-target. Please confirm that the third eye program you are using is indeed qb-target and that it is set to standalone as you are using ESX.

Thank-you, Iā€™ll be able to re download once i an home as Iā€™m currently at work