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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions frontend/docs/scripting/callbacks/OnPlayerUpdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public OnPlayerUpdate(playerid)
CallLocalFunction("OnPlayerWeaponChange", "iii", playerid, gPlayerCurrentWeapon[playerid], weapon);
gPlayerCurrentWeapon[playerid] = weapon; // Update the weapon variable
}
return 1; // Send this update to other players.
return 1; // Send this update to other players
}

forward OnPlayerWeaponChange(playerid, WEAPON:oldWeapon, WEAPON:newWeapon);
Expand Down Expand Up @@ -69,8 +69,8 @@ public OnPlayerUpdate(playerid)

if (fHealth != GetPVarFloat(playerid, "faPlayerHealth"))
{
// Player health has changed since the last update -> server, so obviously thats the thing updated.
// Lets do further checks see if he's lost or gained health, anti-health cheat? ;)
// Player health has changed since the last update -> server, so obviously thats the thing updated
// Lets do further checks see if he's lost or gained health

if (fHealth > GetPVarFloat(playerid, "faPlayerHealth"))
{
Expand Down
2 changes: 1 addition & 1 deletion frontend/docs/scripting/functions/ApplyActorAnimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Apply an animation to an actor.
| actorid | The ID of the actor to apply the animation to. |
| const animationLibrary[] | The [animation library](../resources/animations) from which to apply an animation. |
| const animationName[] | The name of the [animation](../resources/animations) to apply, within the specified library. |
| float:delta | The speed to play the animation (use 4.1). |
| Float:delta | The speed to play the animation (use 4.1). |
| bool:loop | If set to **true**, the animation will loop. If set to **false**, the animation will play once. |
| bool:lockX | If set to **false**, the actor is returned to their old X coordinate once the animation is complete (for animations that move the actor such as walking). **true** will not return them to their old position. |
| bool:lockY | Same as above but for the Y axis. Should be kept the same as the previous parameter. |
Expand Down
4 changes: 1 addition & 3 deletions frontend/docs/scripting/functions/CreatePlayerPickup.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,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 [OnPlayerPickUpPlayerPickup](../callbacks/OnPlayerPickUpPlayerPickup) 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 [OnPlayerPickUpPlayerPickup](../callbacks/OnPlayerPickUpPlayerPickup) either.

:::

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

Get the material data from an index of the object.

| Name | Description |
| ------------------ | ----------------------------------------------------------------------------------------------------------- |
| objectid | The ID of the object. |
| materialIndex | The material index on the object. (0 to 15) |
| &modelid | A variable in which to store the model ID, passed by reference. |
| textureLibrary[] | An array into which to store the texture library name, passed by reference. |
| textureLibrarySize | The size of the array for the texture library name. |
| textureName[] | An array into which to store the [texture](https://models.open.mp/?cat=textures) name, passed by reference. |
| textureNameSize | The size of the array for the texture name. |
| &materialColour | A variable in which to store the materialColour, passed by reference. |
| Name | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------- |
| objectid | The ID of the object. |
| materialIndex | The material index on the object. (0 to 15) |
| &modelid | A variable in which to store the model ID, passed by reference. |
| textureLibrary[] | An array into which to store the [texture library](https://models.open.mp/?cat=textures) name, passed by reference. |
| textureLibrarySize | The size of the array for the texture library name. |
| textureName[] | An array into which to store the [texture](https://models.open.mp/?cat=textures) name, passed by reference. |
| textureNameSize | The size of the array for the texture name. |
| &materialColour | A variable in which to store the materialColour, passed by reference. |

## Returns

Expand Down
22 changes: 11 additions & 11 deletions frontend/docs/scripting/functions/GetPlayerObjectMaterial.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ tags: ["player", "object", "playerobject"]

Get the material data from an index of the player-object.

| Name | Description |
| ------------------ | ----------------------------------------------------------------------------------------------------------- |
| playerid | The ID of the player. |
| objectid | The ID of the player-object. |
| materialIndex | The material index on the object. (0 to 15) |
| &modelid | A variable in which to store the model ID, passed by reference. |
| textureLibrary[] | An array into which to store the texture library name, passed by reference. |
| textureLibrarySize | The size of the array for the texture library name. |
| textureName[] | An array into which to store the [texture](https://models.open.mp/?cat=textures) name, passed by reference. |
| textureNameSize | The size of the array for the texture name. |
| &materialColour | A variable in which to store the materialColour, passed by reference. |
| Name | Description |
| ------------------ | ------------------------------------------------------------------------------------------------------------------- |
| playerid | The ID of the player. |
| objectid | The ID of the player-object. |
| materialIndex | The material index on the object. (0 to 15) |
| &modelid | A variable in which to store the model ID, passed by reference. |
| textureLibrary[] | An array into which to store the [texture library](https://models.open.mp/?cat=textures) name, passed by reference. |
| textureLibrarySize | The size of the array for the texture library name. |
| textureName[] | An array into which to store the [texture](https://models.open.mp/?cat=textures) name, passed by reference. |
| textureNameSize | The size of the array for the texture name. |
| &materialColour | A variable in which to store the materialColour, passed by reference. |

## Returns

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

Adds a waypoint to an NPC path.

| Name | Description |
| --------- | ------------------------------------------------------- |
| pathid | The ID of the path to add the point to |
| x | The X coordinate of the waypoint |
| y | The Y coordinate of the waypoint |
| z | The Z coordinate of the waypoint |
| stopRange | The distance from point at which to consider it reached |
| Name | Description |
| --------------- | ------------------------------------------------------- |
| pathid | The ID of the path to add the point to |
| Float:x | The X coordinate of the waypoint |
| Float:y | The Y coordinate of the waypoint |
| Float:z | The Z coordinate of the waypoint |
| Float:stopRange | The distance from point at which to consider it reached |

## Returns

Expand Down
16 changes: 8 additions & 8 deletions frontend/docs/scripting/functions/NPC_AimAtPlayer.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ Makes an NPC aim at a player.
| ------------------- | --------------------------------------------- |
| npcid | The ID of the NPC |
| playerid | The ID of the player to aim at |
| shoot | Whether to shoot while aiming |
| bool:shoot | Whether to shoot while aiming |
| shootDelay | Delay between shots in milliseconds |
| updateAngle | Whether to update the NPC's facing angle |
| offsetX | The X offset from the target's position |
| offsetY | The Y offset from the target's position |
| offsetZ | The Z offset from the target's position |
| offsetFromX | The X offset from the NPC's shooting position |
| offsetFromY | The Y offset from the NPC's shooting position |
| offsetFromZ | The Z offset from the NPC's shooting position |
| bool:updateAngle | Whether to update the NPC's facing angle |
| Float:offsetX | The X offset from the target's position |
| Float:offsetY | The Y offset from the target's position |
| Float:offsetZ | The Z offset from the target's position |
| Float:offsetFromX | The X offset from the NPC's shooting position |
| Float:offsetFromY | The Y offset from the NPC's shooting position |
| Float:offsetFromZ | The Z offset from the NPC's shooting position |
| checkInBetweenFlags | Entity check flags for collision detection |

## Returns
Expand Down
22 changes: 11 additions & 11 deletions frontend/docs/scripting/functions/NPC_ApplyAnimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ tags: ["npc", "animation"]

Applies a specific animation to an NPC using animation library and name.

| Name | Description |
| ---------- | ------------------------------------------ |
| npcid | The ID of the NPC |
| animlib[] | The animation library name |
| animname[] | The animation name within the library |
| delta | The speed of the animation (typically 4.1) |
| loop | Whether the animation should loop |
| lockX | Lock movement on the X axis |
| lockY | Lock movement on the Y axis |
| freeze | Freeze the NPC at the end of animation |
| time | Time in milliseconds to play the animation |
| Name | Description |
| ----------- | ------------------------------------------ |
| npcid | The ID of the NPC |
| animlib[] | The animation library name |
| animname[] | The animation name within the library |
| Float:delta | The speed of the animation (typically 4.1) |
| bool:loop | Whether the animation should loop |
| bool:lockX | Lock movement on the X axis |
| bool:lockY | Lock movement on the Y axis |
| bool:freeze | Freeze the NPC at the end of animation |
| time | Time in milliseconds to play the animation |

## Returns

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

:::note

- This will remove the NPC from the server completely and the ID becomes invalid after destruction.
This will remove the NPC from the server completely and the ID becomes invalid after destruction.

:::

Expand Down
10 changes: 5 additions & 5 deletions frontend/docs/scripting/functions/NPC_GetAnimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Gets the current animation data of an NPC.
| ------------ | ----------------------------------------- |
| npcid | The ID of the NPC |
| &animationId | Variable to store the animation ID |
| &delta | Variable to store the animation speed |
| &loop | Variable to store whether animation loops |
| &lockX | Variable to store X-axis lock state |
| &lockY | Variable to store Y-axis lock state |
| &freeze | Variable to store freeze state at end |
| &Float:delta | Variable to store the animation speed |
| &bool:loop | Variable to store whether animation loops |
| &bool:lockX | Variable to store X-axis lock state |
| &bool:lockY | Variable to store Y-axis lock state |
| &bool:freeze | Variable to store freeze state at end |
| &time | Variable to store animation time |

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

Gets the position of the current point in an NPC node.

| Name | Description |
| ------ | ---------------------------------- |
| nodeid | The ID of the node |
| &x | Variable to store the X coordinate |
| &y | Variable to store the Y coordinate |
| &z | Variable to store the Z coordinate |
| Name | Description |
| -------- | ---------------------------------- |
| nodeid | The ID of the node |
| &Float:x | Variable to store the X coordinate |
| &Float:y | Variable to store the Y coordinate |
| &Float:z | Variable to store the Z coordinate |

## Returns

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

Gets the coordinates and stop range of a specific point in an NPC path.

| Name | Description |
| ----------- | ---------------------------------------- |
| pathid | The ID of the path |
| point_index | The index of the point (starting from 0) |
| &x | Variable to store the X coordinate |
| &y | Variable to store the Y coordinate |
| &z | Variable to store the Z coordinate |
| &stopRange | Variable to store the stop range |
| Name | Description |
| ---------------- | ---------------------------------------- |
| pathid | The ID of the path |
| point_index | The index of the point (starting from 0) |
| &Float:x | Variable to store the X coordinate |
| &Float:y | Variable to store the Y coordinate |
| &Float:z | Variable to store the Z coordinate |
| &Float:stopRange | Variable to store the stop range |

## Returns

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

:::note

- All coordinate parameters are passed by reference and will be modified.
All coordinate parameters are passed by reference and will be modified.

:::

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

Gets the surfing offset for an NPC.

| Name | Description |
| ----- | ----------------------------------------------------- |
| npcid | The ID of the NPC |
| &x | A variable to store the X offset, passed by reference |
| &y | A variable to store the Y offset, passed by reference |
| &z | A variable to store the Z offset, passed by reference |
| Name | Description |
| -------- | ----------------------------------------------------- |
| npcid | The ID of the NPC |
| &Float:x | A variable to store the X offset, passed by reference |
| &Float:y | A variable to store the Y offset, passed by reference |
| &Float:z | A variable to store the Z offset, passed by reference |

## Returns

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

:::note

- All velocity parameters are passed by reference and will be modified
All velocity parameters are passed by reference and will be modified

:::

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

Checks if a path has any point within the specified range from given coordinates.

| Name | Description |
| ------ | ------------------------------------------ |
| pathId | The ID of the path to check |
| x | The X coordinate of the center position |
| y | The Y coordinate of the center position |
| z | The Z coordinate of the center position |
| radius | The radius to check for path points within |
| Name | Description |
| ------------ | ------------------------------------------ |
| pathId | The ID of the path to check |
| Float:x | The X coordinate of the center position |
| Float:y | The Y coordinate of the center position |
| Float:z | The Z coordinate of the center position |
| Float:radius | The radius to check for path points within |

## Returns

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

Makes an NPC follow a predefined path with various movement options.

| Name | Description |
| --------- | -------------------------------------------------- |
| npcid | The ID of the NPC |
| pathid | The ID of the path to follow |
| moveType | The movement type (default: NPC_MOVE_TYPE_JOG) |
| moveSpeed | Movement speed (default: NPC_MOVE_SPEED_AUTO) |
| reversed | Whether to follow path in reverse (default: false) |
| Name | Description |
| --------------- | -------------------------------------------------- |
| npcid | The ID of the NPC |
| pathid | The ID of the path to follow |
| moveType | The movement type (default: NPC_MOVE_TYPE_JOG) |
| Float:moveSpeed | Movement speed (default: NPC_MOVE_SPEED_AUTO) |
| bool:reversed | Whether to follow path in reverse (default: false) |

## Returns

Expand Down
Loading