---
title: "Formatting examples | open.mp"
description: "Everything you can use when writing a docs page, each shown rendered with the Markdown that makes it."
canonical: https://open.mp/docs/meta/Examples
language: en
---

# Formatting examples

Everything you can use on a docs page, each shown as it looks and with the Markdown that makes it. Copy what you need. For the writing conventions (front matter, headings, links), see [Contributing](https://open.mp/docs/meta/Contributing).

## Admonitions

Boxes for things readers must not miss. Keep them short and use them sparingly, or they stop standing out.

**note**

A side remark: useful, but fine to skip.

**info**

Background that helps make sense of the page.

**tip**

A better way to do something, or a shortcut.

**warning**

Something that can break a script or surprise the reader.

**danger**

Something that can crash the server or lose data.

```md
:::note

A side remark: useful, but fine to skip.

:::
```

Swap `note` for `info`, `tip`, `warning` or `danger`. Leave a blank line after the opening `:::` and before the closing one, or the content may not render as Markdown.

### With a title

**Coming from SA-MP?**

Put the title in square brackets straight after the kind.

```md
:::tip[Coming from SA-MP?]

Put the title in square brackets straight after the kind.

:::
```

### With lists and code

**warning**

-   Skin **74** doesn't exist.
-   Skins **300 to 311** don't work on older clients.

```pawn
SetPlayerSkin(playerid, 0);
```

```md
:::warning

- Skin **74** doesn't exist.
- Skins **300 to 311** don't work on older clients.

```pawn
SetPlayerSkin(playerid, 0);
```

:::
```

## Version banners

Pages for functions and callbacks that only exist from a certain version start with a banner. Use the version it was added in.

**warning**

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

```md
<VersionWarn version='omp v1.1.0.2612' />
```

For a callback, say so, and the banner reads "callback" instead of "function":

**warning**

This callback was added in SA-MP 0.3.7 and will not work in earlier versions!

```md
<VersionWarn name='callback' version='SA-MP 0.3.7' />
```

NPC callbacks get their own note:

**note**

This callback can also be called by NPC.

```md
<NoteNPCCallbacks />
```

## Code

### Code blocks

Mark Pawn code as `pawn`:

```pawn
public OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));

    new string[64];
    format(string, sizeof(string), "Welcome, {FFFF00}%s{FFFFFF}!", name);
    SendClientMessage(playerid, -1, string);
    return 1;
}
```

```md
```pawn
public OnPlayerConnect(playerid)
{
    ...
}
```
```

Other languages work the same way: `json` for config files, `bash` for terminal commands, `cpp` for C/C++ plugin code.

```json
"pawn": {
    "main_scripts": ["gungame 1"]
}
```

```bash
./omp-server --dump-config
```

### With a title

gamemodes/mygamemode.pwn

```pawn
#include <open.mp>

main() {}
```

```md
```pawn title="gamemodes/mygamemode.pwn"
#include <open.mp>
```
```

### Highlighting lines

Point out the lines that matter, by number in the opening line or with a comment in the code:

```pawn
public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid, 1958.33, 1343.12, 15.36);
    return 1;
}
```

```pawn
public OnPlayerSpawn(playerid)
{
    GivePlayerWeapon(playerid, WEAPON_DEAGLE, 50);
    return 1;
}
```

```md
```pawn {3}
...
```

```pawn
// highlight-next-line
GivePlayerWeapon(playerid, WEAPON_DEAGLE, 50);
```
```

Use `// highlight-start` and `// highlight-end` around several lines.

### Inline code

Put function names, values and file names in backticks: `SetPlayerPos`, `Float:`, `config.json`.

```md
Put function names, values and file names in backticks: `SetPlayerPos`, `Float:`, `config.json`.
```

## Tables

| Health | Engine status |
| --- | --- |
| 650 | Undamaged |
| 650-550 | White smoke |
| 550-390 | Grey smoke |

```md
| Health  | Engine status |
| ------- | ------------- |
| 650     | Undamaged     |
| 650-550 | White smoke   |
| 550-390 | Grey smoke    |
```

## Text

**Bold** for words that must stand out, _italics_ for emphasis, and [links](https://open.mp/docs/meta/Contributing) to other pages. Keys look like Ctrl + K.

```md
**Bold** for words that must stand out, _italics_ for emphasis, and [links](Contributing) to other pages. Keys look like <kbd>Ctrl</kbd> + <kbd>K</kbd>.
```

-   Lists with a dash
-   One item per line

1.  Numbered steps
2.  In the order to follow them

```md
- Lists with a dash
- One item per line

1. Numbered steps
2. In the order to follow them
```

> A quote, for text taken from somewhere else.

```md
> A quote, for text taken from somewhere else.
```

## Collapsible sections

For long content most readers can skip, such as a full example script:

Show the full script

```pawn
#include <open.mp>

main()
{
    print("Hello, world!");
}
```

```md
<details>
<summary>Show the full script</summary>

```pawn
...
```

</details>
```

## Images

![The body parts reference image](https://assets.open.mp/assets/images/bodyParts/Body_parts.jpg)

```md
![The body parts reference image](https://assets.open.mp/assets/images/bodyParts/Body_parts.jpg)
```

Put your own images in a folder under `frontend/public/images/` and link them as `/images/your-folder/picture.png`. Always describe the image in the square brackets.
