Pet System
Introduction
HATE-Pets is a comprehensive pet system for FiveM servers allowing players to purchase, spawn, and interact with various pets. The system features multiple pet breeds with unique abilities, commands, and animations. Players can manage their pets' health, hunger, and happiness, creating an engaging roleplay experience.
Features
Multiple pet types (dogs and cats) with unique animations and abilities
Pet status system (health, hunger, happiness) that persists in database
Special commands: Follow, Stay, Attack, Search, Track
Interactive animations
Job-locked pets for police/emergency services
Vehicle integration - pets enter vehicles with players automatically
Target system integration (ox_target, qb-target)
Pet Shop with configurable NPC
Multi-language support (English, Turkish, German)
Installation
Requirements
ESX or QBCore Framework
ox_lib
ox_target or qb-target
MySQL-Async
Setup Steps
Place the resource in your server resources folder
Import the SQL file to your database (automatically creates required tables)
Configure the
config.lua
file to match your server's needsAdd
ensure hate-pets
to your server.cfgRestart your server
Configuration
The main configuration file (config.lua
) allows you to customize:
Framework selection (ESX/QBCore)
Language preference (English, Turkish, German)
Target system preference (ox_target/qb-target)
Pet shop location and NPC details
Pet types, models, prices and abilities
Status decay rates and thresholds
Inventory item IDs
Usage
Player Commands
/pets
- Opens the pet management UI
Pet Commands
Once a pet is spawned, players can use the following commands:
Follow - Pet will follow the player
Stay - Pet will remain in place
Pet - Player will pet their animal, increasing happiness
Feed - Requires appropriate food item in inventory
Attack - Set pet to attack a target (specific pet breeds only)
Search - Have pet search players or vehicles (specific pet breeds only)
Track - Have pet track a player (specific pet breeds only)
Animations
Various animations are available depending on pet type:
Sit
Lay down
Paw
Beg
Play dead
Roll
Bark/Meow
Howl
Spin
Vehicle Integration
Pets will automatically:
Enter vehicles when their owner gets in (sitting in empty passenger seats)
Exit vehicles when their owner gets out
Return to following the player after exiting a vehicle
Configuration Examples
Adding a New Pet
To add a new pet to the system, add a new entry in the Config.Pets
table:
Customizing Pet Shop
Database Structure
The script automatically creates and manages the following database table:
player_pets
id
- Auto increment primary keyowner
- Player identifierpet_id
- Pet identifier from configname
- Custom pet namehealth
- Current pet health (0-100)hunger
- Current pet hunger level (0-100)happiness
- Current pet happiness level (0-100)purchased_at
- Timestamp of purchaselast_updated
- Timestamp of last status update
Required Items
The script requires certain items to be added to your inventory system:
Make sure to add these items to your inventory system for full functionality.
For Developers
The config.lua and language.lua files are not protected by escrow, allowing for customization. Note that the core client and server scripts are protected, limiting extensive modification.
Translations
The script comes with built-in support for English, Turkish, and German languages. You can select your preferred language in the config:
To add additional languages, you can extend the Lang
table in the language.lua file with the appropriate translations.
Support
For additional support, contact the script author through the official distribution channel.
Security Notice
This script is protected by FiveM's escrow system. The client and server-side code is encrypted and cannot be modified.
Last updated