Configuration
🔧 Configuration
All settings are located in shared/config.lua. This file is open-source and included outside escrow.
⚙️ Core Settings
Config.Framework = "ESX" -- "ESX" or "QB"
Config.Locale = 'en' -- Language file to load from /locales
Config.General = {
PetCommand = "pet", -- Command to open the dashboard or call the pet.
SleepDistance = 10.0, -- Follow offset distance from the player.
Account = 'money', -- Currency account for standard pets and store.
VIPAccount = 'credit' -- Currency account for VIP/donator exclusive pets.
}
Config.Keybind = {
Enabled = false, -- Enable native GTA key mapping for the pet command.
DefaultKey = "F5" -- Default key (players can rebind this in GTA settings).
}
🎯 NPC Interaction
Controls how players open the Pet Shop and Vet menus.
Config.NPCInteraction = {
Type = "target", -- "target" | "textui" | "drawtext"
-- Used when Type = "target" (ox_target / qb-target)
TargetDistance = 2.0,
ShopIcon = "fa-solid fa-store",
VetIcon = "fa-solid fa-staff-snake",
-- Used when Type = "textui" or "drawtext"
InteractKey = 38, -- 38 = E key
InteractDistance = 2.0,
DrawDistance = 5.0,
DrawTextScale = 0.4 -- Only applies to "drawtext" mode
}
| Type | Description |
|---|---|
"target" | Uses ox_target or qb-target third-eye system |
"textui" | Shows a TextUI prompt (requires ox_lib or fs-textui) |
"drawtext" | Renders native GTA V 3D floating text |
🐾 Pet Interaction & Animations
Config.PetInteraction = {
UseTarget = true, -- Enable third-eye on your active pet to open dashboard.
TargetIcon = "fa-solid fa-dog",
TargetDistance = 2.5
}
Config.AnimTimes = {
CommandGesture = true, -- Player points when ordering a trick.
Petting = 4000, -- Petting animation duration (ms).
Feeding = 2000 -- Feeding/drinking animation duration (ms).
}
🐕 Pet Mechanics & Combat
Config.PetMechanics = {
Invincible = true, -- Pets are immune to bullets and vehicles.
AutoTeleport = true, -- Teleport the pet to the player if it gets stuck.
TeleportDistance = 30.0, -- Distance (m) to trigger the teleport.
ScaleformControls = {
{ label = "Confirm Attack", code = 24 }, -- Left Click
{ label = "Cancel Attack", code = 25 } -- Right Click
}
}
note
canAttack = true must also be set on the specific pet entry in Config.Pets to enable K9 combat for that breed.
💩 Poop System
Config.PoopSystem = {
Enabled = true,
LifeTime = 120000, -- How long the poop prop stays before auto-deleting (ms).
PoopThreshold = 100, -- Food points required to trigger a poop event.
PoopCheckRate = 30000, -- How often digestion is checked (ms).
Props = {
['dog'] = { model = "fs-poop", offset = 0.4 },
['pug'] = { model = "prop_big_shit_01", offset = 0.15 },
['westy'] = { model = "prop_big_shit_01", offset = 0.2 },
['poodle'] = { model = "fs-poop", offset = 0.2 },
['default']= { model = "prop_big_shit_01", offset = 0.3 }
},
Cleanup = {
Enabled = true,
Type = "target", -- "target" | "interact"
InteractKey = 38, -- Only used if Type = "interact"
TargetIcon = "fa-solid fa-trash",
TargetLabel = "Clean the Poop",
Distance = 1.5
}
}
❤️ Pet Needs System
Config.Needs = {
Enabled = true,
TickRate = 60000, -- Stat decay interval (ms). Default: 1 minute.
AutoSaveInterval = 300000, -- Auto-save to DB interval (ms). Default: 5 minutes.
Decay = {
Hunger = 2, -- Hunger lost per tick.
Thirst = 3, -- Thirst lost per tick.
Energy = 1 -- Energy lost per tick while active.
},
Regen = {
Energy = 5 -- Energy restored per tick while the pet is sleeping.
},
ActionCosts = {
ThrowBall = 15, -- Energy cost for playing fetch.
Attack = 40 -- Energy cost for a K9 attack.
},
Consequences = {
ForceDismiss = true, -- Auto-store the pet if hunger or thirst hit 0.
Death = true -- Pet faints and requires the vet when stats are depleted.
}
}
warning
If Death = true and a pet faints, it cannot be spawned again until revived at the Veterinary Clinic.
🛒 Consumables Store
Config.Store = {
Enabled = true,
Account = 'money',
Items = {
{
name = "pet_food",
label = "Pet Food",
description = "Restores your pet's hunger.",
image = "nui://ox_inventory/web/images/pet_food.png",
price = 150,
max_qty = 10,
},
-- Add more items here...
}
}
Config.Items = {
FoodItem = "pet_food", -- Inventory item name for food.
WaterItem = "pet_water", -- Inventory item name for water.
BallItem = "pet_ball", -- Inventory item name for fetch ball.
FoodReward = 50, -- Hunger restored per use.
WaterReward = 50 -- Thirst restored per use.
}
Image Sources
Item images support three formats:
- Local NUI file:
"img/pet_food.png" - Inventory NUI:
"nui://ox_inventory/web/images/pet_food.png" - External URL:
"https://r2.fivemanage.com/example.png"
🏥 Veterinary Clinic
Config.Vet = {
Enabled = true,
ReviveCost = 2500,
Account = 'money',
NPC = {
Model = "s_m_m_scientist_01",
AnimDict = "WORLD_HUMAN_CLIPBOARD",
Coords = vector3(559.86, 2747.42, 42.88),
Heading = 267.79
},
Blip = {
Enabled = true,
Sprite = 463,
Color = 2,
Scale = 0.7,
Name = "Veterinary Clinic"
}
}
🧍 Shop NPC & Camera
Config.NPC = {
Model = "cs_zimbor",
AnimDict = "CODE_HUMAN_CROSS_ROAD_WAIT",
Coords = vector3(563.21, 2752.98, 42.88),
Heading = 183.95
}
Config.Shop = {
CamCoords = vector3(563.0, 2749.0, 43.0), -- Camera position for pet preview.
CamRot = vector3(-15.0, 0.0, -112.0), -- Pitch, Roll, Yaw.
PedSpawn = vector3(565.37, 2748.06, 41.88), -- Where preview pet spawns.
PedHeading = 72.12,
MinFov = 20.0, -- Max zoom-in level.
MaxFov = 60.0, -- Max zoom-out level.
ZoomStep = 5.0, -- Zoom increment per scroll.
RotationSensitivity = 0.5
}
🌍 Map Blips
Config.Blips = {
Shop = { Enabled = true, Sprite = 442, Color = 15, Scale = 0.6, Name = "Pet Shop" },
Pet = { Enabled = true, Sprite = 442, Color = 3, Scale = 0.6, Name = "My Active Pet" }
}
💎 VIP System
Config.VIPSystem = {
Enabled = false, -- Set to true to enforce VIP checks on pets with `vip = true`.
CheckVIP = function(source)
-- Return true if the player should have VIP access.
-- Example: check ESX group, QBCore job, ACE permission, etc.
return false
end
}
Pets marked with vip = true in Config.Pets will be hidden or locked unless the player passes CheckVIP.
🐾 Pet Catalog
Each pet entry in Config.Pets supports the following fields:
| Field | Type | Description |
|---|---|---|
name | string | Display name shown in the shop |
model | string | GTA V ped model name |
texture | number | Texture variation index |
price | number | Cost in Config.General.Account |
credit | number | Cost in Config.General.VIPAccount (overrides price) |
category | string | Used for UI grouping ("dog", "cat") |
anim_type | string | Animation set key in Config.PetAnims (defaults to category) |
img | string | Image path relative to web/img/ |
canAttack | boolean | Enables K9 combat for this breed |
rare | boolean | Marks the pet with a rare badge in the UI |
vip | boolean | Restricts purchase to VIP players |
['dog_rottweiler_0'] = {
name = "Standard Rottweiler",
model = "a_c_rottweiler",
texture = 0,
price = 4000,
category = "dog",
img = "animals/dog_rottweiler_0.png",
canAttack = true
},
🎭 Animation System
Animation duration works as follows:
duration value | Behavior |
|---|---|
-1 | Auto-calculated from animation length |
0 | Loops infinitely until the pet is called or moves |
> 0 | Plays for exactly that many milliseconds |
Tricks with isTrick = true appear as buttons inside the Pet Dashboard NUI.