[QBCORE] Keep-companion - qbcore pet system

It’s in step 3 of the read me:

If you’re using the ox version it’s also in the read me.

Hi so I am having the problem where on the map the Pet Shop Icon doesn’t show up. The showblip is set to true and the name shows up on the blip categories but not on the map itself. Anyone know how to fix?

Is there a way to make the pets autoattack certain peds? I have a zombie server and want to make the pets attack all hostile npcs.

Uncaught TypeError: Cannot read properties of undefined (reading ‘phone’) (@ps-inventory/html/js/app.js:502) currently getting this error has anyone seen this one? been trying to fix it. using jprphonesystem

Still the best pet system out there. Been seeing a lot of paid pet system being sold that aren’t worth the money. Just use this, do a little configuring and you should be good to go.

If you could help me or if you have had the same issue could you help me fix please? I am having the issue where when I call my pet in from my inventory the pet will literally die on impact with the ground. How do I fix this?

Your pet is dead. Revive it.



Like this is definitely not supposed to be happening right?? No errors in either consoles…

How is he dead when i just had a fresh restart on the server and my pet was alive before the restart… so how is my pet dying.

It is definitely a bug because I can bring him back into my inventory and out again at different spots of the map while playing and my pet will be very alive and then ill call him back out and he will be dead like in this video… so how is that then?

No clue, you will need to troubleshoot this yourself. Usually a pet dying on spawn means it’s dead from injury or starved to death. Likely you need to feed it and revive it.

Additionally, pets will die when spawned in weird places as they sometimes will die from falling.

How do YOU keep your pet from not dying on spawn then? Since it seems like your not having these issues. How do you keep yours from not dying?

Like I said, for me this only happens when spawning them in weird places where they fall to their death or ragdoll. Animals spawned don’t die unless they’ve previously been killed or their owners didn’t feed them or give them water.

Gotcha thanks.

  1. Why didn’t you put that code in code-block like you did with the “search the event” text?! :thinking:Its much more easier for people to just copy and paste rather then to re-write the code from an image…

  2. I bet you were writing the code fast with the result of making a typo (writing Truck instead of Trunks)! ALWAYS take your time when writing codes! If you’re in a hurry, then take a break. You cannot make typos like this in coding! Otherwise you will have tons of people coming to you with problems. And always re-read the code you’ve just typed in to make sure everything is correct!:warning:

Here is the correct code for everyone to copy and paste in your qb-inventory/server/main.lua:

RegisterNetEvent('inventory:server:SetIsOpenState', function(IsOpen, type, id)
	if not IsOpen then
		if type == 'stash' then
			Stashes[id].isOpen = false
		elseif type == 'trunk' then
			Trunks[id].isOpen = false
		elseif type == 'glovebox' then
			Gloveboxes[id].isOpen = false
		elseif type == 'drop' then
			Drops[id].isOpen = false
		end
	end
end)

exports('getTrunks', function(id)
	return Trunks[id]
end)
	
exports('getGloveboxes', function(id)
	return Gloveboxes[id]
end)

And you forgot to add an image for the rat pet!

Also, how can I check my pet’s health status?