> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-advanced-hunting/commands.md).

# Commands

## Player commands

| Command      | Description                                                                  |
| ------------ | ---------------------------------------------------------------------------- |
| `/tracking`  | Analyze nearby animal tracks during an active hunt (activates Hunter Vision) |
| `/resetlang` | Reset your language preference to the server default                         |

`/tracking` reveals information based on your trace level: species (0), + time (1), + direction (2), + distance (3), + health/condition (4), + track quality (5).

## Admin commands

### Hunting XP

| Command              | Description                |
| -------------------- | -------------------------- |
| `/hlreset`           | Reset your hunting XP to 0 |
| `/hladd [amount]`    | Add hunting XP             |
| `/hlremove [amount]` | Remove hunting XP          |
| `/hlset [amount]`    | Set hunting XP to a value  |

### Trace XP

| Command              | Description             |
| -------------------- | ----------------------- |
| `/tracereset`        | Reset trace XP to 0     |
| `/traceadd [amount]` | Add trace XP            |
| `/traceset [amount]` | Set trace XP to a value |

### Debug

| Command        | Description                                                      |
| -------------- | ---------------------------------------------------------------- |
| `/tracktest`   | Print tracking system debug info (animals, tracks, vision state) |
| `/toggledebug` | Toggle the real-time NUI debug overlay                           |
| `/loadp`       | Manually reload player XP data from the database                 |

## Key bindings

These are in-game prompts (not console commands):

| Key | Action            | When visible                               |
| --- | ----------------- | ------------------------------------------ |
| G   | Open Hunting Menu | Near hunting NPC, no active contract       |
| H   | Cancel Contract   | Near hunting NPC, active contract          |
| L   | Deliver Products  | Near hunting NPC, active contract          |
| J   | Open Bait Shop    | Near hunting NPC                           |
| K   | Hunter Vision     | During active hunt (if key toggle enabled) |

## Customizing commands

Rename a command in both `server_tracking.lua` (the `RegisterCommand` name) and `config.lua` (`Config.TrackingSettings.Command`). You can restrict admin commands with ACE:

```lua
RegisterCommand("hladd", function(source, args)
    local amount = tonumber(args[1])
    if not amount then return end
    AddHuntingXp(source, amount)
end, true)  -- true = restricted
-- server.cfg: add_ace group.admin command.hladd allow
```

## Argument reference

| Command     | Argument | Type   | Required        |
| ----------- | -------- | ------ | --------------- |
| `/hladd`    | amount   | number | Yes             |
| `/hlremove` | amount   | number | Yes             |
| `/hlset`    | amount   | number | Yes             |
| `/traceadd` | amount   | number | No (default 10) |
| `/traceset` | amount   | number | No (default 0)  |
