New release· Companion Pets: adopt, follow and ride along· Companion Pets is out
← All scripts
Companion Pets — Adopt, Follow & Ride Along for FiveM (Qbox / QBCore)

Watch the video

rr-pets v1.0.0 for Qbox, with QBCore through the bridge.

A pet that is actually theirs. Players adopt a dog or a cat at the animal shelter, or win over a stray with treats, and it follows them around the city. Tell it to sit, stay or come, feed it, rename it, and take it for a ride in the car. It is saved to the database, so it is still theirs after a relog or a server restart, and when the owner goes down it lies beside them until they are back up.

No pet-shop MLO needed. Every pet, the shelter and the strays use the game's own animals and base-map spots.

Features

  • Animal shelter with a worker and a map blip: pick a breed, name it, pay the fee. Pet food is sold there too
  • 6 breeds: husky, golden retriever, shepherd, westie, pug and cat. Prices and the list are in config
  • Strays at three spots (Grove Street, Sandy Shores, Paleto Bay). Treats build your bond until one is yours, free
  • Orders: follow, sit, stay, come, feed, rename, send home, release. From the /pet menu, a key bind or shortcuts like /pet sit for radial menus
  • Rides along in cars: takes a free passenger seat when you get in and hops out with you. Bikes, boats and aircraft are skipped
  • Hunger and bond: feeding and time together build bond. A starving pet sits until it is fed. Nothing dies
  • Downed owner: the pet lies beside you until you are revived, then follows again
  • Never lost: a pet left behind or culled is brought back to you
  • Server-authoritative: prices from config, adopting, feeding and treats distance-checked, names filtered, hunger and bond worked out on the server
  • Anti-cheat friendly: pets are spawned by the server, not the client
  • /petadmin to list nearby pets, bring one back to its owner or delete it. Exports for other resources

Good to know

  • Pets are companions only: no K9 work and no attacking
  • One pet out at a time. Config.MaxPets sets how many a character can own
  • Built and run on Qbox. QBCore is supported through the framework bridge

Requirements

  • ox_lib
  • oxmysql
  • Qbox (qbx_core), or QBCore (qb-core) through the bridge
  • ox_inventory, or QBCore's inventory (one pet_food item line to add)
  • OneSync. ox_target optional, otherwise [E] prompts

Install

  1. Put rr-pets in your resources.
  2. Add the pet_food item line from the README to your inventory.
  3. Add ensure rr-pets after ox_lib, oxmysql, your framework and your inventory.
  4. Start the server. The tables create themselves.

Open in the package: config.lua, sql and README. The client and server logic are escrowed. Delivered through your Cfx.re Keymaster.