# Rockstar Text Formatting

{% hint style="info" %}
We recommend looking at the official documentation provided by FiveM [here](https://docs.fivem.net/docs/game-references/text-formatting/).
{% endhint %}

## Text Formatting

Text labels displayed in the game UI can be formatted using classical Rockstar North-style `~` formatting tags, which are detailed below.

## Rockstar Formatting Codes

Rockstar formatting codes are typically found between two tildes (`~`), such as in the following examples:

```
[MY_LABEL] 
Demolish the ~r~enemy.

[MY_HELP_LABEL] 
Press INPUT_CONTEXT when near the ~r~enemies.
```

## Color Codes

| Special                                                         | Label              | Description                                                                                                                                                                        | Example                                                       |
| --------------------------------------------------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
|                                                                 | `~HUD_COLOUR_...~` | References an existing [HUD color](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting).                                                                         | `Find the ~HUD_COLOUR_FREEMODE~freemode ped!`                 |
|                                                                 | `~HC_...~`         | An alias for `~HUD_COLOUR~`.                                                                                                                                                       | `Find the ~HC_FREEMODE~freemode ped!`                         |
|                                                                 | `~HC_[number]~`    | Specifies a HUD color by index.                                                                                                                                                    | `Get to ~HC_13~Davis.`                                        |
|                                                                 | `~s~`              | Resets the color to the default for the current context.                                                                                                                           | `After killing the ~r~enemies~s~, you win!`                   |
|                                                                 | `~v~`              | [HUD\_COLOUR\_SCRIPT\_VARIABLE](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). Placeholder for the color set with `SET_SCRIPT_VARIABLE_HUD_COLOUR`.       | `Wait for your ~v~team~s~ to lose the Cops.`                  |
|                                                                 | `~u~`              | [HUD\_COLOUR\_SCRIPT\_VARIABLE\_2](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). Placeholder for the color set with `_SET_SCRIPT_VARIABLE_2_HUD_COLOUR`. | `Take out ~v~~a~~s~ & defend ~u~~a~~s~.`                      |
| ![#ffffff](https://via.placeholder.com/15/f0f0f0/000000?text=+) | `~w~`              | [HUD\_COLOUR\_WHITE](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). Used together with `~s~` to reset text color.                                         | `Swoop on over to ~b~foreclosures.maze-bank.com~w~~s~ today.` |

## **Color**

| Color                                                           | Label | Description                                                                                                                                                                              | Example                                                                 |
| --------------------------------------------------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| ![#e03232](https://via.placeholder.com/15/e03232/000000?text=+) | `~r~` | [HUD\_COLOUR\_RED](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). Used for enemy characters or vehicles.                                                        | `Kill all the ~r~Vagos.`                                                |
| ![#72cc72](https://via.placeholder.com/15/72cc72/000000?text=+) | `~g~` | [HUD\_COLOUR\_GREEN](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). Used for pickup-type objectives.                                                            | `Pick up the ~g~flash drive.`                                           |
| ![#5db6e5](https://via.placeholder.com/15/5db6e5/000000?text=+) | `~b~` | [HUD\_COLOUR\_BLUE](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). Used for friendly characters or vehicles.                                                    | `Defend ~b~Lamar.`                                                      |
| ![#5db6e5](https://via.placeholder.com/15/5db6e5/000000?text=+) | `~f~` | [HUD\_COLOUR\_FRIENDLY](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). Alternate version for friendly objectives.                                               | `Vehicle health can be restored by waiting in the ~f~pit stop area~s~.` |
| ![#f0c850](https://via.placeholder.com/15/f0c850/000000?text=+) | `~y~` | [HUD\_COLOUR\_YELLOW](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). Destination names.                                                                         | `Deliver the Special Cargo to the ~y~restricted area.`                  |
| ![#8c8c8c](https://via.placeholder.com/15/8c8c8c/000000?text=+) | `~c~` | [HUD\_COLOUR\_MENU\_GREY](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). De-emphasized text used in subtitles, to indicate a character out of view.             | `~z~He's a bum! ~c~~n~Oh my God!`                                       |
| ![#8c8c8c](https://via.placeholder.com/15/8c8c8c/000000?text=+) | `~t~` | [HUD\_COLOUR\_MENU\_GREY](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). De-emphasized text used in subtitles, to indicate text spoken in a different language. | `~z~those ~t~idiots.`                                                   |
| ![#ff8555](https://via.placeholder.com/15/ff8555/000000?text=+) | `~o~` | [HUD\_COLOUR\_ORANGE](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). A team color indicator.                                                                    | `~o~The Cocks~s~ are mad.`                                              |
| ![#8466e2](https://via.placeholder.com/15/8466e2/000000?text=+) | `~p~` | [HUD\_COLOUR\_PURPLE](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). A team color indicator.                                                                    | `~p~The Boars~s~ are off the radar.`                                    |
| ![#cb3694](https://via.placeholder.com/15/cb3694/000000?text=+) | `~q~` | [HUD\_COLOUR\_PINK](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). Used for Arena War.                                                                          | `You are the active contender on your ~q~team~s~.`                      |
| ![#646464](https://via.placeholder.com/15/646464/000000?text=+) | `~m~` | [HUD\_COLOUR\_MID\_GREY\_MP](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). Medium gray to de-emphasize or use for 'Silver'.                                    | `~m~Display Mini Map.`                                                  |
| ![#000000](https://via.placeholder.com/15/000000/000000?text=+) | `~l~` | [HUD\_COLOUR\_BLACK](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). Used when unable to set a color any other way to specify black.                             | `~l~PLAYERS`                                                            |
| ![#2f5c73](https://via.placeholder.com/15/2f5c73/000000?text=+) | `~d~` | [HUD\_COLOUR\_BLUEDARK](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). Used to specify a team objective occupied by a player.                                   | `Help your team deliver a ~d~vehicle ~s~to your ~b~base.`               |

## Visual Formatting Codes

| Label           | Description                                                                                                                                                     | Example                                                                                 |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `~n~`           | A line break, similar to `<br>` in HTML.                                                                                                                        | `This text is~n~on two lines.`                                                          |
| `~h~`           | **Bold** text. Use a second time to unbold.                                                                                                                     | `This is ~h~quite bold~h~ of you.`                                                      |
| `~bold~`        | An alias of `~h~`.                                                                                                                                              | `This is also pretty ~bold~bold~h~.`                                                    |
| `~italic~`      | *Italic* text. Use a second time to remove italics.                                                                                                             | `Text can be ~italic~written~italic~ in italics.`                                       |
| `~ws~`          | A wanted star.                                                                                                                                                  | `The ~ws~~ws~ on the top right indicates`                                               |
| `~wanted_star~` | A wanted star, equal to `~ws~`.                                                                                                                                 | `~wanted_star~~wanted_star~~wanted_star~`                                               |
| `<C>...<\/C>`   | Condensed. Usually used for gamer tags.                                                                                                                         | `<C>~a~<\/C> is dominating you.`                                                        |
| `~nrt~`         | Unknown.                                                                                                                                                        |                                                                                         |
| `~EX_R*~`       | A Rockstar logo, in fonts that support this character.                                                                                                          | `The ~EX_R*~ logo is a registered trademark`                                            |
| `~BLIP_...~`    | In help messages and other supported contexts, shows the [blip](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting) with the specified name. | `Benny's Original Motor Works is now available at ~HUD_COLOUR_YELLOW~~BLIP_BENNYS~~s~.` |

## Content Formatting Codes

| Label   | Description                                                                                           | Example                                           |
| ------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| `~a~`   | A placeholder for a substring 'text component', such as ADD\_TEXT\_COMPONENT\_SUBSTRING\_TEXT\_LABEL. | `Fight the ~a~.`                                  |
| `~1~`   | A placeholder for a numeric 'text component', such as ADD\_TEXT\_COMPONENT\_INTEGER.                  | `There are ~1~ enemies left.`                     |
| `~a_X~` | For translations, refers to `~a~` placeholders out of the usual order.                                | `Get the ~a_1~ from the ~a_0~.`                   |
| `~1_X~` | For translations, refers to `~1~` placeholders out of the usual order.                                | `There's ~1_1~ enemies left out of ~1_0~.`        |
| `~x~`   | Unknown. Related to subtitles.                                                                        |                                                   |
| `~z~`   | At the start of a string, makes the string hidden if subtitles are turned off.                        | `~z~Fucking terrorists. There's been a big scare` |

## Input Codes

| Label                    | Description                                                                                                                                                            | Example                                                                              |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `~INPUT_...~`            | In help messages and other supported contexts, shows the current key for a specified [control](https://docs.tzmc.dev/docs/standalone/readme/rockstar-text-formatting). | `Press ~INPUT_CONTEXT~ to stand up.`                                                 |
| `~INPUTGROUP_...~`       | In help messages and other supported contexts, shows a specified input group's hint.                                                                                   | `If your car is upside down, try rocking ~INPUTGROUP_VEH_MOVE_ALL~ to flip it over.` |
| `~ACCEPT~`               | Shows the button to accept a prompt.                                                                                                                                   |                                                                                      |
| `~CANCEL~`               | Shows the button to cancel a prompt.                                                                                                                                   |                                                                                      |
| `~PAD_UP~`               | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_DOWN~`             | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_LEFT~`             | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_RIGHT~`            | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_A~`                | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_B~`                | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_X~`                | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_Y~`                | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_START~`            | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_BACK~`             | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_LB~`               | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_LT~`               | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_RB~`               | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_RT~`               | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_DPAD_UP~`          | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_DPAD_DOWN~`        | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_DPAD_LEFT~`        | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_DPAD_RIGHT~`       | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_DPAD_NONE~`        | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_DPAD_ALL~`         | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_DPAD_UPDOWN~`      | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_DPAD_LEFTRIGHT~`   | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_LSTICK_UP~`        | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_LSTICK_DOWN~`      | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_LSTICK_LEFT~`      | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_LSTICK_RIGHT~`     | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_LSTICK_NONE~`      | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_LSTICK_ALL~`       | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_LSTICK_UPDOWN~`    | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_LSTICK_LEFTRIGHT~` | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_LSTICK_ROTATE~`    | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_RSTICK_UP~`        | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_RSTICK_DOWN~`      | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_RSTICK_LEFT~`      | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_RSTICK_RIGHT~`     | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_RSTICK_NONE~`      | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_RSTICK_ALL~`       | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_RSTICK_UPDOWN~`    | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_RSTICK_LEFTRIGHT~` | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
| `~PAD_RSTICK_ROTATE~`    | In supported contexts, shows a gamepad button or other control.                                                                                                        |                                                                                      |
