Fivem Custom Pets Sc

You decide how much to pay.

Fivem Custom Pets Script [Standalone/ESX/QB]

Package Description

A standalone pets script for FiveM

Demo:  https://youtu.be/7cm1YygMgXY

Support & Questions: https://discord.gg/B9ZxYUtZzv 

Updates:

 - 6/22/22: Added option in config to grant access to all pets (or specified pets in config) to all players

Dependencies :

None

Features :

- Assign any player the ability to summon their own pet animal (any animal in the game)

- Or use your own API/permissions checking in custom.lua

- Each pet has at least ONE animation. Large dogs have tricks they can do such as 'beg', 'paw', 'sit' and many more!

- Pets can follow your player, stay, get in nearby vehicles, and wander nearby area

- Options to give players access to the pet menu for QBCore or ESX (per character) or standalone (any character the person has)

- Logic of the code and UI is encrypted, but configuration is open

- Option to notify players if they do not have permission to open the pets menu

 - This implementation is in `notify.lua` and is up to you to put in your notification resource's usage

- Open config to change:

 - Key to open the menu

 - Show a blip on the map to mark your pet (only you can see it)

 - Optional animation to whistle to call your pet to you

 - Optional to allow players to whistle to call their pet (e.x. dpemote /e whistle)

 - Optional pet invincibility. Prevent players' pets from dying. (They can always respawn if they do die)

 - Configurable distance to automatically despawn pet

- 0.00 - 0.03 ms usage

Default config :

```

Config = {}

Owners = {}


Config.OpenPetsMenuKey = 'N'


Config.Framework = 'QBCORE' -- Options: QBCORE | ESX | Standalone


Config.ShowBlip = true -- Show the player a blip of their pet on the map


Config.PlayCallAnimation = true -- should the player whistle when they "call" there pet to follow them

Config.ComeWhenCalled = true -- should the pet come when the player does the whistle emote (e.x. dpemotes /e whistle)


Config.PetInvincibility = true -- should the pet be invincible to all damage


Config.DistanceBeforeDespawn = 100 -- how far you can go from the pet before it auto despawns


Config.GrantAllAccess = false -- give every player in your server access to ALL pets (if true then you dont need to set up the Owners list below)

Config.UseCustomPermissionsCheck = false -- ONLY USE THIS IF YOU KNOW WHAT YOU ARE DOING FOR CODING in custom.lua


Owners = {

    ['salty'] = { -- name here doesnt matter, just to help you keep track of players

        ['id'] = { -- leave any of these ids blank if you dont want to use them

            ['license'] = 'license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', -- Standalone

            ['citizenid'] = 'ABC12345', -- QBCore

            ['identifier'] = 'char1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', -- ESX

            ['discord'] = 'discord:1111111111111111' -- Discord identifier

        },

        ['pets'] = { -- case sensitive

            Pets['chop'],

            Pets['oldchop'],

            Pets['cat'],

            Pets['husky'],

            Pets['poodle'],

            Pets['pug'],

            Pets['retriever'],

            Pets['rottweiler'],

            Pets['shepherd'],

            Pets['terrier'],

            Pets['boar'],

            Pets['chimp'],

            Pets['cow'],

            Pets['coyote'],

            Pets['deer'],

            Pets['hen'],

            Pets['mtlion'],

            Pets['pig'],

            Pets['rabbit'],

            Pets['rat'],

            Pets['rhesus'],

            Pets['chickenhawk'],

            Pets['cormorant'],

            Pets['crow'],

            Pets['seagull'],

            Pets['dolphin'],

            Pets['fish'],

            Pets['humpback'],

            Pets['killerwhale'],

            Pets['hammerhead'],

            Pets['tigershark'],

            Pets['stingray'],

            Pets['panther'],

        }

    }

}


-- if you use GrantAllAccess = true then these are the pets that EVERYONE will see

Config.AllAccess = {

    Pets['chop'],

    Pets['oldchop'],

    Pets['cat'],

    Pets['husky'],

    Pets['poodle'],

    Pets['pug'],

    Pets['retriever'],

    Pets['rottweiler'],

    Pets['shepherd'],

    Pets['terrier'],

    Pets['boar'],

    Pets['chimp'],

    Pets['cow'],

    Pets['coyote'],

    Pets['deer'],

    Pets['hen'],

    Pets['mtlion'],

    Pets['pig'],

    Pets['rabbit'],

    Pets['rat'],

    Pets['rhesus'],

    Pets['chickenhawk'],

    Pets['cormorant'],

    Pets['crow'],

    Pets['seagull'],

    Pets['dolphin'],

    Pets['fish'],

    Pets['humpback'],

    Pets['killerwhale'],

    Pets['hammerhead'],

    Pets['tigershark'],

    Pets['stingray'],

    Pets['panther'],

}

```

List of available pets and their animations:

- Chop, Old Chop, Husky, Retriever, Rottweiler, and Shepherd:

    - Lay

    - Beg

    - Sit

    - Paw

    - Pet (Your pet comes to you and you scratch their ears)

    - Play Dead

    - Pretend Attack (Does not actually attack peds or people)

- Pug, Poodle, Terrier

    - Sit

    - Lay (Small dogs switch between sitting and laying)

    - Play Dead

    - Pretend Attack

- Cat (spawns a different variation each time)

    - Lay

    - Play Dead

    - Scratch Ear

- Boar

    - Play Dead

    - Grazing

    - Pretend Attack

- Chicken Hawk

    - Feeding

    - Play Dead

- Cormorant 

    - Play Dead

- Cougar, Panther

    - Lay 

    - Growl

    - Pretend Attack

    - Play Dead

- Cow

    - Grazing

    - Play Dead

    - Moo 

    - Sit

- Coyote

    - Sit

    - Lay

    - Pretend Attack

    - Play Dead

- Crow

    - Feeding

    - Play Dead

- Deer

    - Grazing

    - Pretend Attack

    - Play Dead

- Dolphin

    - Play Dead

- Fish

    - Play Dead

- Seagull

    - Feeding

    - Play Dead

- Hammerhead Shark

    - Pretend Attack

    - Play Dead

- Hen

    - Pecking

    - Intimidate

    - Play Dead

- Humpback Whale

    - Play Dead

- Killer Whale

    - Pretend Attack

    - Play Dead

- Chimpanzee, Rhesus monkey

    - Play Dead

    - Die (other play dead animation)

- Pig

    - Grazing

    - Pretend Attack

    - Play Dead

- Pigeon

    - Feeding

    - Play Dead

- Rabbit

    - Eating

    - Play Dead

- Rat

    - Eating

    - Play Dead

- Tiger Shark

    - Pretend Attack

    - Jump Upwards

    - Play Dead

- Stingray

    - Play Dead