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)
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.
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.
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)
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.
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)