Installation
⚙️ Installation
📥 Obtaining the Script
FS-Pets is distributed through the official Cfx.re Assets Escrow System.
All Fivesoft scripts are sold exclusively via Tebex Limited and are bound to the Cfx.re account used during purchase.
To access your files:
- Sign in to your Cfx.re Portal account used at the time of purchase.
- Open the Granted Assets section of the Cfx.re portal.
- Locate the asset listed as Pet System by Fivesoft.
- Download the package and upload it to your server.
Only accounts that own the asset will be able to access and download the files.
🧩 Dependencies
The following resources must be installed and started before fs-pets:
| Dependency | Required | Notes |
|---|---|---|
oxmysql | ✅ Yes | Database driver |
ox_lib | ✅ Yes | UI components and callbacks |
ox_target or qb-target | ⚠️ Optional | Required if NPCInteraction.Type = "target" |
ox_inventory or qb-inventory | ⚠️ Optional | Required if using consumable items |
🗄️ Database Setup
Import the following SQL into your database before starting the resource:
CREATE TABLE IF NOT EXISTS `fivesoft_pets` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`identifier` varchar(60) NOT NULL,
`model` varchar(50) NOT NULL,
`pet_texture` int(11) DEFAULT 0,
`pet_name` varchar(50) DEFAULT 'My Pet',
`hunger` int(11) DEFAULT 100,
`thirst` int(11) DEFAULT 100,
`energy` int(11) DEFAULT 100,
`is_dead` tinyint(1) DEFAULT 0,
PRIMARY KEY (`id`),
KEY `identifier` (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
The SQL file is also included in the download package at [SQL]/petsystem.sql.
📦 Inventory Items
If you are using ox_inventory, add the following items to your items.lua:
['pet_food'] = {
label = 'Pet Food',
weight = 200,
stack = true,
close = true,
},
['pet_water'] = {
label = 'Fresh Water',
weight = 150,
stack = true,
close = true,
},
['pet_ball'] = {
label = 'Tennis Ball',
weight = 100,
stack = true,
close = true,
},
Item names must match the values set in Config.Items inside shared/config.lua.
🔧 Resource Setup
- Extract the downloaded archive into your server's
resourcesdirectory. - Make sure the folder name remains exactly
fs-pets. - Ensure the resource is started after your framework and dependencies.
- Add the following line to your
server.cfg:
ensure fs-pets
Recommended load order:
ensure oxmysql
ensure ox_lib
ensure es_extended # or qb-core
ensure ox_target # optional
ensure fs-pets
The resource will stop itself automatically if the folder is renamed. It must remain fs-pets.
✅ Verify Installation
After restarting your server, check the console for one of these messages:
[FS-Pets] You are running the latest version (1.0.3).
If a newer version is available, a changelog will be printed in the console instead.