# Modules

Built-in gameplay modules that extend the emote system with movement and interaction features.

***

### Crouch

A complete crouch and prone system with crawling.

#### Crouch mode

| Action  | Default key |
| ------- | ----------- |
| Toggle  | `Left Ctrl` |
| Command | `/crouch`   |

* Overrides GTA's stealth mode (configurable)
* Adjusts weapon clipsets automatically
* Optional FPS firing restriction while crouched

#### Prone mode

| Action        | Key         |
| ------------- | ----------- |
| Toggle        | `Left Ctrl` |
| Command       | `/crawl`    |
| Flip over     | `Space + E` |
| Crawl forward | `W`         |
| Crawl back    | `S`         |
| Turn          | `A / D`     |

Supports both front and back orientations. Automatically cancels near water or on fall.

#### Config

```lua
Config.Crouch = {
    Enabled = true,
    UseKeybind = true,
    Key = "lcontrol",
    OverrideStealth = true,    -- Skip stealth when crouch key = duck key
    CrawlEnabled = true,
    CrawlKey = "lcontrol",
    FpsRestriction = false,    -- Block shooting while crouched
}
```

***

### Pointing

Camera-driven finger pointing with IK (inverse kinematics).

| Action  | Default key |
| ------- | ----------- |
| Toggle  | `B`         |
| Command | `/finger`   |

The pointing direction follows the camera angle in real-time. Detects first-person view for proper IK blending.

#### Config

```lua
Config.Pointing = {
    Enabled = true,
    Key = "B",
}
```

***

### Ragdoll

Toggle ragdoll physics on your character.

| Action  | Default key |
| ------- | ----------- |
| Toggle  | `U`         |
| Command | `/ragdoll`  |

* Blocked while dead or in vehicles
* Automatically cancelled when another emote is played
* Shows help text to get up

#### Config

```lua
Config.Ragdoll = {
    Enabled = true,
    Key = "U",
    ToggleMode = true,    -- true = toggle, false = hold to ragdoll
}
```

***

### Hands Up

Simple hands-up animation with looping.

| Action  | Default key |
| ------- | ----------- |
| Toggle  | `X`         |
| Command | `/handsup`  |

#### Config

```lua
Config.Handsup = {
    Enabled = true,
    Key = "X",
}
```

***

### Binoculars

Full-featured binoculars with zoom and vision modes.

| Action        | Key / Input   |
| ------------- | ------------- |
| Toggle        | `/binoculars` |
| Zoom          | Scroll wheel  |
| Switch vision | `E`           |
| Exit          | `ESC`         |

#### Vision modes

When `Config.Binoculars.VisionModes` is enabled, pressing `E` cycles through:

1. **Normal** -- standard view
2. **Night vision** -- green-tinted night vision
3. **Thermal** -- heat signature view

Controls are displayed using the native `instructional_buttons` scaleform.

#### Config

```lua
Config.Binoculars = {
    Enabled = true,
    VisionModes = true,   -- Enable night/thermal vision cycling
}
```

#### Export

```lua
exports["Var-Emote"]:toggleBinoculars()
```
