[Release] K9 Script [REMOVED]

Hm. Might be an issue with the networking and the clients deleting your dog when they spawn one.

If someone has a problem with esx_kasharacters and a missing cursor just delete SetNuiFocus (false, false) from this code.

client.lua

    Citizen.CreateThread(function()
        while true do
            Citizen.Wait(0)

            -- Setting K9 Settings
            if just_started then
                Citizen.Wait(1000)
                local resource = GetCurrentResourceName()
                SendNUIMessage({
                    type = "update_resource_name",
                    name = resource
                })
                just_started = false
                SetNuiFocus(false, false)
                TriggerServerEvent("K9:SendLanguage")
            end

            -- Deletes K9 when you die
            if spawned_ped ~= nil and IsEntityDead(GetLocalPed()) then
                TriggerEvent("K9:ToggleK9")
            end
        end
    end)
1 Like

Ah. Nice find. I must have put it in there while I was doing the NUI so I didn’t get the cursor stuck.

1 Like

That should fix any more issues with that in the future for any other users.

1 Like

Anyone know how to fix it?

Nobody can see the video.

i can see it, sit in front of it with popcorn…let me tell you its a nice action film :wink:

At the time it was “unavailable”. Its visible now.

then u know maybe how to fix it ? why dog attacks me, no target?

Do you run trainers on your server? Do you run a script that makes the AI ignore the player?

I have runned CalmAI

Yeah. I have no idea if that could cause the dog to do that. Usually the dog either runs away or starts killing the person with the gun (you) if the player targetted has some sort of ai_ignore_player toggle or something.

If you haven’t fixed your error yet, take away the " from both ends of the steam ID

1 Like

Am i able to change the dogs to a diffrent type of dog?

hello, we are having issues with the script,

when we point our guns at a player and press G, the dog attacks the person giving the command

thank you in advance

Must be something you are either running on your server or trainers interfering with it. I can’t tell you what it could be interfering with it if it is a resource on your server.

Good Afternoon.

I am very new to this so I apologise if I am asking something stupid.

Is there a way to have the K9 search a person/vehicles inventory from the db rather than a random table.

Yes, its possible but it wont be something I will be adding in myself. You will need to do that on your own.

Does it work with eden_animal? Would be great if i can send order to my dog only

I dont build my resources to interact with other resources that arent mine so idk