> For the complete documentation index, see [llms.txt](https://andrew-grenade.gitbook.io/sheen-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://andrew-grenade.gitbook.io/sheen-scripts/paid-resources/sh-k9.md).

# sh-k9

A complete K9 system for FiveM. Register and deploy your own police dog, train it through a level system, search players and vehicles, track suspects by scent, and much more. The script also includes a separate **Player K9** mode that lets a player transform into a fully controllable dog.

### Compatibility

* **Frameworks:** ESX · QBCore · QBX · ND\_Core *(or fully standalone)*
* **Inventories:** ox\_inventory · qb‑inventory · qs‑inventory · ps‑inventory · tgiann‑inventory · ak47\_inventory

> Missing your framework or inventory? The bridge files are open, so you can add your own.

***

### Getting Started

Everything is driven by a single menu plus a set of commands/keybinds. All command names and key bindings can be changed in `config/config.lua`.

| Command       | What it does                          |
| ------------- | ------------------------------------- |
| `/k9`         | Opens the main K9 menu                |
| `/k9register` | Register a new K9 unit (name + breed) |
| `/k9player`   | Toggle Player K9 (dog) form           |
| `/k9settings` | Open the settings menu                |

> **Tip:** Every action also has its own command and can be bound to a key (see the *Keybinds* section of the config), so players can use the menu **or** hotkeys — whatever they prefer.

**Who can use it** is controlled in `config/restrictions.lua`. You can restrict access by **job & grade**, **ACE permission**, or **Discord role**.

***

### AI K9 (Police Dog)

Register a dog, give it a name and breed, then deploy it from the menu. Your dog levels up as you use it, gets hungry and thirsty, can be healed, and remembers its look and progress between sessions.

#### Systems

* **Level & XP** – the dog gains experience from searching, tracking, attacking and fetching. Higher levels improve success rates and remove some restrictions. *(Can be disabled in the config.)*
* **Needs (Hunger & Thirst)** – drain over time, feed your dog to keep it healthy. If they hit zero, the dog can start losing health.
* **Health, Armor & Downed state** – the dog can be given armor, be downed, revived, or healed.
* **Tackle** – bites can tackle a suspect to the ground or ragdoll them.
* **Live HUD** – shows the dog's name, level & XP, health, armor, hunger and thirst. It can be toggled on/off and dragged anywhere on screen.
* **Appearance & Breeds** – pick from multiple breeds and customize components/textures, the look is saved with the dog. You can also add your own ped models in the config.
* **Spawn Areas** – optionally restrict where dogs can be deployed.
* **Third‑eye support** – if you run ox\_target / qb‑target / qtarget, you can interact with the dog directly (heal, feed, carry, pet…).

#### Menu Options

| Option                          | What it does                                                                   |
| ------------------------------- | ------------------------------------------------------------------------------ |
| **Follow** (Normal / Lead)      | The dog follows you, either at your side or leading ahead.                     |
| **Leash**                       | Attach/detach a leash so the dog stays within range of you.                    |
| **Target Mode**                 | Aim with your camera and command the dog — see *Target Mode* below.            |
| **Vehicle** (Toggle / seats)    | Send the dog in or out of a vehicle, into a chosen seat.                       |
| **Search** (Player / Vehicle)   | The dog searches the nearest player or the vehicle in front for illegal items. |
| **Tracking** (All / By Vehicle) | The dog picks up a scent trail and leads you toward nearby targets.            |

| Option                             | What it does                                                             |
| ---------------------------------- | ------------------------------------------------------------------------ |
| **Carry**                          | Pick the dog up and carry it.                                            |
| **Feed**                           | Restore the dog's hunger/thirst.                                         |
| **Animation**                      | Play a trick: Sit, Lay Down, Bark, Beg, Paw, Indicate, Sniff or Petting. |
| **Throw** (Ball / Frisbee / Fetch) | Throw a toy and have the dog fetch it back to you.                       |
| **House** (Place / Toggle)         | Place a dog house and send the dog in or out of it.                      |
| **Heal** (Revive · Heal / Armor)   | Revive or heal the dog, or apply armor.                                  |
| **Camera** (Mount / Toggle)        | Mount a camera on the dog and view its live feed.                        |
| **GPS**                            | Attach a GPS tracker that shows the dog's position on the map.           |

**Settings** – toggle the HUD, drag the menu/HUD anywhere on screen, and reset positions.

#### Target Mode

A quick "aim & command" mode. Open it, aim with your camera, and a prompt appears at the bottom of the screen. Scroll the mouse wheel to pick an option, press **E** to confirm, **G** to cancel.

* Aiming at a **player** → *Search* or *Attack*
* Aiming at an **NPC** → *Attack*
* Aiming at a **vehicle** → *Search* or *Enter*
* Aiming at the **ground** → *Move dog here*

***

### Player K9 (Dog Form)

A separate mode that turns the **player** into a fully controllable dog (handy for animal roleplay, special units, etc.). Use `/k9player` to transform, pick your breed and look in the setup menu, then confirm.

| Option                        | What it does                                                     |
| ----------------------------- | ---------------------------------------------------------------- |
| **Track**                     | Enter scent mode and follow glowing trails to nearby players.    |
| **Search** (Player / Vehicle) | Sniff a nearby player or the vehicle in front for illegal items. |
| **Tricks**                    | Play an animation: Sit, Lay, Bark, Beg, Paw, Alert or Sniff.     |
| **Relieve**                   | Play the pee/poo animation (on a short cooldown).                |
| **Exit Form**                 | Turn back into a human.                                          |

**Vehicles:** press **F** to get in/out of a car as a dog — the same key you'd normally use.

**Built‑in safety:**

* You **cannot** use an AI K9 unit while you're in dog form (and vice‑versa).
* Dogs can't hold weapons — anything equipped is removed automatically.
* Optional **transform areas** can limit where players are allowed to change form.

***

### Support

For setup help, framework/inventory compatibility, or any issues, please reach out through our support channel. Thank you!
