PetShop For ESX

A new petshop for fivem

  • Available Animals: Dog, Cat, Bunny, Husky, Pig, Poodle, Pug, Retriever, Alsatian Dog, Westie
  • pet can get in the car and exit, the pet can attack who do you want.
  • simple Config file for easy customization.
  • some pets can fetch the ball that you can get it on shop !
  • a good building

Video Preview :

Customization

You can :

  • Change Age&Hunger minutes
  • Change Pets Price
  • Change Pets Name in Buy Menu
  • Petshop blip

Updates for Future

  • More customizable
  • Change How To Buy
  • Trying to add Bird Animals
  • Add More Ability For Pets
  • And much more…

Requirements

Support

Credits

Download

https://github.com/ZzMaMaDzZ/mdr_petshop

6 Likes

hello, vidéo pls ?

Hello MDR_PETSHOP - YouTube

1 Like

Insane work thank you so muc hfor making this free :sunny: :heart: What is the resmon and can we decide how long 1 Year takes? And can the pet die after X years?

Thank you :heart:
CPU msec : 0.02 ms
Time : 0.56 / 4.60
Memory : 2.01 MiB

This is what i got

Yes you can define it in config.lua and yes pet is gonna die after x years

3 Likes

I can buy a pet but it does not appear to want to following me when pressing Y
Also is does not appear anything is writing to the DB.
Not getting any errors however.

Using ESX Legacy and mysql-async is working just fine.

is other things else stored in the DB?
i think its your server problem or there is a problem with your DB cause i tested it right now and pet followed me

Plenty of things stored in my DB with no issue.

Maybe issue with multicharacter?

i mean do you have pets table in your DB?

Yes, imported just fine, only changed identifier from 50 to 60

can you add a print("worked") to Line 442 after cb(true) that we understand if it printed in console or not?
(i tested it again right now and it worked)

1 Like

i having the same thing going on i can buy any pet but cant follow or do nothing thanks

ESX.RegisterServerCallback("mdr_petshop:setPetFollowing" , function(src, cb, following)
	local identifier = src
	for k,v in ipairs(GetPlayerIdentifiers(src)) do
		if string.match(v, 'license:') then
			identifier = string.sub(v, 9)
			break
		end
	end
	MySQL.Async.execute('UPDATE pets SET following = @following WHERE identifier = @identifier', {
		['@identifier'] = identifier,
		['@following'] = following
	}, function(rowsChanged) end)
	cb(true)
        print("worked")
end)

Not giving print

so i’m gonna test it in another server test tomorrow and fix this, thank for your patience

ESX.RegisterServerCallback("mdr_petshop:setPetFollowing" , function(src, cb, following)
	local identifier = src
	for k,v in ipairs(GetPlayerIdentifiers(src)) do
		if string.match(v, 'license:') then
			identifier = string.sub(v, 9)
			break
		end
	end
	MySQL.Async.execute('UPDATE pets SET following = @following WHERE identifier = @identifier', {
		['@identifier'] = identifier,
		['@following'] = following
	}, function(rowsChanged) end)
	cb(true)
    print("worked")
end)

yea my bad i realized that, print did not happen when putting it in like that

so i have to test it in another test server tomorrow

1 Like

nice cute one

1 Like

Just letting you know, as I made a paid pet script recently, using groups on onesync is not advised. It works great when You are the only one on the server. But as soon as you add someone else, groups seem to break and the ped will no longer be in Your group, but Theirs. An easy way to get around this with Pets following, is to have them just follow the player via gotoentity and then the player every so often when the player is out of X range.

1 Like

Yes you are right, I did not use groups I just forgot to remove the GroupHandle variable
and thank you for advice :heart:

3 Likes