diff --git a/docs/scripting/functions/ApplyActorAnimation.md b/docs/scripting/functions/ApplyActorAnimation.md index b186a53af..3720d0c4c 100644 --- a/docs/scripting/functions/ApplyActorAnimation.md +++ b/docs/scripting/functions/ApplyActorAnimation.md @@ -10,23 +10,23 @@ tags: ["actor"] Apply an animation to an actor. -| Name | Description | -| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| actorid | The ID of the actor to apply the animation to. | -| animlib[] | The animation library from which to apply an animation. | -| animname[] | The name of the animation to apply, within the specified library. | -| fDelta | The speed to play the animation (use 4.1). | -| loop | If set to 1, the animation will loop. If set to 0, the animation will play once. | -| lockx | If set to 0, the actor is returned to their old X coordinate once the animation is complete (for animations that move the actor such as walking). 1 will not return them to their old position. | -| locky | Same as above but for the Y axis. Should be kept the same as the previous parameter. | -| freeze | Setting this to 1 will freeze an actor at the end of the animation. 0 will not. | -| time | Timer in milliseconds. For a never-ending loop it should be 0. | +| Name | Description | +| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| actorid | The ID of the actor to apply the animation to. | +| const animlib[] | The animation library from which to apply an animation. | +| const animname[] | The name of the animation to apply, within the specified library. | +| float:fDelta | 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. | +| bool:freeze | Setting this to true will freeze an actor at the end of the animation. false will not. | +| time | Timer in milliseconds. For a never-ending loop it should be 0. | ## Returns -1: The function executed successfully. +true: The function executed successfully. -0: The function failed to execute. The actor specified does not exist. +false: The function failed to execute. The actor specified does not exist. ## Examples @@ -36,7 +36,7 @@ new gMyActor; public OnGameModeInit() { gMyActor = CreateActor(179, 316.1, -134.0, 999.6, 90.0); // Actor as salesperson in Ammunation - ApplyActorAnimation(gMyActor, "DEALER", "shop_pay", 4.1, 0, 0, 0, 0, 0); // Pay anim + ApplyActorAnimation(gMyActor, "DEALER", "shop_pay", 4.1, false, false, false, false, 0); // Pay anim return 1; } ``` diff --git a/docs/scripting/functions/ApplyAnimation.md b/docs/scripting/functions/ApplyAnimation.md index fa21c087f..d51def563 100644 --- a/docs/scripting/functions/ApplyAnimation.md +++ b/docs/scripting/functions/ApplyAnimation.md @@ -9,21 +9,21 @@ tags: ["player", "animation"] Apply an animation to a player. | Name | Description | -| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| playerid | The ID of the player to apply the animation to. | -| animlib[] | The [animation library](../resources/animations) from which to apply an animation. | -| animname[] | The name of the animation to apply, within the specified library. | -| fDelta | The speed to play the animation (use 4.1). | -| loop | If set to 'true', the animation will loop. If set to 'false', the animation will play once. | -| lockx | If set to 'false', the player is returned to their old X coordinate once the animation is complete (for animations that move the player such as walking). 'true' will not return them to their old position. | -| locky | Same as above but for the Y axis. Should be kept the same as the previous parameter. | -| freeze | Setting this to 'true' will freeze the player at the end of the animation. 'false' will not. | -| time | Timer in milliseconds. For a never-ending loop it should be 0. | -| forcesync | Set to 1 to make server sync the animation with all other players in streaming radius (optional). 2 works same as 1, but will ONLY apply the animation to streamed-in players, but NOT the actual player being animated (useful for npc animations and persistent animations when players are being streamed) | +| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| playerid | The ID of the player to apply the animation to. | +| const animlib[] | The [animation library](../resources/animations) from which to apply an animation. | +| const animname[] | The name of the animation to apply, within the specified library. | +| float:fDelta | 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 player is returned to their old X coordinate once the animation is complete (for animations that move the player 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. | +| bool:freeze | Setting this to 'true' will freeze the player at the end of the animation. 'false' will not. | +| time | Timer in milliseconds. For a never-ending loop it should be 0. | +| forcesync | Set to 1 to make server sync the animation with all other players in streaming radius (optional). 2 works same as 1, but will ONLY apply the animation to streamed-in players, but NOT the actual player being animated (useful for npc animations and persistent animations when players are being streamed) | ## Returns -This function always returns 1, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). +This function always returns true, even if the player specified does not exist, or any of the parameters are invalid (e.g. invalid library). ## Examples diff --git a/docs/scripting/functions/IsPlayerInAnyVehicle.md b/docs/scripting/functions/IsPlayerInAnyVehicle.md index e04a70236..03e5f6446 100644 --- a/docs/scripting/functions/IsPlayerInAnyVehicle.md +++ b/docs/scripting/functions/IsPlayerInAnyVehicle.md @@ -14,9 +14,9 @@ Check if a player is inside any vehicle (as a driver or passenger). ## Returns -1: The player is in a vehicle. +true: The player is in a vehicle. -0: The player is not in a vehicle. +false: The player is not in a vehicle. ## Examples diff --git a/docs/scripting/functions/PlayerTextDrawSetProportional.md b/docs/scripting/functions/PlayerTextDrawSetProportional.md index 85ea59fa4..bf0b34758 100644 --- a/docs/scripting/functions/PlayerTextDrawSetProportional.md +++ b/docs/scripting/functions/PlayerTextDrawSetProportional.md @@ -12,9 +12,9 @@ Appears to scale text spacing to a proportional ratio. Useful when using PlayerT | Name | Description | | -------- | ------------------------------------------------------------------------ | -| playerid | The ID of the player whose player-textdraw to set the proportionality of | -| text | The ID of the player-textdraw to set the proportionality of | -| set | 1 to enable proportionality, 0 to disable. | +| playerid | The ID of the player whose player-textdraw to set the proportionality of | +| PlayerText:text | The ID of the player-textdraw to set the proportionality of | +| bool:set | true to enable proportionality, false to disable. | ## Returns diff --git a/docs/scripting/functions/PlayerTextDrawSetSelectable.md b/docs/scripting/functions/PlayerTextDrawSetSelectable.md index d775d5225..79abeffc9 100644 --- a/docs/scripting/functions/PlayerTextDrawSetSelectable.md +++ b/docs/scripting/functions/PlayerTextDrawSetSelectable.md @@ -10,11 +10,11 @@ tags: ["player", "textdraw", "playertextdraw"] Toggles whether a player-textdraw can be selected or not. -| Name | Description | -| --------------- | ----------------------------------------------------------------------------------- | -| playerid | The ID of the player whose player-textdraw to set the selectability of. | -| PlayerText:text | The ID of the player-textdraw to set the selectability of. | -| set | Set the player-textdraw selectable (1) or non-selectable (0). By default this is 0. | +| Name | Description | +| --------------- | ------------------------------------------------------------------------------------------------ | +| playerid | The ID of the player whose player-textdraw to set the selectability of. | +| PlayerText:text | The ID of the player-textdraw to set the selectability of. | +| bool:set | Set the player-textdraw selectable 'true' or non-selectable 'false'. By default this is 'false'. | ## Returns diff --git a/docs/scripting/functions/PlayerTextDrawUseBox.md b/docs/scripting/functions/PlayerTextDrawUseBox.md index 80744be5e..fc62b8f09 100644 --- a/docs/scripting/functions/PlayerTextDrawUseBox.md +++ b/docs/scripting/functions/PlayerTextDrawUseBox.md @@ -12,9 +12,9 @@ Toggle the box on a player-textdraw. | Name | Description | | -------- | -------------------------------------------------------- | -| playerid | The ID of the player whose textdraw to toggle the box of | -| text | The ID of the player-textdraw to toggle the box of | -| use | 1 to use a box or 0 to not use a box | +| playerid | The ID of the player whose textdraw to toggle the box of | +| PlayerText:text | The ID of the player-textdraw to toggle the box of | +| bool:use | true to use a box or false to not use a box | ## Returns diff --git a/docs/scripting/functions/SetObjectMaterialText.md b/docs/scripting/functions/SetObjectMaterialText.md index 6edc42a7c..b3111c52a 100644 --- a/docs/scripting/functions/SetObjectMaterialText.md +++ b/docs/scripting/functions/SetObjectMaterialText.md @@ -12,23 +12,23 @@ Replace the texture of an object with text. | Name | Description | |------------------|-----------------------------------------------------------------------------------------------| -| objectid | The ID of the object to replace the texture of with text. | -| text[] | The text to show on the object. (MAX 2048 characters) | -| materialindex | The object's material index to replace with text. | -| materialsize | The [size](/docs/scripting/resources/materialtextsizes) of the material. | -| fontface | The font to use. | -| fontsize | The size of the text (MAX 255). | -| bold | Bold text. Set to 1 for bold, 0 for not. | -| fontcolor | The color of the text, in ARGB format. | -| backcolor | The background color, in ARGB format. | -| textalignment | The [alignment](/docs/scripting/resources/materialtextalignment) of the text (default: left). | -| OPEN_MP_TAGS:... | Indefinite number of arguments of any tag. | +| objectid | The ID of the object to replace the texture of with text. | +| text[] | The text to show on the object. (MAX 2048 characters) | +| materialindex | The object's material index to replace with text. | +| OBJECT_MATERIAL_SIZE:materialsize | The [size](/docs/scripting/resources/materialtextsizes) of the material. | +| const fontface | The font to use. | +| fontsize | The size of the text (MAX 255). | +| bool:bold | Bold text. Set to true for bold, false for not. | +| fontcolor | The color of the text, in ARGB format. | +| backcolor | The background color, in ARGB format. | +| OBJECT_MATERIAL_TEXT_ALIGN:textalignment | The [alignment](/docs/scripting/resources/materialtextalignment) of the text (default: left). | +| OPEN_MP_TAGS:... | Indefinite number of arguments of any tag. | ## Returns -1: The function was executed successfully. +true: The function was executed successfully. -0: The function failed to execute. +false: The function failed to execute. ## Examples @@ -37,7 +37,7 @@ if (strcmp("/text", cmdtext, true) == 0) { new objectId = CreateObject(19353, 0, 0, 10, 0.0, 0.0, 90.0); //create the object SetObjectMaterialText(objectId, "SA-MP {FFFFFF}0.3{008500}e {FF8200}RC7", 0, OBJECT_MATERIAL_SIZE_256x128, - "Arial", 28, 0, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER); + "Arial", 28, false, 0xFFFF8200, 0xFF000000, OBJECT_MATERIAL_TEXT_ALIGN_CENTER); // write "SA-MP 0.3e RC7" on the object, with orange font color and black background return 1; } diff --git a/docs/scripting/functions/TextDrawUseBox.md b/docs/scripting/functions/TextDrawUseBox.md index 35f911e51..94f728998 100644 --- a/docs/scripting/functions/TextDrawUseBox.md +++ b/docs/scripting/functions/TextDrawUseBox.md @@ -10,14 +10,14 @@ Toggle whether a textdraw uses a box or not. | Name | Description | | ---- | ------------------------------------------------- | -| text | The ID of the text textdraw to toggle the box of. | +| Text:text | The ID of the text textdraw to toggle the box of. | | bool:use | 'true' to show a box or 'false' to not show a box. | ## Returns -1: The function executed successfully. +true: The function executed successfully. -0: The function failed to execute. This means the textdraw specified does not exist. +false: The function failed to execute. This means the textdraw specified does not exist. ## Examples