[Paid][Deprecated]Pets+ With Police K9 Included

This script has been removed and a new one reworked in it’s place, you can find the forum post over at

Some of my other scripts: Oxy/Deliveries | Taco Job | Meth Making | Mechanic Job | BMX Comp Standalone | Fitness, Group Yoga & More | More Interactive Stores | Burgershot | Prison+ | Underwater Salvage Job | Jewelry Store | Chop Shop | The Best Trading Cards Script To Date | Cluckin Bell | Chicken Job

10 Likes

Its only work with bt-target?

3 Likes

Nope! The only thing bt-target is used for in the script is the Shop & Vet NPC Interaction. You can easily change this to be drawtext if you desire (and anyone that needs help who has bought the script, I’ll help them do it)

1 Like

Great release!

1 Like

Thanks! It’s been converted over to QBcore as well, I’ll work on removing the bt-target requirement and making it a config option for those who don’t want to use it.

2 Likes

I’d love this one if you add in the ability to search vehicles with the k9. Great work tho!!!

2 Likes

Thanks! That is a tricky one as everyone seems to use different inventories and how to trigger/open them

Good one! Keep doing :slight_smile:

1 Like

bookmarked for later. GLWS

2 Likes

in functions k9 only attack? is there a search for items (drugs)?

1 Like

Hi! :slight_smile: The script looks great, good job!

What is the resmon of the script?

Would be fantastic if the police dog could search drugs and weapons (or any other object that the person has in the inventory declared as illegal and is placed in the config). If that could be done for people and vehicle inventories it would be impressive.

2 Likes

I’m sure it could be done, but depends mainly on your inventory of choice. As far as the resmon goes, it sits at 0.01 and -may- jump to 0.02/0.03 although I havn’t personally seen it. Everything runs in a thread inside a function (which is only called when the pet is out)

Great! About my inventory, im using qb-inventory. in general, in qbus all we use that inventory, I suppose it would be “”“easier”"" to adapt.

1 Like

Here you go.

I’m not sure how Qbcore works for getting closest player or doing inventory checks so I’ll have to get someone to convert it, but the next update for Pets will include K9’s being able to search players for actual items.

Hey bro. i am not using btarget or poly. i’m just using normal. how can i convert this script?

1 Like

Maybe this is helpful for you in QB:

Closest Player/Vehicle maybe with this:

ESX.Game.GetClosestPed -> QBCore.Functions.GetClosestPed

ESX.Game.GetClosestPlayer -> QBCore.Functions.GetClosestPlayer

ESX.Game.GetClosestVehicle -> QBCore.Functions.GetClosestVehicle

About item players in inventory in our server we create a generic function (like a lib) to call it when necessary. Maybe for you it is not so useful to do it like that:

Server

function getitemcount(source, itemName)
    local xPlayer = QBCore.Functions.GetPlayer(source)
    if xPlayer ~= nil then
        local item = xPlayer.Functions.GetItemByName(itemName)
        if item ~= nil then
            if item.amount ~= nil then
                if item.amount > 0 then
                    return item.amount
                end
            end
        end
    end
    return 0
end

And (server):

QBCore.Functions.CreateCallback('MyGenericLib:HasPedGotItem', function(source, cb, itemName)
    local source = source
    local xPlayer = QBCore.Functions.GetPlayer(source)
    if xPlayer ~= nil then
        local item = xPlayer.Functions.GetItemByName(itemName)
        if item ~= nil then
            if item.amount ~= nil then
                if item.amount > 0 then
                    cb(item.amount)
                    return
                end
            end
        end
    end
    cb(0)
    return
end)

Client (for example):

 TriggerServerEvent('MyGenericLib:HasPedGotItem', function(amount)
                    TriggerServerEvent('MyGenericLib:RemovePlayerItem', "hunt_clip", amount)
                end, "hunt_clip")
1 Like

I’ll try and get around to converting to 3dtext for those who don’t like Poly today

1 Like

That would be great

2 Likes

Please ping the post once youve made the update! I was going to ask the same as the person above but they beat me to it!

For sure will get this once it works without poly or bt.

1 Like

What happens when i bought the script and you do Update later on? Will i receive the update files?

2 Likes