This repository has been archived by the owner on Sep 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
Home
swkeep edited this page Jun 7, 2022
·
1 revision
How to add custom models to the script:
- step1: make an item for qb-core for example
["germanshepherd"] = {
["name"] = "germanshepherd",
["label"] = "German Shepherd",
["weight"] = 500, -- don't change weight
["type"] = "item",
["image"] = "A_C_germanshepherd.png",
["unique"] = true,
["useable"] = true,
["shouldClose"] = true,
["combinable"] = nil,
["description"] = "Shepherd is your royal companion!"
},
- step2 (config.lua): add the item at end of pets list
Config.pets = {
....
,
[10] = {
name = 'germanshepherd',
model = 'A_C_germanshepherd', -- add model name here
maxHealth = 350, -- set pets maximum health
distinct = 'yes dog'
}
}
-
note: distinct used to choice animations give pets the ability to hunt.
-
distinct = 'yes/no dog/cat'
-
step3 (shared/shared.lua): PetVariation table used to determine pet's texture and recreated color on pet respawn.
local PetVariation = {
...,
pedHash = {
variation = {
componentId = 0,
drawableId = 0,
textureId = 0
}
}
}
variationTester() -- can list most variations.
step4 (client/animator.lua): find correctionList table and then add your pet model to list
local correctionList = {
...,
['A_C_germanshepherd'] = animationList.rottweiler,
}