🎮Pet Manager (Admin Tool)
🎮 Pet Manager (Admin Tool)
NEW FEATURE! Manage all server pets from in-game - no database access needed!
📋 Overview
The Pet Manager is a comprehensive administrative tool that empowers server administrators to view, monitor, and manage all pets in the database without requiring direct database access. View pet statistics, owner information, and delete problematic pets—all from an intuitive in-game menu.
Perfect for:
🛠️ Server maintenance and cleanup
🔍 Troubleshooting pet issues
📊 Monitoring pet database health
🚫 Removing glitched or abandoned pets
✨ Key Features
📊 Complete Database View
Browse all pets with detailed statistics in real-time
👥 Owner Grouping
Pets organized by owner for easy player-specific management
🗑️ Safe Deletion
Remove pets with confirmation dialog and automatic cleanup
🔒 Permission-Based
Restrict access to authorized administrators only
Complete Feature List
✅ All Pets View - Browse complete database of all pets (newest first)
✅ By Owner View - Pets grouped by owner name with pet count
✅ Detailed Statistics - View HP, hunger, thirst, loyalty, happiness
✅ Quick Delete - Remove pets with confirmation and automatic cleanup
✅ Real-time Updates - Menu refreshes after actions
✅ Owner Information - Display owner name and identifier
✅ Pet Model Display - Shows pet breed/model information
✅ Audit Logging - All deletions logged to discord server (Configure inside cdev_lib)
✅ Framework Support - Works with QBCore, ESX, and custom frameworks
✅ No Database Required - Fully in-game management
🎮 How to Use
Accessing the Menu

Command:
/petmanager
What happens:
Permission Check
System verifies you have
PermPetManagerpermissionIf denied, you'll see "No permission" notification
Menu Opens
Interactive menu appears with CDEV logo
Shows "Pet Manager" title
Displays two main sections:
All Pets (X) - Total pet count
Owner Groups - Players with pets
Navigation Ready
Click any option to browse
Use back button to return
Menu updates in real-time
Permission Required: You must have admin-level permissions configured in config.lua
Browsing Pets by Owner

Step-by-Step:
View Owner List
Scroll past "All Pets" option
See list of player names with pet counts
Format:
Owner Name (X pets)
Select an Owner
Click on player name
Opens submenu with their pets only
Browse Owner's Pets
See all pets belonging to that player
Click any pet for detailed info
Pro Tip: Players with 5+ pets may need cleanup or have duplicates
Pet Information Screen

What You See:
Information Fields Explained
ID
Unique database identifier
Number (1-999999)
Owner
Player name who owns pet
Player name or "Unknown"
Model
Pet breed/model
Model hash (e.g., a_c_shepherd)
Health
Current HP
0-100% (0% = dead)
Hunger
Food level
0-100% (low = needs food)
Thirst
Water level
0-100% (low = needs water)
Loyalty
Pet bond level
0-100% (affects behavior)
Happiness
Pet mood
0-100% (affects interactions)
Reading Pet Status
Healthy Pet:
Health: 100% ✅ Hunger: 95% ✅ Thirst: 90% ✅ Loyalty: 85% ✅ Happiness: 80% ✅
Needs Attention:
Health: 45% ⚠️ Low HP Hunger: 20% ⚠️ Hungry Thirst: 15% ⚠️ Thirsty Loyalty: 60% ⚠️ Declining Happiness: 50% ⚠️ Sad
Critical/Dead:
Health: 0% ❌ Dead Hunger: 0% ❌ Starving Thirst: 0% ❌ Dehydrated Loyalty: 30% ❌ Very low Happiness: 20% ❌ Very sad
Removing Pets from Database

Step-by-Step:
View Pet Information
Navigate to any pet's info screen
See "🗑️ Delete Pet" option at bottom
Click Delete Pet
Menu closes
Warning dialog appears
Review Warning
Shows pet name and ID
Warns action cannot be undone
Two options: "Okay" (confirm) or "Cancel"
Confirm Deletion
Click "Okay" to proceed
Click "Cancel" to abort
Pet Deleted
Success notification appears
Menu automatically reopens
Pet removed from list
Deleted from database
What Gets Deleted
Automatically Cleaned Up:
✅ Pet database entry (
cdev_petstable)✅ Pet inventory items (
cdev_pets_inventorytable)✅ Pet customization data
✅ Pet statistics and state
Not Deleted:
❌ Owner's player data (untouched)
❌ Other pets (only selected pet)
❌ Shop/clinic data
Safety Features
Confirmation Dialog:

Audit Logging Discord: [INFO] Admin PlayerName (ID: 42) deleted pet ID: 27
WARNING: Deletion is permanent! Pet cannot be recovered. Always double-check before confirming.
When to Delete Pets
Valid Reasons:
🐛 Pet is glitched or stuck
👻 Abandoned pet (owner banned/quit)
🔄 Duplicate pets
📦 Database cleanup
🚫 Pet causing server issues
Invalid Reasons:
❌ Player complaint (use in-game pet removal)
❌ Pet just died (players can revive)
❌ Low stats (players can restore)
Best Practice: Only delete pets that are causing issues or truly abandoned. Let players manage their own pets when possible.
⚙️ Configuration
File Location: public/config/config.lua
Section: Permissions
Debug Modes Enable: Yes (cdev_lib > public > config > config.lua and cdev_pets > public > config > config.lua)
Restart Required: Yes both resources first > (restart cdev_lib) and after ( ensure cdev_pets)
Permission Configuration
Permission Levels Explained
Available Permission Levels
For the permission system to work correctly, the player must be registered in the server file server.cfg or permissions.cfg with group.admin command allow, as shown in the image bellow

NEVER use PERMISSION_NONE! This allows ALL players to delete any pets on the server!
💡 Use Cases
For Server Owners
Regular Maintenance:
Weekly database cleanup
Remove abandoned pets (players who quit)
Delete duplicate pets
Clear glitched pets
Troubleshooting:
Player reports pet stuck/missing
Check Pet Manager for pet status
Verify pet stats and location
Delete if necessary, player can respawn
Monitoring:
Check total pet count regularly
Identify players with excessive pets
Monitor pet health trends
Spot database issues early
For Admins
Player Support:
Scenario 1: "My pet disappeared!"
Open Pet Manager
Search owner's name
Check if pet exists in database
View pet stats
If glitched: Delete and inform player to respawn
Scenario 2: "I can't delete my pet"
Open Pet Manager
Find player's pets
Check pet status
Delete problematic pet
Player can get new pet from shop
Scenario 3: "Pet is stuck on table"
Open Pet Manager
Find specific pet
View pet stats (check if on table)
Delete pet to clear table
Owner respawns pet normally
For Database Management
Cleanup Operations:
Remove Abandoned Pets:
Check players who quit server
Open Pet Manager
Browse by owner
Delete pets of banned/inactive players
Fix Duplicates:
Notice player has multiple identical pets
Compare pet IDs and stats
Keep newest pet (higher ID)
Delete older duplicates
Resolve Conflicts:
Pet causing lag or errors
Identify via Pet Manager
Check stats for anomalies
Delete problematic pet
Best Practice: Always inform pet owner before deletion (unless banned/inactive)
🎯 Menu Navigation Guide
Menu Hierarchy

Navigation Tips
Keyboard Shortcuts:
ESC- Close menuBACKSPACE- Go back one levelENTER- Select option
Mouse:
Scroll to browse long lists
Click to select
Click back arrow to return
Finding Specific Pets:
Method 1: Search by Name
Open "All Pets"
Scroll to find name
Pet names are alphabetical
Method 2: Search by Owner
Browse owner list
Find player name
View their pets only
Method 3: Search by ID
Open "All Pets"
Look for "(ID: X)" in name
IDs are sequential
⚠️ Troubleshooting
Common Issues and Solutions
Menu Won't Open
Problem: Typing /petmanager does nothing
Solutions:
✅ Check you have
PermPetManagerpermission in config✅ Verify your admin/god/ ace command permission is active
✅ Restart cdev_pets:
restart cdev_pets✅ Check F8 console for errors
✅ Reconnect to server
No Pets Showing
Problem: Menu opens but "All Pets" shows 0 pets
Solutions:
✅ Check if any pets exist in database
✅ Verify
cdev_petstable exists✅ Check database connection (other resources working?)
✅ Restart both cdev_pets and cdev_lib
✅ Check server console for SQL errors
Verify Database:
SELECT COUNT(*) FROM cdev_pets;
If returns 0: No pets in database (this is normal if no players have pets yet)
If returns NULL/error: Database table missing or corrupted
Delete Doesn't Work
Problem: Click "Delete Pet" but pet still exists
Solutions:
✅ Check confirmation dialog appeared
✅ Verify you clicked "Okay" (not "Cancel")
✅ Check server console for errors
✅ Refresh Pet Manager (close and reopen)
✅ Check database directly
Verify Deletion in Database:
SELECT * FROM cdev_pets WHERE id = [pet_id];
If pet still exists:
Check server console for SQL error
Verify database permissions
Check if pet is spawned (might need despawn first)
Menu Doesn't Refresh
Problem: After deleting pet, menu still shows it
Solution: Menu automatically refreshes after deletion.
If it doesn't:
✅ Wait 1-2 seconds (slight delay)
✅ Close and reopen menu manually
✅ Check if deletion actually succeeded (server console)
✅ Restart resource if persistent
❓ FAQ
Last updated
