Skip to content
Open
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
  •  
  •  
  •  
6 changes: 2 additions & 4 deletions frontend/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ description: open.mp development progress and changelog.

## **[v1.5.8.3079](https://github.com/openmultiplayer/open.mp/releases/tag/v1.5.8.3079) (Latest)**


We're excited to announce the release of our latest server version!

This update brings several important fixes and introduces a long awaited new feature: **Fully controllable NPCs**!
Expand Down Expand Up @@ -54,11 +53,10 @@ For full changelog please read it from [here](https://github.com/openmultiplayer
- Join the community and get support on [Discord](https://discord.gg/samp)
- Support development via [OpenCollective](https://opencollective.com/openmultiplayer)

This release sets the direction for the remainder of this year and lays the foundation for a new chapter in 2026.
We are entering a phase focused on deeper tooling, stronger native integrations, and more ambitious releases.
This release sets the direction for the remainder of this year and lays the foundation for a new chapter in 2026.
We are entering a phase focused on deeper tooling, stronger native integrations, and more ambitious releases.
We’re excited to build what comes next together with the community.


<br />

<hr />
Expand Down
10 changes: 5 additions & 5 deletions frontend/docs/scripting/callbacks/OnNPCFinishMovePathPoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ tags: ["npc", "path", "movement"]

This callback is called when an NPC finishes moving to a specific point in a path.

| Name | Description |
| ------- | ------------------------------------------------ |
| npcid | The ID of the NPC that finished the path point |
| pathid | The ID of the path being followed |
| pointid | The index of the point that was reached |
| Name | Description |
| ------- | ---------------------------------------------- |
| npcid | The ID of the NPC that finished the path point |
| pathid | The ID of the path being followed |
| pointid | The index of the point that was reached |

## Examples

Expand Down
10 changes: 5 additions & 5 deletions frontend/docs/scripting/callbacks/OnPlayerDisconnect.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ It is always called first in filterscripts.

## Reasons

| ID | Reason | Details |
| --- | ------------- | ----------------------------------------------------------------------------------------------- |
| 0 | Timeout/Crash | The player's connection was lost. Either their game crashed or their network had a fault. |
| 1 | Quit | The player purposefully quit, either using the /quit (/q) command or via the pause menu. |
| 2 | Kick/Ban | The player was kicked or banned by the server. |
| ID | Reason | Details |
| --- | ------------- | ----------------------------------------------------------------------------------------- |
| 0 | Timeout/Crash | The player's connection was lost. Either their game crashed or their network had a fault. |
| 1 | Quit | The player purposefully quit, either using the /quit (/q) command or via the pause menu. |
| 2 | Kick/Ban | The player was kicked or banned by the server. |

## Examples

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

## Description

Gets the highest actorid created on the server. Note that in SA:MP this function is broken and will return `0` even when there are no actors. open.mp correct this to return `-1`, but also deprecate the function in favour of `MAX_ACTORS` or `foreach`.
Gets the highest actorid created on the server. Note that in SA:MP this function is broken and will return `0` even when there are no actors. open.mp correct this to return `-1`, but also deprecate the function in favour of `MAX_ACTORS` or `foreach`.

## Examples

Expand Down
10 changes: 5 additions & 5 deletions frontend/docs/scripting/functions/GetVehicleDamageStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ For some useful functions for working with vehicle damage values, see [here](../

Retrieve the damage statuses of a vehicle.

| Name | Description |
| --------------------------- | ------------------------------------------------------------------ |
| vehicleid | The ID of the vehicle to get the damage statuses of. |
| Name | Description |
| --------------------------- | ---------------------------------------------------------------------------------------------- |
| vehicleid | The ID of the vehicle to get the damage statuses of. |
| VEHICLE_PANEL_STATUS:panels | A set of bits containing the panel damage status. See [Panel States](../resources/panelstates) |
| VEHICLE_DOOR_STATUS:doors | A set of bits containing the door damage status. See [Door States](../resources/doorstates) |
| VEHICLE_DOOR_STATUS:doors | A set of bits containing the door damage status. See [Door States](../resources/doorstates) |
| VEHICLE_LIGHT_STATUS:lights | A set of bits containing the light damage status. See [Light States](../resources/lightstates) |
| VEHICLE_TIRE_STATUS:tires | A set of bits containing the tire damage status. See [Tire States](../resources/tirestates) |
| VEHICLE_TIRE_STATUS:tires | A set of bits containing the tire damage status. See [Tire States](../resources/tirestates) |

## Returns

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

Allows you to retrieve the current state of a vehicle's doors

| Name | Description |
| ---------------- | ----------------------------------------------------------------------- |
| vehicleid | The ID of the vehicle |
| &frontLeft | The integer to save the state of the driver's door to. |
| &frontRight | The integer to save the state of the passenger's door to. |
| &rearLeft | The integer to save the state of the rear left door to (if available). |
| &rearRight | The integer to save the state of the rear right door to (if available). |
| Name | Description |
| ----------- | ----------------------------------------------------------------------- |
| vehicleid | The ID of the vehicle |
| &frontLeft | The integer to save the state of the driver's door to. |
| &frontRight | The integer to save the state of the passenger's door to. |
| &rearLeft | The integer to save the state of the rear left door to (if available). |
| &rearRight | The integer to save the state of the rear right door to (if available). |

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ tags: ["vehicle"]

Allows you to retrieve the current state of a vehicle's windows

| Name | Description |
| ---------------- | ------------------------------------------------------------------------- |
| vehicleid | The ID of the vehicle |
| &frontLeft | The integer to save the state of the drivers window to. |
| &frontRight | The integer to save the state of the passengers window to. |
| &rearLeft | The integer to save the state of the rear left window to (if available). |
| &rearRight | The integer to save the state of the rear right window to (if available). |
| Name | Description |
| ----------- | ------------------------------------------------------------------------- |
| vehicleid | The ID of the vehicle |
| &frontLeft | The integer to save the state of the drivers window to. |
| &frontRight | The integer to save the state of the passengers window to. |
| &rearLeft | The integer to save the state of the rear left window to (if available). |
| &rearRight | The integer to save the state of the rear right window to (if available). |

## Returns

Expand Down
20 changes: 10 additions & 10 deletions frontend/docs/scripting/functions/GetVehicleParamsEx.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ tags: ["vehicle"]

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.. |
| &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. |
| &bonnet | Get the bonnet/hood status. If 1, it's open. |
| &boot | Get the boot/trunk status. 1 means it is open. |
| &objective | Get the objective status. 1 means the objective is on. |
| Name | Description |
| ---------- | ------------------------------------------------------------------- |
| vehicleid | The ID of the vehicle to get the parameters from. |
| &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. |
| &bonnet | Get the bonnet/hood status. If 1, it's open. |
| &boot | Get the boot/trunk status. 1 means it is open. |
| &objective | Get the objective status. 1 means the objective is on. |

## Returns

Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/functions/NPC_AimAtPlayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Returns `true` if the operation was successful, `false` otherwise.

```c
public OnPlayerCommandText(playerid, cmdtext[])
{
{
if (!strcmp(cmdtext, "/hostile", true))
{
new npcid = PlayerNPC[playerid];
Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/functions/NPC_ApplyAnimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public OnPlayerCommandText(playerid, cmdtext[])

NPC_ApplyAnimation(npcid, "DANCING", "dance_loop", 4.1, true, false, false, false, 0);
SendClientMessage(playerid, 0x00FF00FF, "NPC %d has been applied animation.", npcid);

return 1;
}
return 0;
Expand Down
4 changes: 2 additions & 2 deletions frontend/docs/scripting/functions/NPC_ClearAnimations.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public OnPlayerCommandText(playerid, cmdtext[])

NPC_ApplyAnimation(npcid, "DANCING", "dance_loop", 4.1, true, false, false, false, 0);
SendClientMessage(playerid, 0x00FF00FF, "NPC %d has been applied animation.", npcid);

SetTimerEx("ClearNPCAnimations", 25000, false, "ii", playerid, npcid);

return 1;
Expand All @@ -43,7 +43,7 @@ public OnPlayerCommandText(playerid, cmdtext[])
forward ClearNPCAnimations(playerid, npcid);
public ClearNPCAnimations(playerid, npcid)
{

NPC_ClearAnimations(npcid);
SendClientMessage(playerid, 0x00FF00FF, "NPC %d animations were cleared.", npcid);
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/functions/NPC_CreatePath.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public OnPlayerCommandText(playerid, cmdtext[])
{
new pathid = NPC_CreatePath();
g_PatrolPath = pathid;

// If you wanted, you could already add points to the path here
// NPC_AddPointToPath(g_PatrolPath, x, y, z, 1.5)
// NPC_AddPointToPath(g_PatrolPath, x1, y1, z1, 1.5)
Expand Down
6 changes: 3 additions & 3 deletions frontend/docs/scripting/functions/NPC_GetPosMovingTo.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ tags: ["npc", "position", "movement"]

Gets the position that the NPC is currently moving toward.

| Name | Description |
| -------- | ------------------------------------------------------------------ |
| npcid | The ID of the NPC |
| Name | Description |
| -------- | ------------------------------------------------------------------------------ |
| npcid | The ID of the NPC |
| &Float:x | Variable to store the X coordinate of the target position, passed by reference |
| &Float:y | Variable to store the Y coordinate of the target position, passed by reference |
| &Float:z | Variable to store the Z coordinate of the target position, passed by reference |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public OnPlayerCommandText(playerid, cmdtext[])
else
SendClientMessage(playerid, 0x00FF00FF, "NPC %d: Landing gear DOWN", npcid);

return 1;
return 1;
}
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Returns the vehicle health as a float value, or 0.0 if the NPC is not in a vehic

```c
public OnPlayerCommandText(playerid, cmdtext[])
{
{
if (!strcmp(cmdtext, "/checkvehiclehealth", true))
{
new npcid = PlayerNPC[playerid];
Expand Down
6 changes: 3 additions & 3 deletions frontend/docs/scripting/functions/NPC_GetVelocity.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ tags: ["npc", "velocity", "movement"]

Gets the velocity of an NPC.

| Name | Description |
| -------- | -------------------------------------------------------- |
| npcid | The ID of the NPC |
| Name | Description |
| -------- | --------------------------------------------------------------- |
| npcid | The ID of the NPC |
| &Float:x | Variable to store the X velocity component, passed by reference |
| &Float:y | Variable to store the Y velocity component, passed by reference |
| &Float:z | Variable to store the Z velocity component, passed by reference |
Expand Down
8 changes: 4 additions & 4 deletions frontend/docs/scripting/functions/NPC_IsMovingToPlayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ tags: ["npc", "player", "movement"]

Checks if an NPC is moving toward a specific player.

| Name | Description |
| -------- | ------------------------------ |
| npcid | The ID of the NPC |
| playerid | The ID of the player to check |
| Name | Description |
| -------- | ----------------------------- |
| npcid | The ID of the NPC |
| playerid | The ID of the player to check |

## Returns

Expand Down
8 changes: 4 additions & 4 deletions frontend/docs/scripting/functions/NPC_Kill.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ tags: ["npc", "death", "kill"]

Kills an NPC with a specific weapon/reason.

| Name | Description |
| -------- | ---------------------------------------------------------------------------- |
| npcid | The ID of the NPC to kill |
| Name | Description |
| -------- | --------------------------------------------------------------------------------------- |
| npcid | The ID of the NPC to kill |
| killerid | The ID of the player who killed the NPC (optional, use INVALID_PLAYER_ID for no killer) |
| reason | The weapon ID or reason for death (default: 255 for suicide) |
| reason | The weapon ID or reason for death (default: 255 for suicide) |

## Returns

Expand Down
18 changes: 9 additions & 9 deletions frontend/docs/scripting/functions/NPC_Move.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ tags: ["npc", "movement"]

Makes an NPC move to a specific position.

| Name | Description |
| ---------------------- | -------------------------------------------------- |
| npcid | The ID of the NPC. |
| Float:x | The X coordinate to move to. |
| Float:y | The Y coordinate to move to. |
| Float:z | The Z coordinate to move to. |
| NPC_MOVE_TYPE:moveType | [The movement type](../resources/npc-constants#movement-types) (default: `NPC_MOVE_TYPE_JOG`). |
| Float:moveSpeed | [Movement speed](../resources/npc-constants#movement-speed) (default: `NPC_MOVE_SPEED_AUTO`). |
| Float:stopRange | Distance to target before stopping (default: 0.2). |
| Name | Description |
| ---------------------- | ---------------------------------------------------------------------------------------------- |
| npcid | The ID of the NPC. |
| Float:x | The X coordinate to move to. |
| Float:y | The Y coordinate to move to. |
| Float:z | The Z coordinate to move to. |
| NPC_MOVE_TYPE:moveType | [The movement type](../resources/npc-constants#movement-types) (default: `NPC_MOVE_TYPE_JOG`). |
| Float:moveSpeed | [Movement speed](../resources/npc-constants#movement-speed) (default: `NPC_MOVE_SPEED_AUTO`). |
| Float:stopRange | Distance to target before stopping (default: 0.2). |

## Returns

Expand Down
6 changes: 3 additions & 3 deletions frontend/docs/scripting/functions/NPC_PausePlayback.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ tags: ["npc", "recording", "playback"]

Pauses or resumes an NPC's recording playback.

| Name | Description |
| ----- | ------------------------------------------ |
| npcid | The ID of the NPC |
| Name | Description |
| ----- | ----------------------------------------- |
| npcid | The ID of the NPC |
| pause | Whether to pause (true) or resume (false) |

## Returns
Expand Down
6 changes: 3 additions & 3 deletions frontend/docs/scripting/functions/NPC_SetAngleToPlayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ tags: ["npc", "angle", "player"]

Rotates an NPC to face a specific player by using the player's current position.

| Name | Description |
| -------- | ----------- |
| npcid | The ID of the NPC. |
| Name | Description |
| -------- | ---------------------------------------------- |
| npcid | The ID of the NPC. |
| playerid | The ID of the player that the NPC should face. |

## Returns
Expand Down
6 changes: 3 additions & 3 deletions frontend/docs/scripting/functions/NPC_SetAngleToPos.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ tags: ["npc", "angle", "position"]

Rotates an NPC so it faces a specific world position.

| Name | Description |
| ------ | ----------- |
| npcid | The ID of the NPC. |
| Name | Description |
| ------- | ------------------------------------ |
| npcid | The ID of the NPC. |
| Float:x | X coordinate of the target position. |
| Float:y | Y coordinate of the target position. |
| Float:z | Z coordinate of the target position. |
Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/functions/NPC_SetAnimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public OnPlayerCommandText(playerid, cmdtext[])

NPC_SetAnimation(npcid, 405, 4.1, true, false, false, false, 0);
SendClientMessage(playerid, 0x00FF00FF, "NPC %d has been set to animate.", npcid);

SetTimerEx("ClearNPCAnimations", 25000, false, "ii", playerid, npcid);

return 1;
Expand Down
12 changes: 6 additions & 6 deletions frontend/docs/scripting/functions/NPC_SetVelocity.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ tags: ["npc", "velocity", "movement"]

Sets the velocity of an NPC.

| Name | Description |
| ------- | -------------------------- |
| npcid | The ID of the NPC |
| Float:x | The X velocity component |
| Float:y | The Y velocity component |
| Float:z | The Z velocity component |
| Name | Description |
| ------- | ------------------------ |
| npcid | The ID of the NPC |
| Float:x | The X velocity component |
| Float:y | The Y velocity component |
| Float:z | The Z velocity component |

## Returns

Expand Down
Loading
Loading