> 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-shooting-range/ranges.md).

# Shooting Ranges

Set up shooting ranges in RedM: the included Blackwater range, the five ready to measure ranges, the in-game measuring tool and every range setting.

A range is a firing line with a menu point behind it. Each range has a map marker, a range master standing at the menu point, and a number of lanes side by side. Matches and practice runs reserve lanes, so one range can run several of them at once.

## Included ranges

| Range                     | Region                       | Lanes | Max distance | State                        |
| ------------------------- | ---------------------------- | ----- | ------------ | ---------------------------- |
| **Blackwater Fairground** | Great Plains, West Elizabeth | 4     | 35 yd        | Enabled and measured in game |
| Valentine Livestock Range | Heartlands, New Hanover      | 2     | 30 yd        | Ready, needs measuring       |
| Emerald Ranch Fence Line  | Heartlands, New Hanover      | 4     | 40 yd        | Ready, needs measuring       |
| Strawberry Mill Yard      | Big Valley, West Elizabeth   | 2     | 25 yd        | Ready, needs measuring       |
| Rhodes Tobacco Barn       | Scarlett Meadows, Lemoyne    | 2     | 30 yd        | Ready, needs measuring       |
| Armadillo Rail Yard       | Cholla Springs, New Austin   | 4     | 40 yd        | Ready, needs measuring       |

Only Blackwater is on out of the box. Every match, quick match, tournament and practice run takes place there. The other five are in `shared/config.lua`, commented out, with their names already in the language file. Their coordinates are placeholders: measure each one in game with the tool below before you turn it on.

## A range entry

```lua
Config.Arenas = {
    {
        id = 'blackwater',
        menu = vector3(-783.5, -1233.4, 42.5),
        line = vector4(-780.5, -1233.2, 42.5, 272.7),
        lanes = 4, maxDist = 35, laneGap = 4.0,
    },
}
```

| Field        | What it is                                                                                                             |
| ------------ | ---------------------------------------------------------------------------------------------------------------------- |
| `id`         | A unique id. The name and region come from the language file: `data.arena.<id>.name` and `data.arena.<id>.region`.     |
| `menu`       | Where the prompt, the map marker and the range master are.                                                             |
| `line`       | The centre of the firing line (x, y, z) and the heading the shooters face (w).                                         |
| `lanes`      | How many shooters fit at once. It also caps the players a match can have at this range.                                |
| `maxDist`    | The furthest the targets can be set, in yards.                                                                         |
| `laneGap`    | Distance between lanes, in metres.                                                                                     |
| `pedHeading` | Optional. The heading of the range master. By default he stands with his back to the targets, facing arriving players. |

### How the lanes are laid out

The lanes sit side by side along the firing line, centred on the `line` point, `laneGap` metres apart. A four lane range with a 4 metre gap is 12 metres from the first lane to the last.

In each lane, targets stand five to a row at the chosen distance. Up to three more rows sit 1.4 metres further back each, staggered. So a range needs clear ground ahead for `maxDist` yards plus about 4 metres, and enough width for every lane.

Targets are placed on the ground under each spot, so gentle slopes are fine. Avoid buildings, fences and trees in the line of fire.

## Measuring a new range

You do not need to type coordinates. Stand where you want the firing line and let the tool do it.

1. Stand at the **centre** of where the shooters should stand.
2. Face the direction the targets should be in.
3. Run:

```
/shootingadmin here valentine
```

The tool then:

* Finds the ground under you and uses your heading as the firing direction.
* Measures how much clear space there is ahead (up to 60 m, at knee and chest height), and to your left and right (up to 10 m each).
* Checks whether you are standing indoors.
* Puts the menu point 3 metres behind you.

You get a notice like `valentine saved: 39 m clear ahead.` The full line is printed to the server console and added to `range_positions.txt` in the resource folder:

```
valentine: menu = vector3(-786.4, -1233.3, 42.5), line = vector4(-783.5, -1233.2, 42.5, 272.7),  -- clear: ahead 39 m, left 10 m, right 10 m, John, 2026-09-24 16:54, zones: town=... district=... printed=... written=...
```

From the console or RCON, measure where a player is standing instead:

```
shootingadmin here valentine 12
```

### Turning the numbers into a range

* **menu** and **line**: paste them as they are.
* **maxDist**: the clear distance ahead in metres, minus about 4 metres for the back rows, divided by 0.9144 for yards. 39 m clear gives about 38 yd, so 35 is a safe value.
* **lanes** and **laneGap**: keep `(lanes - 1) x laneGap` well within the clear space on your left plus your right.
* If the line says `INDOORS`, move outside. Props and aiming inside interiors are unreliable.

Then add the names to your language file:

```lua
['data.arena.valentine.name'] = 'Valentine Livestock Range',
['data.arena.valentine.region'] = 'Heartlands, New Hanover',
```

Restart the resource. The marker and the range master appear, and the range shows up in the match builder.

## Ranges and other settings

* `Config.Tournament.Arena` and `Config.QuickMatch.Arena` must be the id of an enabled range. If you remove Blackwater, change both.
* A quick match is played at the range nearest the player. If that range has fewer than 2 lanes, the quick match range is used instead.
* The first range in the list is the fallback when a setting points at a range that does not exist.

## Map marker and range master

```lua
Config.Blips = {
    Enabled = true,
    Sprite = 'blip_mp_shootout',
}

Config.Ped = {
    Enabled = true,
    Model = 'u_m_m_valgunsmith_01',
    Scenario = 'WORLD_HUMAN_SMOKE', -- nil: just stands
}
```

The marker's name is `data.blip.name` in the language file ("Shooting Range"). The range master only exists for players within 80 metres of the range, is invincible and ignores everything around him.
