> 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/redm-shooting-range-and-competition.md).

# RedM Shooting Range & Competition

RedM Shooting Range & Competition: a complete target shooting script for VORP and RSG Core. Bottle shootouts, 11 match modes, wagers, ranked play, tournaments, practice, challenges and leaderboards.

**CAS Shooting Range turns the shooting range into the busiest spot on your server. Walk up to the range master, pick a mode, set the stakes and see who clears their lane first.**

{% hint style="success" %}
Works on **VORP Core** and **RSG Core**. The framework is detected on its own, the database tables create themselves on the first start, and there is no SQL file to import.
{% endhint %}

RedM Shooting Range & Competition is a full target shooting competition system. Players stand side by side on a real firing line, each in their own lane, with bottles, tin cans, wooden boards, hanging lanterns, moving targets or coin sized plates set up in front of them. A countdown runs, a hidden pause follows so nobody can time it, and on DRAW everyone fires. The server keeps the score, runs the clock, handles the ammunition and reloads, settles the wagers and updates the ratings.

Around the matches themselves you get everything a server needs to build a scene: public and private lobbies, invites, quick matchmaking, ranked play with divisions, an eight player tournament bracket that runs itself, solo practice with personal bests, daily and weekly challenges with rewards, six leaderboards, match history and a spectator camera.

## Highlights

* **11 match modes.** Bottle Shootout, First to Break All, Best of 3, Best of 5, Timed Target Challenge, Accuracy Challenge, Speed Challenge, One Magazine, Head-to-Head Elimination, Solo Practice and Tournament.
* **6 target types plus a Mixed Set.** Glass bottles, tin cans, two hit wooden boards, hanging lanterns, moving targets and precision coins.
* **19 period weapons** across revolvers, pistols, repeaters, rifles and shotguns, each with its own magazine size and reload time.
* **Wagers in three currencies.** Money, gold or Range Tokens, with entry fees, a range commission and a winner takes all or 70/30 payout.
* **Stakes held in escrow.** Money is taken when a shooter readies up, held until the result and refunded automatically if the match does not happen, even after a restart.
* **Ranked play** with ELO ratings and six divisions from Tin Can to Deadeye.
* **Tournaments** with sign ups, rating based seeding, byes, check ins, walkovers and automatic prize payouts.
* **Solo practice** with a personal best board for every setup.
* **Seven daily and weekly challenges** with claimable rewards, all configurable.
* **Six leaderboards** with daily, weekly and all time views.
* **Spectator camera** for every live match.
* **Fair play built in.** A randomised draw delay, false start rules, wrong lane penalties, sudden death tie breakers, lane leashing, shot rate limits and lag compensation.
* **Disconnect handling.** A dropped player can rejoin their match, and the opponent can claim the win or cancel with a full refund.
* **In-game range measuring tool** that writes the config line for a new range.
* **A menu built from Red Dead Redemption 2's own UI textures and fonts.**
* **Fully translatable.** The menu, HUD, prompts, notifications and server messages all come from one language file.

## At a glance

|                           |                                                                      |
| ------------------------- | -------------------------------------------------------------------- |
| **Resource name**         | `cas-shootingcompetition`                                            |
| **Version**               | 1.0.0                                                                |
| **Frameworks**            | VORP Core, RSG Core (auto-detected)                                  |
| **Required dependencies** | oxmysql, plus your framework's core and inventory                    |
| **Database**              | 5 tables, created automatically                                      |
| **Player command**        | `/shootingrange`                                                     |
| **Admin command**         | `/shootingadmin` (ACE permission `shootingrange.admin`)              |
| **Match modes**           | 11                                                                   |
| **Target types**          | 6, plus the Mixed Set                                                |
| **Weapons**               | 19                                                                   |
| **Ranges**                | Blackwater included and measured, 5 more ready to measure and enable |
| **Shooters per match**    | 2, or up to 4 in Elimination                                         |
| **Languages**             | English included, add your own                                       |

## Three things to do first

1. [Install the resource](/script-documentation/cas-shooting-range/installation.md) and start it after oxmysql and your framework.
2. [Grant the admin permission](/script-documentation/cas-shooting-range/permissions.md) so you can run tournaments and measure ranges.
3. [Decide on your currencies](/script-documentation/cas-shooting-range/wagers.md). If you keep Range Tokens enabled, add the `range_token` item to your inventory.

Everything else has a working default.

## Where to start

| I want to                                   | Read                                                                                          |
| ------------------------------------------- | --------------------------------------------------------------------------------------------- |
| Get it running                              | [Installation](/script-documentation/cas-shooting-range/installation.md)                      |
| Let my admins manage the range              | [Permissions and Admin Commands](/script-documentation/cas-shooting-range/permissions.md)     |
| See every command and key                   | [Commands and Controls](/script-documentation/cas-shooting-range/commands.md)                 |
| Learn the modes and match rules             | [Match Modes and Rules](/script-documentation/cas-shooting-range/modes.md)                    |
| See the targets and weapons                 | [Targets and Weapons](/script-documentation/cas-shooting-range/targets-and-weapons.md)        |
| Understand lobbies, invites and quick match | [Creating and Joining Matches](/script-documentation/cas-shooting-range/matches.md)           |
| Understand wagers and payouts               | [Wagers, Entry Fees and Payouts](/script-documentation/cas-shooting-range/wagers.md)          |
| Set up ranked play                          | [Ranked Play and Divisions](/script-documentation/cas-shooting-range/ranked.md)               |
| Run tournaments                             | [Tournaments](/script-documentation/cas-shooting-range/tournaments.md)                        |
| Use practice mode                           | [Solo Practice](/script-documentation/cas-shooting-range/practice.md)                         |
| Change the challenges and rewards           | [Daily and Weekly Challenges](/script-documentation/cas-shooting-range/challenges.md)         |
| Understand the stats and boards             | [Leaderboards, Profile and History](/script-documentation/cas-shooting-range/leaderboards.md) |
| Watch other matches                         | [Spectating Live Matches](/script-documentation/cas-shooting-range/spectating.md)             |
| Add or move a range                         | [Shooting Ranges](/script-documentation/cas-shooting-range/ranges.md)                         |
| Change any setting                          | [Configuration](/script-documentation/cas-shooting-range/configuration.md)                    |
| Change the language or any text             | [Languages and Translation](/script-documentation/cas-shooting-range/languages.md)            |
| Change how the menu looks                   | [Editing the Interface](/script-documentation/cas-shooting-range/interface.md)                |
| Fix a problem                               | [Troubleshooting](/script-documentation/cas-shooting-range/troubleshooting.md)                |
| Get a quick answer                          | [FAQ](/script-documentation/cas-shooting-range/faq.md)                                        |

## More CAS scripts

Browse the rest of the CAS catalog at [codeaftersex.com/scripts](https://codeaftersex.com/scripts).

## Get the script

Advanced Shooting Range & Competition is sold on the CAS Scripts store: [codeaftersex.com/script/advanced-shooting-range-and-competition](https://codeaftersex.com/script/advanced-shooting-range-and-competition). Both the Escrow build and the full Open Source build are listed there, with lifetime updates and Discord support.
