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.
Admonitions
Boxes for things readers must not miss. Keep them short and use them sparingly, or they stop standing out.
A side remark: useful, but fine to skip.
Background that helps make sense of the page.
A better way to do something, or a shortcut.
Something that can break a script or surprise the reader.
Something that can crash the server or lose data.
:::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
Put the title in square brackets straight after the kind.
:::tip[Coming from SA-MP?]
Put the title in square brackets straight after the kind.
:::
With lists and code
- Skin 74 doesn't exist.
- Skins 300 to 311 don't work on older clients.
SetPlayerSkin(playerid, 0);
:::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.
Este elemento (función) se añadió en omp v1.1.0.2612 y no funciona en versiones anteriores.
<VersionWarn version='omp v1.1.0.2612' />
For a callback, say so, and the banner reads "callback" instead of "function":
Este elemento (callback) se añadió en SA-MP 0.3.7 y no funciona en versiones anteriores.
<VersionWarn name='callback' version='SA-MP 0.3.7' />
NPC callbacks get their own note:
Los NPC también pueden invocar este callback.
<NoteNPCCallbacks />
Code
Code blocks
Mark Pawn code as 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;
}
```pawn
public OnPlayerConnect(playerid)
{
...
}
```
Other languages work the same way: json for config files, bash for terminal commands, cpp for C/C++ plugin code.
"pawn": {
"main_scripts": ["gungame 1"]
}
./omp-server --dump-config
With a title
#include <open.mp>
main() {}
```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:
public OnPlayerSpawn(playerid)
{
SetPlayerPos(playerid, 1958.33, 1343.12, 15.36);
return 1;
}
public OnPlayerSpawn(playerid)
{
GivePlayerWeapon(playerid, WEAPON_DEAGLE, 50);
return 1;
}
```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.
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 |
| 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 to other pages. Keys look like Ctrl + K.
**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
- Numbered steps
- In the order to follow them
- 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.
> 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
#include <open.mp>
main()
{
print("Hello, world!");
}
<details>
<summary>Show the full script</summary>
```pawn
...
```
</details>
Images


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.