Skip to content
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion frontend/docs/client/sa-mp.cfg.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: sa-mp client configuration file.

## Description

`sa-mp.cfg` is a client configuration file which allows you to change settings related to SA-MP. This file is found in your 'My Documents\\GTA San Andreas User Files\\SAMP' folder, under your Windows user account. This file can be edited with a text editor such as notepad.
sa-mp.cfg is a client configuration file which allows you to change settings related to SA-MP. This file is found in your `My Documents\GTA San Andreas User Files\SAMP` folder, under your Windows user account. This file can be edited with a text editor such as notepad.

## Options

Expand Down
5 changes: 2 additions & 3 deletions frontend/docs/scripting/callbacks/OnClientCheckResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ public OnClientCheckResponse(playerid, actionid, memaddr, retndata)

:::warning

**SA:MP Server**: This callback is only called when it is in a filterscript.

**Open Multiplayer Server**: This callback functions normally inside a gamemode / filterscript.
- **SA-MP server**: This callback is only called when it is in a filterscript.
- **open.mp server**: This callback functions normally inside a gamemode / filterscript.

:::

Expand Down
18 changes: 9 additions & 9 deletions frontend/docs/scripting/callbacks/OnDialogResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ tags: ["dialog"]

## Description

This callback is called when a player responds to a dialog shown using ShowPlayerDialog. The response can be by clicking a button, pressing ENTER/ESC, or double-clicking a list item (in the case of a list-style dialog).
This callback is called when a player responds to a dialog shown using [ShowPlayerDialog](../functions/ShowPlayerDialog). The response can be by clicking a button, pressing ENTER/ESC, or double-clicking a list item (in the case of a list-style dialog).

| Name | Description |
| ----------- | ------------------------------------------------------------------------------------------------------------- |
| playerid | The ID of the player who responded to the dialog. |
| dialogid | The ID of the dialog the player responded to, as assigned in ShowPlayerDialog. |
| response | **1** for the left button, and **0** for the right button (if only one button is shown, it will always be 1). |
| listitem | The ID of the list item selected by the player (starts at 0). For non-list dialogs, it will be -1. |
| inputtext[] | The text entered in the input box by the player, or the selected list item text. |
| Name | Description |
| ----------- | --------------------------------------------------------------------------------------------------------------- |
| playerid | The ID of the player who responded to the dialog. |
| dialogid | The ID of the dialog the player responded to, as assigned in [ShowPlayerDialog](../functions/ShowPlayerDialog). |
| response | **1** for the left button, and **0** for the right button (if only one button is shown, it will always be 1). |
| listitem | The ID of the list item selected by the player (starts at 0). For non-list dialogs, it will be -1. |
| inputtext[] | The text entered in the input box by the player, or the selected list item text. |

## Returns

Expand Down Expand Up @@ -179,7 +179,7 @@ The parameters can have different values depending on the dialog's style. ([Clic

:::tip

Using a switch-case statement instead of if blocks is an appropriate method for handling multiple dialogs.
Using a [switch-case statement](../language/Statements#switch) instead of if blocks is an appropriate method for handling multiple dialogs.

:::

Expand Down
10 changes: 5 additions & 5 deletions frontend/docs/scripting/callbacks/OnEnterExitModShop.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ tags: ["player"]

This callback is called when a player enters or exits a mod shop.

| Name | Description |
| ---------- | ---------------------------------------------------------------------------- |
| playerid | The ID of the player that entered or exited the modshop |
| enterexit | **1** if the player entered or **0** if they exited |
| interiorid | The interior ID of the modshop that the player is entering (or 0 if exiting) |
| Name | Description |
| ---------- | ---------------------------------------------------------------------------------------------------------------------- |
| playerid | The ID of the player that entered or exited the modshop |
| enterexit | **1** if the player entered or **0** if they exited |
| interiorid | The [interior ID](../resources/interiorids#modding-shops) of the modshop that the player is entering (or 0 if exiting) |

## Returns

Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/callbacks/OnFilterScriptInit.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tags: []

## Description

This callback is called when a filterscript is initialized (loaded). It is only called inside the filterscript which is starting.
This callback is called when a filterscript is **init**ialized (loaded). It is only called inside the filterscript which is starting.

## Examples

Expand Down
4 changes: 2 additions & 2 deletions frontend/docs/scripting/callbacks/OnGameModeExit.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tags: []

## Description

This callback is called when a gamemode ends, either through 'gmx', the server being shut down, or GameModeExit.
This callback is called when a gamemode ends, either through 'gmx', the server being shut down, or [GameModeExit](../functions/GameModeExit).

## Returns

Expand All @@ -29,7 +29,7 @@ public OnGameModeExit()

:::tip

This function can also be used in a filterscript to detect if the gamemode changes with RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript.
This function can also be used in a filterscript to detect if the gamemode changes with [RCON commands](../../server/ControllingServer#rcon-commands) like changemode or gmx, as changing the gamemode does not reload a filterscript.

:::

Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/callbacks/OnGameModeInit.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public OnGameModeInit()

:::tip

This function can also be used in a filterscript to detect if the gamemode changes with RCON commands like changemode or gmx, as changing the gamemode does not reload a filterscript.
This function can also be used in a filterscript to detect if the gamemode changes with [RCON commands](../../server/ControllingServer#rcon-commands) like changemode or gmx, as changing the gamemode does not reload a filterscript.

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tags: []

## Description

This callback is called when an IP address attempts a connection to the server. To block incoming connections, use BlockIpAddress.
This callback is called when an IP address attempts a connection to the server. To block incoming connections, use [BlockIpAddress](../functions/BlockIpAddress).

| Name | Description |
| ------------ | -------------------------------------------------- |
Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/callbacks/OnObjectMoved.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tags: ["object"]

## Description

This callback is called when an object is moved after MoveObject (when it stops moving).
This callback is called when an object is moved after [MoveObject](../functions/MoveObject) (when it stops moving).

| Name | Description |
| -------- | ----------------------------------- |
Expand Down
3 changes: 2 additions & 1 deletion frontend/docs/scripting/callbacks/OnPlayerClickMap.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)

:::note

As the callback name says, its only called when the player click to mark the target and not when pressed the key. The Z value returned will be 0 (invalid) if the clicked area on the map is far away from the player; use the [MapAndreas](https://github.com/philip1337/samp-plugin-mapandreas) or [ColAndreas](https://github.com/Pottus/ColAndreas) plugin to get a more accurate Z coordinate.
- As the callback name says, its only called when the player click to mark the target and not when pressed the key.
- The Z value returned will be 0 (invalid) if the clicked area on the map is far away from the player; use the [MapAndreas](https://github.com/philip1337/samp-plugin-mapandreas) or [ColAndreas](https://github.com/Pottus/ColAndreas) plugin to get a more accurate Z coordinate.

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tags: ["player", "textdraw", "playertextdraw"]

## Description

This callback is called when a player clicks on a player-textdraw. It is not called when player cancels the select mode (ESC) - however, OnPlayerClickTextDraw is.
This callback is called when a player clicks on a player-textdraw. It is not called when player cancels the select mode (ESC) - however, [OnPlayerClickTextDraw](OnPlayerClickTextDraw) is.

| Name | Description |
| ----------------------- | ------------------------------------------------------- |
Expand Down
3 changes: 2 additions & 1 deletion frontend/docs/scripting/callbacks/OnPlayerExitVehicle.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public OnPlayerExitVehicle(playerid, vehicleid)

:::warning

Not called if the player falls off a bike or is removed from a vehicle by other means such as using [SetPlayerPos](../functions/SetPlayerPos). You must use [OnPlayerStateChange](OnPlayerStateChange) and check if their old state is `PLAYER_STATE_DRIVER` or `PLAYER_STATE_PASSENGER` and their new state is `PLAYER_STATE_ONFOOT`.
- Not called if the player falls off a bike or is removed from a vehicle by other means such as using [SetPlayerPos](../functions/SetPlayerPos).
- You must use [OnPlayerStateChange](OnPlayerStateChange) and check if their old state is `PLAYER_STATE_DRIVER` or `PLAYER_STATE_PASSENGER` and their new state is `PLAYER_STATE_ONFOOT`.

:::

Expand Down
14 changes: 7 additions & 7 deletions frontend/docs/scripting/callbacks/OnPlayerGiveDamage.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ tags: ["player"]

This callback is called when a player gives damage to another player.

| Name | Description |
| --------------- | ---------------------------------------------------------- |
| playerid | The ID of the player that gave damage. |
| damagedid | The ID of the player that received damage. |
| Float:amount | The amount of health/armour damagedid has lost (combined). |
| WEAPON:weaponid | The reason that caused the damage. |
| bodypart | The [body part](../resources/bodyparts) that was hit. |
| Name | Description |
| --------------- | ------------------------------------------------------------ |
| playerid | The ID of the player that gave damage. |
| damagedid | The ID of the player that received damage. |
| Float:amount | The amount of health/armour damagedid has lost (combined). |
| WEAPON:weaponid | The [reason](../resources/weaponids) that caused the damage. |
| bodypart | The [body part](../resources/bodyparts) that was hit. |

## Returns

Expand Down
14 changes: 7 additions & 7 deletions frontend/docs/scripting/callbacks/OnPlayerGiveDamageActor.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ tags: ["player", "actor"]

This callback is called when a player gives damage to an actor.

| Name | Description |
| --------------- | ----------------------------------------------------- |
| playerid | The ID of the player that gave damage. |
| damaged_actorid | The ID of the actor that received damage. |
| Float:amount | The amount of health/armour damaged_actorid has lost. |
| WEAPON:weaponid | The reason that caused the damage. |
| bodypart | The [body part](../resources/bodyparts) that was hit |
| Name | Description |
| --------------- | ------------------------------------------------------------ |
| playerid | The ID of the player that gave damage. |
| damaged_actorid | The ID of the actor that received damage. |
| Float:amount | The amount of health/armour damaged_actorid has lost. |
| WEAPON:weaponid | The [reason](../resources/weaponids) that caused the damage. |
| bodypart | The [body part](../resources/bodyparts) that was hit |

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tags: ["player"]

## Description

This callback is called when a player changes interior. Can be triggered by SetPlayerInterior or when a player enter/exits a building.
This callback is called when a player changes interior. Can be triggered by [SetPlayerInterior](../functions/SetPlayerInterior) or when a player enter/exits a building.

| Name | Description |
| ------------- | -------------------------------------- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public OnPlayerRequestSpawn(playerid)

:::tip

To prevent players from spawning with certain classes, the last viewed class must be saved in a variable in OnPlayerRequestClass.
To prevent players from spawning with certain classes, the last viewed class must be saved in a variable in [OnPlayerRequestClass](OnPlayerRequestClass).

:::

Expand Down
4 changes: 1 addition & 3 deletions frontend/docs/scripting/callbacks/OnPlayerStateChange.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ tags: ["player"]

## Description

This callback is called when a player changes state. For example, when a player changes from being the driver of a vehicle to being on-foot.
This callback is called when a player changes [state](../resources/playerstates). For example, when a player changes from being the driver of a vehicle to being on-foot.

| Name | Description |
| --------------------- | ---------------------------------------- |
| playerid | The ID of the player that changed state. |
| PLAYER_STATE:newstate | The player's new state. |
| PLAYER_STATE:oldstate | The player's previous state. |

Refer to [Player States](../resources/playerstates) for a list of all available player states.

## Returns

It is always called first in filterscripts.
Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/callbacks/OnPlayerTakeDamage.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This callback is called when a player takes damage.
| playerid | The ID of the player that took damage. |
| issuerid | The ID of the player that caused the damage. INVALID_PLAYER_ID if self-inflicted. |
| Float:amount | The amount of damage the player took (health and armour combined). |
| WEAPON:weaponid | The ID of the weapon/reason for the damage. |
| WEAPON:weaponid | The ID of the [weapon/reason](../resources/weaponids) for the damage. |
| bodypart | The [body part](../resources/bodyparts) that was hit. |

## Returns
Expand Down
8 changes: 4 additions & 4 deletions frontend/docs/scripting/callbacks/OnPlayerWeaponShot.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public OnPlayerWeaponShot(playerid, WEAPON:weaponid, BULLET_HIT_TYPE:hittype, hi

:::note

This callback is only called when lag compensation is **enabled**. If **hittype** is:

- `BULLET_HIT_TYPE_NONE`: The **fX**, **fY**, and **fZ** parameters are absolute coordinates. These will return 0.0 if nothing was hit (e.g., a distant object that the bullet can't reach).
- Other values: The **fX**, **fY**, and **fZ** values are offsets relative to **hitid**.
- This callback is only called when [lag compensation](../../server/LagCompensation) is **enabled**.
- If **hittype** is:
- `BULLET_HIT_TYPE_NONE`: The **fX**, **fY**, and **fZ** parameters are absolute coordinates. These will return 0.0 if nothing was hit (e.g., a distant object that the bullet can't reach).
- Other values: The **fX**, **fY**, and **fZ** values are offsets relative to **hitid**.

:::

Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/callbacks/OnRconCommand.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public OnRconCommand(cmd[])
- The /rcon prefix is not included in the cmd parameter when a player types a command.
- If you use the print function here, it will send a message to both the player who typed the command in-game and the server log.
- This callback is not called if the player is not logged in as an RCON admin.
- When a player uses `/rcon login` to log in, this callback will not be called, instead, OnRconLoginAttempt is called. Once logged in as an RCON admin, any subsequent commands will trigger this callback.
- When a player uses `/rcon login` to log in, this callback will not be called, instead, [OnRconLoginAttempt](OnRconLoginAttempt) is called. Once logged in as an RCON admin, any subsequent commands will trigger this callback.

:::

Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/callbacks/OnVehicleMod.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public OnVehicleMod(playerid, vehicleid, componentid)

:::note

This callback is NOT called by AddVehicleComponent.
This callback is NOT called by [AddVehicleComponent](../functions/AddVehicleComponent).

:::

Expand Down
3 changes: 2 additions & 1 deletion frontend/docs/scripting/callbacks/OnVehiclePaintjob.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public OnVehiclePaintjob(playerid, vehicleid, paintjobid)

:::note

This callback is not called by ChangeVehiclePaintjob. You might use OnVehicleChangePaintjob from vSync in order to know when the player **buys** the paintjob.
- This callback is not called by [ChangeVehiclePaintjob](../functions/ChangeVehiclePaintjob).
- You might use OnVehicleChangePaintjob from [vSync](https://github.com/Vasily-X/vSync) in order to know when the player **buys** the paintjob.

:::

Expand Down
3 changes: 2 additions & 1 deletion frontend/docs/scripting/callbacks/OnVehicleRespray.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public OnVehicleRespray(playerid, vehicleid, color1, color2)

:::note

This callback is not called by ChangeVehicleColor. Misleadingly, this callback is not called for pay 'n' spray (only modshops).
- This callback is not called by [ChangeVehicleColor](../functions/ChangeVehicleColor).
- Misleadingly, this callback is not called for pay 'n' spray (only modshops).

Fix here: https://pastebin.com/G81da7N1

Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/callbacks/OnVehicleSpawn.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This callback is called **only** when vehicle **re**spawns! CreateVehicle and Ad

## Description

This callback is called when a vehicle respawns.
This callback is called when a vehicle **re**spawns.

| Name | Description |
| --------- | ----------------------------------- |
Expand Down
Loading