QBCore Pet Resource

SpectivePets

Advanced QBCore pet framework with personal pets, PD K9s, EMS rescue pets, trading, broker buyback, battles, cosmetics, mounting, progression, and multi-shop support.

Version 1.1
Author SpectiveScripts

Dependencies

qb-coreoxmysqlqb-targetqb-input

Commands / Entry Points

/pet

Install

Installation Flow

  1. Place the resource in your server resources folder.
  2. Import this install.sql file into the configured MySQL database.
  3. Ensure qb-core, oxmysql, qb-target, and qb-input before this resource.
  4. Add ensure SpectivePets to server.cfg.
  5. Review Config.PDJobs, Config.EMSJobs, Config.AdminPermissions, Config.PetShops, Config.Pets, and Config.PetTrade.
  6. Restart the resource and verify /pet opens and shop NPCs spawn correctly.

Database

SQL Requirements

This script needs SQL. The install file below includes the required tables for player pets and the pet battle leaderboard, along with later alter statements used by recent updates.

The bundled install.sql in this site includes the SQL required for both the docs CMS and the pet tables used by this project.

Features

Feature Overview

  • Personal pets, PD K9 pets, EMS rescue pets, and configurable multi-shop pet purchases.
  • Pet trading between players with bank-only payment and a separate NPC broker buyback flow.
  • Progression systems for loyalty, happiness, XP, levels, needs, battle rating, and mount tuning.
  • Optional pet cosmetics, pet battles, vet revive systems, and passenger mounting.

Configuration

Configuration Focus

This resource is highly configurable and most server-specific setup happens in config.lua.

  • Access: Config.PDJobs, Config.EMSJobs, and Config.AdminPermissions.
  • Catalog: Config.Pets, Config.PetTypes, Config.PetShops, and optional cosmetics definitions.
  • Economy and trade: Config.PetTrade, broker values, payout account, and price limits.
  • Mounting and combat: mount profiles, mounted attack settings, battle levels, wagers, and animations.

Database

Database Notes

The pet system uses gameplay tables and longtext JSON columns for progression, needs, outfit data, task state, and mount tuning persistence.

  • player_pets stores the pet roster and per-pet state.
  • pet_battle_leaderboard stores leaderboard and rating data.
  • The included alter statements help older installs gain newer columns safely.

If you are upgrading an older install, keep the alter statements in the import because recent features rely on fields like mount_tuning and outfit.

Troubleshooting

Operational Notes

  • If the UI does not open, confirm dependencies start first and that the player is using /pet.
  • If service-pet actions fail, verify the active pet is the right type and the player job is allowed.
  • If cosmetics preview works but purchase fails, recheck the configured money account and the cosmetic option ID.