Skip to main content

Installation

⚙️ Installation

📥 Obtaining the Script

note

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:

  1. Sign in to your Cfx.re Portal account used at the time of purchase.
  2. Open the Granted Assets section of the Cfx.re portal.
  3. Locate the asset listed as Pet System by Fivesoft.
  4. Download the package and upload it to your server.
note

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:

DependencyRequiredNotes
oxmysql✅ YesDatabase driver
ox_lib✅ YesUI components and callbacks
ox_target or qb-target⚠️ OptionalRequired if NPCInteraction.Type = "target"
ox_inventory or qb-inventory⚠️ OptionalRequired 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,
},
note

Item names must match the values set in Config.Items inside shared/config.lua.


🔧 Resource Setup

  1. Extract the downloaded archive into your server's resources directory.
  2. Make sure the folder name remains exactly fs-pets.
  3. Ensure the resource is started after your framework and dependencies.
  4. 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
warning

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.