Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 1 addition & 3 deletions frontend/docs/scripting/callbacks/OnDialogResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ Using a switch-case statement instead of if blocks is an appropriate method for

:::warning

A player's dialog doesn't automatically close when the gamemode restarts.

If a player responds to a dialog after the server was restarted, the server will print the warning: "Warning: PlayerDialogResponse PlayerId: 0 dialog ID doesn't match last sent dialog ID".
A player's dialog doesn't automatically close when the gamemode restarts. If a player responds to a dialog after the server was restarted, the server will print the warning: "Warning: PlayerDialogResponse PlayerId: 0 dialog ID doesn't match last sent dialog ID".

:::

Expand Down
4 changes: 1 addition & 3 deletions frontend/docs/scripting/callbacks/OnEnterExitModShop.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ public OnEnterExitModShop(playerid, enterexit, interiorid)

:::warning

Known Bug(s):

- Players collide when they get into the same mod shop.
Known Bug(s): Players collide when they get into the same mod shop.

:::

Expand Down
5 changes: 2 additions & 3 deletions frontend/docs/scripting/callbacks/OnGameModeExit.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ This function can also be used in a filterscript to detect if the gamemode chang

:::warning

When using OnGameModeExit in conjunction with the 'rcon gmx' console command keep in mind there is a potential for client bugs to occur.

An example of this is excessive [RemoveBuildingForPlayer](../functions/RemoveBuildingForPlayer) calls during [OnGameModeInit](OnGameModeInit) which could result in a client crash. This callback will NOT be called if the server crashes or the process is killed by other means, such as using the Linux kill command or pressing the close-button on the Windows console.
- When using OnGameModeExit in conjunction with the 'rcon gmx' console command keep in mind there is a potential for client bugs to occur. An example of this is excessive [RemoveBuildingForPlayer](../functions/RemoveBuildingForPlayer) calls during [OnGameModeInit](OnGameModeInit) which could result in a client crash.
- This callback will NOT be called if the server crashes or the process is killed by other means, such as using the Linux kill command.

:::

Expand Down
3 changes: 1 addition & 2 deletions frontend/docs/scripting/callbacks/OnPlayerExitVehicle.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ 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
3 changes: 2 additions & 1 deletion frontend/docs/scripting/callbacks/OnPlayerUpdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public OnPlayerUpdate(playerid)

:::warning

This callback is called, on average, 30 times per second, per player; only use it when you know what it's meant for (or more importantly what it's NOT meant for). The frequency with which this callback is called for each player varies, depending on what the player is doing. Driving or shooting will trigger a lot more updates than idling.
- This callback is called, on average, 30 times per second, per player; only use it when you know what it's meant for (or more importantly what it's NOT meant for).
- The frequency with which this callback is called for each player varies, depending on what the player is doing. Driving or shooting will trigger a lot more updates than idling.

:::
6 changes: 4 additions & 2 deletions frontend/docs/scripting/callbacks/OnRconCommand.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ public OnRconCommand(cmd[])

:::note

- 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.
- 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.

:::

Expand Down
3 changes: 2 additions & 1 deletion frontend/docs/scripting/callbacks/OnRconLoginAttempt.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public OnRconLoginAttempt(ip[], password[], success)

:::note

This callback is only called when /rcon login is used in-game. This callback is only called when the player is not yet logged in. When the player is logged in, [OnRconCommand](OnRconCommand) is called instead.
- This callback is only called when /rcon login is used in-game.
- This callback is only called when the player is not yet logged in. When the player is logged in, [OnRconCommand](OnRconCommand) is called instead.

:::

Expand Down
4 changes: 1 addition & 3 deletions frontend/docs/scripting/callbacks/OnVehicleRespray.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ Fix here: https://pastebin.com/G81da7N1

:::warning

Known Bug(s):

- Previewing a component inside a mod shop might call this callback.
Known Bug(s): Previewing a component inside a mod shop might call this callback.

:::

Expand Down
5 changes: 2 additions & 3 deletions frontend/docs/scripting/functions/AddSimpleModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ public OnGameModeInit()

:::note

**useartwork** or **artwork.enable** must be enabled first in server settings in order for this to work.

When `virtualworld` is set, the models will be downloaded once the player enters the specific world.
- **useartwork** or **artwork.enable** must be enabled first in server settings in order for this to work.
- When `virtualworld` is set, the models will be downloaded once the player enters the specific world.

:::

Expand Down
5 changes: 2 additions & 3 deletions frontend/docs/scripting/functions/AddSimpleModelTimed.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ public OnGameModeInit()

:::note

**useartwork** or **artwork.enable** must be enabled first in server settings in order for this to work.

When virtualworld is set, the models will be downloaded once the player enters the specific world.
- **useartwork** or **artwork.enable** must be enabled first in server settings in order for this to work.
- When virtualworld is set, the models will be downloaded once the player enters the specific world.

:::

Expand Down
3 changes: 1 addition & 2 deletions frontend/docs/scripting/functions/ApplyAnimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ ApplyAnimation(playerid, "PED", "WALK_DRUNK", 4.1, true, true, true, true, 1, SY

:::note

- The 'forceSync' optional parameter, which defaults to 0 (SYNC_NONE), in most cases is not needed since players sync animations themselves.
- The 'forcesync' parameter can force all players who can see 'playerid' to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused.
The 'forceSync' optional parameter, which defaults to 0 (SYNC_NONE), in most cases is not needed since players sync animations themselves. The 'forcesync' parameter can force all players who can see 'playerid' to play the animation regardless of whether the player is performing that animation. This is useful in circumstances where the player can't sync the animation themselves. For example, they may be paused.

:::

Expand Down
4 changes: 1 addition & 3 deletions frontend/docs/scripting/functions/CreatePickup.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ For fully scripted pickups, type 1 should be used.

:::warning

Known Bug(s):

- Pickups that have a X or Y lower than -4096.0 or bigger than 4096.0 won't show up and won't trigger OnPlayerPickUpPickup either.
Known Bug(s): Pickups that have a X or Y lower than -4096.0 or bigger than 4096.0 won't show up and won't trigger OnPlayerPickUpPickup either.

:::

Expand Down
3 changes: 1 addition & 2 deletions frontend/docs/scripting/functions/CreatePlayerTextDraw.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public OnPlayerConnect(playerid)

:::note

- The `x, y` coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution).
- If you plan on using [PlayerTextDrawAlignment](PlayerTextDrawAlignment) with alignment 3 (`TEXT_DRAW_ALIGN_RIGHT`), the `x, y` coordinate is the top right coordinate for the text draw.
- The `x, y` coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using [PlayerTextDrawAlignment](PlayerTextDrawAlignment) with alignment 3 (`TEXT_DRAW_ALIGN_RIGHT`), the `x, y` coordinate is the top right coordinate for the text draw.
- This function merely CREATES the textdraw, you must use [PlayerTextDrawShow](PlayerTextDrawShow) to show it to a player.
- Player-textdraws are automatically destroyed when a player disconnects.

Expand Down
3 changes: 2 additions & 1 deletion frontend/docs/scripting/functions/DB_Open_Modern.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public OnGameModeExit()

:::warning

It will create a new SQLite database file, if there is no SQLite database file with the same file name available. Close your SQLite database connection with [DB_Close](DB_Close_Modern)!
- It will create a new SQLite database file, if there is no SQLite database file with the same file name available.
- Close your SQLite database connection with [DB_Close](DB_Close_Modern)!

:::

Expand Down
3 changes: 1 addition & 2 deletions frontend/docs/scripting/functions/DisableMenuRow.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ Crashes when passed an invalid menu ID. (Fixed in open.mp)

:::note

- This function disabled the specified menu row for all players.
- There is no function to disable a menu row for a specific player. You'd have to create two menus - one with a row disabled, and one without. Or one per player.
This function disabled the specified menu row for all players. There is no function to disable a menu row for a specific player. You'd have to create two menus - one with a row disabled, and one without. Or one per player.

:::

Expand Down
3 changes: 1 addition & 2 deletions frontend/docs/scripting/functions/EnableTirePopping.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ This function was removed in SA-MP 0.3.

:::note

- Tire popping is enabled by default.
- If you want to disable tire popping, you'll have to manually script it using [OnVehicleDamageStatusUpdate](../callbacks/OnVehicleDamageStatusUpdate).
Tire popping is enabled by default. If you want to disable tire popping, you'll have to manually script it using [OnVehicleDamageStatusUpdate](../callbacks/OnVehicleDamageStatusUpdate).

:::

Expand Down
3 changes: 1 addition & 2 deletions frontend/docs/scripting/functions/GetMaxPlayers.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ SendClientMessage(playerid, 0xFFFFFFFF, string);

:::warning

- This function can not be used in place of MAX_PLAYERS. It can not be used at compile time (e.g. for array sizes).
- `MAX_PLAYERS` should always be re-defined to what the 'max_players' var will be, or higher.
This function can not be used in place of MAX_PLAYERS. It can not be used at compile time (e.g. for array sizes). `MAX_PLAYERS` should always be re-defined to what the 'max_players' var will be, or higher.

:::

Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/functions/GetObjectType.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: GetObjectType
sidebar_label: GetObjectType
description: Get the type of an object. (global or player)
description: Get the type of an object (global or player).
tags: ["object"]
---

Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/functions/GetPlayerCameraPos.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public OnPlayerDisconnect(playerid, reason)

:::warning

Player's camera positions are only updated once a second, unless aiming.It is recommended to set a 1 second timer if you wish to take action that relies on a player's camera position.
Player's camera positions are only updated once a second, unless aiming. It is recommended to set a 1 second timer if you wish to take action that relies on a player's camera position.

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (IsPlayerAdmin(playerTarget))
:::warning

- This function is disabled by default to save bandwidth. Use [EnablePlayerCameraTarget](EnablePlayerCameraTarget) to enable it for each player.
- Do not confuse this function with GetPlayerTargetPlayer. GetPlayerTargetPlayer returns the ID of the player playerid is aming at (with a weapon). GetPlayerCameraTargetPlayer returns the ID of the player playerid is looking at (reference point is the center of the screen).
- Do not confuse this function with GetPlayerTargetPlayer. GetPlayerTargetPlayer returns the ID of the player playerid is aiming at (with a weapon). GetPlayerCameraTargetPlayer returns the ID of the player playerid is looking at (reference point is the center of the screen).

:::

Expand Down
5 changes: 2 additions & 3 deletions frontend/docs/scripting/functions/GetPlayerKeys.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ public OnPlayerUpdate(playerid)

:::warning

Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)).

As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter.
- Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses SPACE, but you can detect if they press SPRINT (which can be mapped (assigned/binded) to ANY key (but is space by default)).
- As of update 0.3.7, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter.

:::

Expand Down
3 changes: 2 additions & 1 deletion frontend/docs/scripting/functions/GetPlayerSkin.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public OnPlayerCommandText(playerid, cmdtext[])

:::note

Returns the new skin after [SetSpawnInfo](SetSpawnInfo) is called but before the player actually respawns to get the new skin. Returns the old skin if the player was spawned through [SpawnPlayer](SpawnPlayer) function.
- Returns the new skin after [SetSpawnInfo](SetSpawnInfo) is called but before the player actually respawns to get the new skin.
- Returns the old skin if the player was spawned through [SpawnPlayer](SpawnPlayer) function.

:::

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

:::warning

Does not work for joypads/controllers, and after a certain distance. Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player.
- Does not work for joypads/controllers, and after a certain distance.
- Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player.

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public OnPlayerUpdate(playerid)

:::warning

Does not work for joypads/controllers, and after a certain distance. Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player.
- Does not work for joypads/controllers, and after a certain distance.
- Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player.

:::

Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/functions/GetPlayerWeaponData.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: GetPlayerWeaponData
sidebar_label: GetPlayerWeaponData
description: Get the weapon and ammo in a specific player's weapon slot (e.
description: Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' slot).
tags: ["player"]
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ The vehicle's doors state is stored in the specified variables.

The values returned in each variable are as follows:

**-1**: Door state not set

**1**: Open

**0**: Closed
- **-1**: Door state not set
- **1**: Open
- **0**: Closed

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ The vehicle's windows state is stored in the specified variables.

The values returned in each variable are as follows:

**-1**: Window state not set (generally closed, unless set explicitly to -1)

**0**: Open

**1**: Closed
- **-1**: Window state not set (generally closed, unless set explicitly to -1)
- **0**: Open
- **1**: Closed

:::

Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/functions/GetVehicleParamsEx.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gets a vehicle's parameters.
| Name | Description |
| ---------- | ------------------------------------------------------------------- |
| vehicleid | The ID of the vehicle to get the parameters from. |
| &engine | Get the engine status. If 1, the engine is running.. |
| &engine | Get the engine status. If 1, the engine is running. |
| &lights | Get the vehicle's lights' state. If 1 the lights are on. |
| &alarm | Get the vehicle's alarm state. If 1 the alarm is (or was) sounding. |
| &doors | Get the lock status of the doors. If 1 the doors are locked. |
Expand Down
2 changes: 2 additions & 0 deletions frontend/docs/scripting/functions/HTTP.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ Sends a threaded HTTP request.
#define HTTP_GET (HTTP_METHOD:1) // Sends a regular HTTP request.
#define HTTP_POST (HTTP_METHOD:2) // Sends a HTTP request with POST data.
#define HTTP_HEAD (HTTP_METHOD:3) // Sends a regular HTTP request, but ignores any response data - returning only the response code.
```

```c
// HTTP error response codes
// These codes compliment ordinary HTTP response codes returned in 'response_code'
#define HTTP_ERROR_BAD_HOST (HTTP_ERROR:1)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: HasObjectCameraCollision
sidebar_label: HasObjectCameraCollision
description: Checks if an object has camera collision enabled. (SetObjectNoCameraCollision)
description: Checks if an object has camera collision enabled (SetObjectNoCameraCollision).
tags: ["object"]
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: HasPlayerObjectCameraCollision
sidebar_label: HasPlayerObjectCameraCollision
description: Checks if a player-object has camera collision enabled. (SetPlayerObjectNoCameraCollision)
description: Checks if a player-object has camera collision enabled (SetPlayerObjectNoCameraCollision).
tags: ["player", "object", "playerobject"]
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ public OnPlayerConnect(playerid)

:::note

- If [PlayerTextDrawSetOutline](PlayerTextDrawSetOutline) is used with size > 0, the outline colour will match the colour used in PlayerTextDrawBackgroundColour.
- Changing the value of colour seems to alter the colour used in PlayerTextDrawColour.
If [PlayerTextDrawSetOutline](PlayerTextDrawSetOutline) is used with size > 0, the outline colour will match the colour used in PlayerTextDrawBackgroundColour. Changing the value of colour seems to alter the colour used in PlayerTextDrawColour.

:::

Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/functions/PlayerTextDrawColor.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public OnPlayerConnect(playerid)

:::tip

You can also use Gametext colours in textdraws. (e.g. `~r~` `~g~` `~b~`)
You can also use Gametext colours in textdraws.

:::

Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/functions/RepairVehicle.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: RepairVehicle
sidebar_label: RepairVehicle
description: Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.
description: Fully repairs a vehicle, including visual damage (bumps, dents, scratches, popped tires etc.).
tags: ["vehicle"]
---

Expand Down
3 changes: 2 additions & 1 deletion frontend/docs/scripting/functions/SHA256_PassHash.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ The returned hash has zero padding (i.e. possible prefix 00ABCD123...).

:::tip

The salt is appended to the end of the password, meaning password 'foo' and salt 'bar' would form 'foobar'. The salt should be random, unique for each player and at least as long as the hashed password. It is to be stored alongside the actual hash in the player's account.
- The salt is appended to the end of the password, meaning password 'foo' and salt 'bar' would form 'foobar'.
- The salt should be random, unique for each player and at least as long as the hashed password. It is to be stored alongside the actual hash in the player's account.

:::

Expand Down
4 changes: 3 additions & 1 deletion frontend/docs/scripting/functions/SendDeathMessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ public OnPlayerDeath(playerid, killerid, WEAPON:reason)

:::tip

Death messages can be cleared by using a valid player ID for 'playerid' that is not connected. To show a death message for just a single player, use [SendDeathMessageToPlayer](SendDeathMessageToPlayer). You can use NPCs to create your own custom death reasons.
- Death messages can be cleared by using a valid player ID for 'playerid' that is not connected.
- To show a death message for just a single player, use [SendDeathMessageToPlayer](SendDeathMessageToPlayer).
- You can use NPCs to create your own custom death reasons.

:::

Expand Down
3 changes: 2 additions & 1 deletion frontend/docs/scripting/functions/SetActorInvulnerable.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public OnGameModeInit()

:::warning

Once set invulnerable, the actor does not call [OnPlayerGiveDamageActor](../callbacks/OnPlayerGiveDamageActor). Players will have actor's invulnerability state changed only when it is restreamed to them.
- Once set invulnerable, the actor does not call [OnPlayerGiveDamageActor](../callbacks/OnPlayerGiveDamageActor).
- Players will have actor's invulnerability state changed only when it is restreamed to them.

:::

Expand Down
Loading
Loading