diff --git a/docs/scripting/functions/Attach3DTextLabelToPlayer.md b/docs/scripting/functions/Attach3DTextLabelToPlayer.md index de5003113..2e91711b3 100644 --- a/docs/scripting/functions/Attach3DTextLabelToPlayer.md +++ b/docs/scripting/functions/Attach3DTextLabelToPlayer.md @@ -39,6 +39,7 @@ public OnPlayerConnect(playerid) - [Create3DTextLabel](Create3DTextLabel): Create a 3D text label. - [Delete3DTextLabel](Delete3DTextLabel): Delete a 3D text label. +- [Get3DTextLabelAttachedData](Get3DTextLabelAttachedData): Gets the 3D text label attached data. - [Attach3DTextLabelToVehicle](Attach3DTextLabelToVehicle): Attach a 3D text label to a vehicle. - [Update3DTextLabelText](Update3DTextLabelText): Change the text of a 3D text label. - [CreatePlayer3DTextLabel](CreatePlayer3DTextLabel): Create A 3D text label for one player. diff --git a/docs/scripting/functions/Attach3DTextLabelToVehicle.md b/docs/scripting/functions/Attach3DTextLabelToVehicle.md index 773441052..bdad2442d 100644 --- a/docs/scripting/functions/Attach3DTextLabelToVehicle.md +++ b/docs/scripting/functions/Attach3DTextLabelToVehicle.md @@ -47,6 +47,7 @@ public OnGameModeExit ( ) - [Create3DTextLabel](Create3DTextLabel): Create a 3D text label. - [Delete3DTextLabel](Delete3DTextLabel): Delete a 3D text label. +- [Get3DTextLabelAttachedData](Get3DTextLabelAttachedData): Gets the 3D text label attached data. - [Attach3DTextLabelToPlayer](Attach3DTextLabelToPlayer): Attach a 3D text label to a player. - [Update3DTextLabelText](Update3DTextLabelText): Change the text of a 3D text label. - [CreatePlayer3DTextLabel](CreatePlayer3DTextLabel): Create A 3D text label for one player. diff --git a/docs/scripting/functions/Create3DTextLabel.md b/docs/scripting/functions/Create3DTextLabel.md index 4be8a42f9..ec69d2ad3 100644 --- a/docs/scripting/functions/Create3DTextLabel.md +++ b/docs/scripting/functions/Create3DTextLabel.md @@ -58,9 +58,20 @@ If text[] is empty, the server/clients next to the text might crash! If the virt ## Related Functions - [Delete3DTextLabel](Delete3DTextLabel): Delete a 3D text label. +- [IsValid3DTextLabel](IsValid3DTextLabel): Checks if a 3D text label is valid. +- [Is3DTextLabelStreamedIn](Is3DTextLabelStreamedIn): Checks if a 3D text label is streamed in for a player. - [Attach3DTextLabelToPlayer](Attach3DTextLabelToPlayer): Attach a 3D text label to a player. - [Attach3DTextLabelToVehicle](Attach3DTextLabelToVehicle): Attach a 3D text label to a vehicle. - [Update3DTextLabelText](Update3DTextLabelText): Change the text of a 3D text label. +- [Get3DTextLabelText](Get3DTextLabelText): Gets the 3D text label text. +- [Get3DTextLabelColour](Get3DTextLabelColour): Gets the 3D text label colour. +- [Get3DTextLabelPos](Get3DTextLabelPos): Gets the 3D text label position. +- [Get3DTextLabelDrawDistance](Get3DTextLabelDrawDistance): Gets the 3D text label draw distance. +- [Set3DTextLabelDrawDistance](Set3DTextLabelDrawDistance): Sets the 3D text label draw distance. +- [Get3DTextLabelVirtualWorld](Get3DTextLabelVirtualWorld): Gets the 3D text label virtual world id. +- [Set3DTextLabelVirtualWorld](Set3DTextLabelVirtualWorld): Sets the 3D text label virtual world id. +- [Get3DTextLabelLOS](Get3DTextLabelLOS): Gets the 3D text label line-of-sight. +- [Set3DTextLabelLOS](Set3DTextLabelLOS): Sets the 3D text label line-of-sight. - [CreatePlayer3DTextLabel](CreatePlayer3DTextLabel): Create A 3D text label for one player. - [DeletePlayer3DTextLabel](DeletePlayer3DTextLabel): Delete a player's 3D text label. - [UpdatePlayer3DTextLabelText](UpdatePlayer3DTextLabelText): Change the text of a player's 3D text label. diff --git a/docs/scripting/functions/CreatePlayer3DTextLabel.md b/docs/scripting/functions/CreatePlayer3DTextLabel.md index 34edcde9f..4b5c3c7ca 100644 --- a/docs/scripting/functions/CreatePlayer3DTextLabel.md +++ b/docs/scripting/functions/CreatePlayer3DTextLabel.md @@ -58,10 +58,16 @@ If text[] is empty, the server/clients next to the text might crash! ## Related Functions -- [Create3DTextLabel](Create3DTextLabel): Create a 3D text label. -- [Delete3DTextLabel](Delete3DTextLabel): Delete a 3D text label. -- [Attach3DTextLabelToPlayer](Attach3DTextLabelToPlayer): Attach a 3D text label to a player. -- [Attach3DTextLabelToVehicle](Attach3DTextLabelToVehicle): Attach a 3D text label to a vehicle. -- [Update3DTextLabelText](Update3DTextLabelText): Change the text of a 3D text label. - [DeletePlayer3DTextLabel](DeletePlayer3DTextLabel): Delete a player's 3D text label. +- [IsValidPlayer3DTextLabel](IsValidPlayer3DTextLabel): Checks if a player's 3D text label is valid. - [UpdatePlayer3DTextLabelText](UpdatePlayer3DTextLabelText): Change the text of a player's 3D text label. +- [GetPlayer3DTextLabelText](GetPlayer3DTextLabelText): Gets the player's 3D text label text. +- [GetPlayer3DTextLabelColour](GetPlayer3DTextLabelColour): Gets the player's 3D text label colour. +- [GetPlayer3DTextLabelPos](GetPlayer3DTextLabelPos): Gets the player's 3D text label position. +- [GetPlayer3DTextLabelDrawDistance](GetPlayer3DTextLabelDrawDistance): Gets the player's 3D text label draw distance. +- [SetPlayer3DTextLabelDrawDistance](SetPlayer3DTextLabelDrawDistance): Sets the player's 3D text label draw distance. +- [GetPlayer3DTextLabelVirtualWorld](GetPlayer3DTextLabelVirtualWorld): Gets the player's 3D text label virtual world id. +- [SetPlayer3DTextLabelVirtualWorld](SetPlayer3DTextLabelVirtualWorld): Sets the player's 3D text label virtual world id. +- [GetPlayer3DTextLabelLOS](GetPlayer3DTextLabelLOS): Gets the player's 3D text label line-of-sight. +- [SetPlayer3DTextLabelLOS](SetPlayer3DTextLabelLOS): Sets the player's 3D text label line-of-sight. +- [Create3DTextLabel](Create3DTextLabel): Create a global 3D text label. \ No newline at end of file diff --git a/docs/scripting/functions/Delete3DTextLabel.md b/docs/scripting/functions/Delete3DTextLabel.md index 5befa26bc..fc90fdc05 100644 --- a/docs/scripting/functions/Delete3DTextLabel.md +++ b/docs/scripting/functions/Delete3DTextLabel.md @@ -31,6 +31,8 @@ Delete3DTextLabel(gMyLabel); ## Related Functions - [Create3DTextLabel](Create3DTextLabel): Create a 3D text label. +- [IsValid3DTextLabel](IsValid3DTextLabel): Checks if a 3D text label is valid. +- [Is3DTextLabelStreamedIn](Is3DTextLabelStreamedIn): Checks if a 3D text label is streamed in for a player. - [Attach3DTextLabelToPlayer](Attach3DTextLabelToPlayer): Attach a 3D text label to a player. - [Attach3DTextLabelToVehicle](Attach3DTextLabelToVehicle): Attach a 3D text label to a vehicle. - [Update3DTextLabelText](Update3DTextLabelText): Change the text of a 3D text label. diff --git a/docs/scripting/functions/DeletePlayer3DTextLabel.md b/docs/scripting/functions/DeletePlayer3DTextLabel.md index 1130710f0..934713981 100644 --- a/docs/scripting/functions/DeletePlayer3DTextLabel.md +++ b/docs/scripting/functions/DeletePlayer3DTextLabel.md @@ -38,3 +38,4 @@ DeletePlayer3DTextLabel(playerid, labelid); - [Update3DTextLabelText](Update3DTextLabelText): Change the text of a 3D text label. - [CreatePlayer3DTextLabel](CreatePlayer3DTextLabel): Create A 3D text label for one player. - [UpdatePlayer3DTextLabelText](UpdatePlayer3DTextLabelText): Change the text of a player's 3D text label. +- [IsValidPlayer3DTextLabel](IsValidPlayer3DTextLabel): Checks if a player's 3D text label is valid. diff --git a/docs/scripting/functions/Get3DTextLabelAttachedData.md b/docs/scripting/functions/Get3DTextLabelAttachedData.md new file mode 100644 index 000000000..409d8db8a --- /dev/null +++ b/docs/scripting/functions/Get3DTextLabelAttachedData.md @@ -0,0 +1,55 @@ +--- +title: Get3DTextLabelAttachedData +description: Gets the 3D text label attached data. +tags: ["3dtextlabel"] +--- + + + +## Description + +Gets the 3D text label attached data. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| Text3D:textid | The ID of the 3D text label to get the attached data of. | +| &parentPlayerid | A variable into which to store the parentPlayerid, passed by reference. | +| &parentVehicleid | A variable into which to store the parentVehicleid, passed by reference. | + +## Examples + +An example for parentPlayerid: + +```c +new Text3D:gMyLabel; +new parentPlayerid; +new parentVehicleid; + +gMyLabel = Create3DTextLabel("Hello, I am new here!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, false); +Attach3DTextLabelToPlayer(gMyLabel, playerid, 0.0, 0.0, 0.7); + +Get3DTextLabelAttachedData(gMyLabel, parentPlayerid, parentVehicleid); +``` + +An example for parentVehicleid: + +```c +new Text3D:gVehicle3dText[MAX_VEHICLES]; +new gVehicleId; + +new parentPlayerid; +new parentVehicleid; + +gVehicleId = CreateVehicle(510, 0.0, 0.0, 15.0, 5, 0, 120); +gVehicle3dText[gVehicleId] = Create3DTextLabel("Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, false); +Attach3DTextLabelToVehicle(gVehicle3dText[gVehicleId], gVehicleId, 0.0, 0.0, 2.0); + +Get3DTextLabelAttachedData(gVehicle3dText[gVehicleId], parentPlayerid, parentVehicleid); +// The `parentVehicleid` will be the value of 'gVehicleId' +``` + +## Related Functions + +- [Attach3DTextLabelToPlayer](Attach3DTextLabelToPlayer): Attach a 3D text label to a player. +- [Attach3DTextLabelToVehicle](Attach3DTextLabelToVehicle): Attaches a 3D Text Label to a specific vehicle. +- [GetPlayer3DTextLabelAttachedData](GetPlayer3DTextLabelAttachedData): Gets the player 3D text label attached data. diff --git a/docs/scripting/functions/Get3DTextLabelColor.md b/docs/scripting/functions/Get3DTextLabelColor.md new file mode 100644 index 000000000..8916b623d --- /dev/null +++ b/docs/scripting/functions/Get3DTextLabelColor.md @@ -0,0 +1,38 @@ +--- +title: Get3DTextLabelColor +description: Gets the 3D text label color. +tags: ["3dtextlabel"] +--- + +:::warning + +This function is deprecated. Please see [Get3DTextLabelColour](Get3DTextLabelColour). + +::: + +## Description + +Gets the 3D text label color. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| Text3D:textid | The ID of the 3D text label to get the color of. | + +## Returns + +Returns the 3D text label color. + +## Examples + +```c +new Text3D:gMyLabel; + +gMyLabel = Create3DTextLabel("Hello World!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0, false); + +new color = Get3DTextLabelColor(gMyLabel); +// The `color` will be 0x008080FF +``` + +## Related Functions + +- [GetPlayer3DTextLabelColor](GetPlayer3DTextLabelColor): Gets the player 3D text label color. diff --git a/docs/scripting/functions/Get3DTextLabelColour.md b/docs/scripting/functions/Get3DTextLabelColour.md new file mode 100644 index 000000000..fa1916d0e --- /dev/null +++ b/docs/scripting/functions/Get3DTextLabelColour.md @@ -0,0 +1,34 @@ +--- +title: Get3DTextLabelColour +description: Gets the 3D text label colour. +tags: ["3dtextlabel"] +--- + + + +## Description + +Gets the 3D text label colour. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| Text3D:textid | The ID of the 3D text label to get the colour of. | + +## Returns + +Returns the 3D text label colour. + +## Examples + +```c +new Text3D:gMyLabel; + +gMyLabel = Create3DTextLabel("Hello World!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0, false); + +new colour = Get3DTextLabelColour(gMyLabel); +// The `colour` will be 0x008080FF +``` + +## Related Functions + +- [GetPlayer3DTextLabelColour](GetPlayer3DTextLabelColour): Gets the player 3D text label colour. diff --git a/docs/scripting/functions/Get3DTextLabelDrawDistance.md b/docs/scripting/functions/Get3DTextLabelDrawDistance.md new file mode 100644 index 000000000..9e3c145ed --- /dev/null +++ b/docs/scripting/functions/Get3DTextLabelDrawDistance.md @@ -0,0 +1,36 @@ +--- +title: Get3DTextLabelDrawDistance +description: Gets the 3D text label draw distance. +tags: ["3dtextlabel"] +--- + + + +## Description + +Gets the 3D text label draw distance. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| Text3D:textid | The ID of the 3D text label to get the draw distance of. | + +## Returns + +Returns the draw distance of the 3D text label as float. + +## Examples + +```c +new Text3D:gMyLabel; +new Float:drawdistance; + +gMyLabel = Create3DTextLabel("Hello World!", 0x008080FF, 30.0, 40.0, 50.0, 10.0, 0, false); + +drawdistance = Get3DTextLabelDrawDistance(gMyLabel); +// The `drawdistance` will be 10.0 +``` + +## Related Functions + +- [Set3DTextLabelDrawDistance](Set3DTextLabelDrawDistance): Sets the 3D text label draw distance. +- [GetPlayer3DTextLabelDrawDistance](GetPlayer3DTextLabelDrawDistance): Gets the player 3D text label draw distance. diff --git a/docs/scripting/functions/Get3DTextLabelLOS.md b/docs/scripting/functions/Get3DTextLabelLOS.md new file mode 100644 index 000000000..a5c995f19 --- /dev/null +++ b/docs/scripting/functions/Get3DTextLabelLOS.md @@ -0,0 +1,36 @@ +--- +title: Get3DTextLabelLOS +description: Gets the 3D text label line-of-sight. +tags: ["3dtextlabel"] +--- + + + +## Description + +Gets the 3D text label line-of-sight. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| Text3D:textid | The ID of the 3D text label to get the line-of-sight of. | + +## Returns + +Returns the line-of-sight of the 3D text label as boolean (false/true). + +## Examples + +```c +new Text3D:gMyLabel; +new bool:testLOS; + +gMyLabel = Create3DTextLabel("Hello World!", 0x008080FF, 30.0, 40.0, 50.0, 10.0, 0, true); + +testLOS = Get3DTextLabelLOS(gMyLabel); +// The `testLOS` will be true +``` + +## Related Functions + +- [Set3DTextLabelLOS](Set3DTextLabelLOS): Sets the 3D text label line-of-sight. +- [GetPlayer3DTextLabelLOS](GetPlayer3DTextLabelLOS): Gets the player 3D text label line-of-sight. diff --git a/docs/scripting/functions/Get3DTextLabelPos.md b/docs/scripting/functions/Get3DTextLabelPos.md new file mode 100644 index 000000000..eec88d1e4 --- /dev/null +++ b/docs/scripting/functions/Get3DTextLabelPos.md @@ -0,0 +1,34 @@ +--- +title: Get3DTextLabelPos +description: Gets the 3D text label position. +tags: ["3dtextlabel"] +--- + + + +## Description + +Gets the 3D text label position. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| Text3D:textid | The ID of the 3D text label to get the position of. | +| &Float:x | An float variable into which to store the X coordinate, passed by reference. | +| &Float:y | An float variable into which to store the Y coordinate, passed by reference. | +| &Float:z | An float variable into which to store the Z coordinate, passed by reference. | + +## Examples + +```c +new Text3D:gMyLabel; +new Float:x, Float:y, Float:z; + +gMyLabel = Create3DTextLabel("Hello World!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0, false); + +Get3DTextLabelPos(gMyLabel, x, y, z); +// The x, y, z will be 30.0, 40.0, 50.0 +``` + +## Related Functions + +- [GetPlayer3DTextLabelPos](GetPlayer3DTextLabelPos): Gets the player 3D text label position. diff --git a/docs/scripting/functions/Get3DTextLabelText.md b/docs/scripting/functions/Get3DTextLabelText.md new file mode 100644 index 000000000..661dc2931 --- /dev/null +++ b/docs/scripting/functions/Get3DTextLabelText.md @@ -0,0 +1,35 @@ +--- +title: Get3DTextLabelText +description: Gets the 3D text label text. +tags: ["3dtextlabel"] +--- + + + +## Description + +Gets the 3D text label text. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| Text3D:textid | The ID of the 3D text label to get the text of. | +| text[] | An array into which to store the text, passed by reference. | +| len | The length of the text that should be stored. | + +## Examples + +```c +new Text3D:gMyLabel; +new text[16]; + +gMyLabel = Create3DTextLabel("Hello World!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0, false); + +Get3DTextLabelText(gMyLabel, text, sizeof(text)); +// The `text` will be 'Hello World!' +``` + +## Related Functions + +- [Create3DTextLabel](Create3DTextLabel): Create a 3D text label. +- [Update3DTextLabelText](Update3DTextLabelText): Updates a 3D Text Label text and colour. +- [GetPlayer3DTextLabelText](GetPlayer3DTextLabelText): Gets the player 3D text label text. diff --git a/docs/scripting/functions/Get3DTextLabelVirtualWorld.md b/docs/scripting/functions/Get3DTextLabelVirtualWorld.md new file mode 100644 index 000000000..8e408bfef --- /dev/null +++ b/docs/scripting/functions/Get3DTextLabelVirtualWorld.md @@ -0,0 +1,36 @@ +--- +title: Get3DTextLabelVirtualWorld +description: Gets the 3D text label virtual world id. +tags: ["3dtextlabel"] +--- + + + +## Description + +Gets the 3D text label virtual world id. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| Text3D:textid | The ID of the 3D text label to get the virtual world id of. | + +## Returns + +Returns the virtual world id of the 3D text label. + +## Examples + +```c +new Text3D:gMyLabel; +new worldid; + +gMyLabel = Create3DTextLabel("Hello World!", 0x008080FF, 30.0, 40.0, 50.0, 10.0, 20, false); + +worldid = Get3DTextLabelVirtualWorld(gMyLabel); +// The `worldid` will be 20 +``` + +## Related Functions + +- [Set3DTextLabelVirtualWorld](Set3DTextLabelVirtualWorld): Sets the 3D text label virtual world id. +- [GetPlayer3DTextLabelVirtualWorld](GetPlayer3DTextLabelVirtualWorld): Gets the player 3D text label virtual world id. diff --git a/docs/scripting/functions/GetPlayer3DTextLabelAttached.md b/docs/scripting/functions/GetPlayer3DTextLabelAttached.md new file mode 100644 index 000000000..6bdc0db35 --- /dev/null +++ b/docs/scripting/functions/GetPlayer3DTextLabelAttached.md @@ -0,0 +1,69 @@ +--- +title: GetPlayer3DTextLabelAttached +description: Gets the player's 3D text label attached data. +tags: ["player", "3dtextlabel"] +--- + +:::warning + +This function is deprecated. Please see [GetPlayer3DTextLabelAttachedData](GetPlayer3DTextLabelAttachedData). + +::: + +## Description + +Gets the player's 3D text label attached data. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| playerid | The ID of the player. | +| PlayerText3D:textid | The ID of the player's 3D text label to get the attached data of. | +| &parentPlayerid | A variable into which to store the parentPlayerid, passed by reference. | +| &parentVehicleid | A variable into which to store the parentVehicleid, passed by reference. | + +## Examples + +An example for parentPlayerid: + +```c +new PlayerText3D:playerTextId; +new Float:X, Float:Y, Float:Z; +new attachedplayer = 37; // Attach to player id 37 + +new parentPlayerid; +new parentVehicleid; + +GetPlayerPos(playerid, X, Y, Z); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0, attachedplayer, INVALID_VEHICLE_ID); + +GetPlayer3DTextLabelAttached(playerid, playerTextId, parentPlayerid, parentVehicleid); +// The `parentPlayerid` will be '37' +``` + +An example for parentVehicleid: + +```c +new PlayerText3D:gVehicle3dText[MAX_VEHICLES]; +new gVehicleId; + +new parentPlayerid; +new parentVehicleid; + +gVehicleId = CreateVehicle(510, 0.0, 0.0, 15.0, 5, 0, 120); +gVehicle3dText[gVehicleId] = CreatePlayer3DTextLabel(playerid, "Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, INVALID_PLAYER_ID, gVehicleId); + +GetPlayer3DTextLabelAttached(playerid, gVehicle3dText[gVehicleId], parentPlayerid, parentVehicleid); +// The `parentVehicleid` will be the value of 'gVehicleId' +``` + +## Notes + +:::tip + +This function is just short name of [GetPlayer3DTextLabelAttachedData](GetPlayer3DTextLabelAttachedData). + +::: + +## Related Functions + +- [Get3DTextLabelAttachedData](Get3DTextLabelAttachedData): Gets the 3D text label attached data. diff --git a/docs/scripting/functions/GetPlayer3DTextLabelAttachedData.md b/docs/scripting/functions/GetPlayer3DTextLabelAttachedData.md new file mode 100644 index 000000000..5c3b92601 --- /dev/null +++ b/docs/scripting/functions/GetPlayer3DTextLabelAttachedData.md @@ -0,0 +1,57 @@ +--- +title: GetPlayer3DTextLabelAttachedData +description: Gets the player's 3D text label attached data. +tags: ["player", "3dtextlabel"] +--- + + + +## Description + +Gets the player's 3D text label attached data. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| playerid | The ID of the player. | +| PlayerText3D:textid | The ID of the player's 3D text label to get the attached data of. | +| &parentPlayerid | A variable into which to store the parentPlayerid, passed by reference. | +| &parentVehicleid | A variable into which to store the parentVehicleid, passed by reference. | + +## Examples + +An example for parentPlayerid: + +```c +new PlayerText3D:playerTextId; +new Float:X, Float:Y, Float:Z; +new attachedplayer = 37; // Attach to player id 37 + +new parentPlayerid; +new parentVehicleid; + +GetPlayerPos(playerid, X, Y, Z); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0, attachedplayer, INVALID_VEHICLE_ID); + +GetPlayer3DTextLabelAttachedData(playerid, playerTextId, parentPlayerid, parentVehicleid); +// The `parentPlayerid` will be '37' +``` + +An example for parentVehicleid: + +```c +new PlayerText3D:gVehicle3dText[MAX_VEHICLES]; +new gVehicleId; + +new parentPlayerid; +new parentVehicleid; + +gVehicleId = CreateVehicle(510, 0.0, 0.0, 15.0, 5, 0, 120); +gVehicle3dText[gVehicleId] = CreatePlayer3DTextLabel(playerid, "Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, INVALID_PLAYER_ID, gVehicleId); + +GetPlayer3DTextLabelAttachedData(playerid, gVehicle3dText[gVehicleId], parentPlayerid, parentVehicleid); +// The `parentVehicleid` will be the value of 'gVehicleId' +``` + +## Related Functions + +- [Get3DTextLabelAttachedData](Get3DTextLabelAttachedData): Gets the 3D text label attached data. diff --git a/docs/scripting/functions/GetPlayer3DTextLabelColor.md b/docs/scripting/functions/GetPlayer3DTextLabelColor.md new file mode 100644 index 000000000..bc1050a2a --- /dev/null +++ b/docs/scripting/functions/GetPlayer3DTextLabelColor.md @@ -0,0 +1,42 @@ +--- +title: GetPlayer3DTextLabelColor +description: Gets the player's 3D text label color. +tags: ["player", "3dtextlabel"] +--- + +:::warning + +This function is deprecated. Please see [GetPlayer3DTextLabelColour](GetPlayer3DTextLabelColour). + +::: + +## Description + +Gets the player's 3D text label color. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| playerid | The ID of the player. | +| PlayerText3D:textid | The ID of the player's 3D text label to get the color of. | + +## Returns + +Returns the player's 3D text label color. + +## Examples + +```c +new PlayerText3D:playerTextId; +new Float:X, Float:Y, Float:Z; +new color; + +GetPlayerPos(playerid, X, Y, Z); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0); + +color = GetPlayer3DTextLabelColor(playerid, playerTextId); +// The `color` will be 0x008080FF +``` + +## Related Functions + +- [Get3DTextLabelColor](Get3DTextLabelColor): Gets the 3D text label color. diff --git a/docs/scripting/functions/GetPlayer3DTextLabelColour.md b/docs/scripting/functions/GetPlayer3DTextLabelColour.md new file mode 100644 index 000000000..40ed612cf --- /dev/null +++ b/docs/scripting/functions/GetPlayer3DTextLabelColour.md @@ -0,0 +1,38 @@ +--- +title: GetPlayer3DTextLabelColour +description: Gets the player's 3D text label colour. +tags: ["player", "3dtextlabel"] +--- + + + +## Description + +Gets the player's 3D text label colour. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| playerid | The ID of the player. | +| PlayerText3D:textid | The ID of the player's 3D text label to get the colour of. | + +## Returns + +Returns the player's 3D text label colour. + +## Examples + +```c +new PlayerText3D:playerTextId; +new Float:X, Float:Y, Float:Z; +new colour; + +GetPlayerPos(playerid, X, Y, Z); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0); + +colour = GetPlayer3DTextLabelColour(playerid, playerTextId); +// The `colour` will be 0x008080FF +``` + +## Related Functions + +- [Get3DTextLabelColour](Get3DTextLabelColour): Gets the 3D text label colour. diff --git a/docs/scripting/functions/GetPlayer3DTextLabelDrawDist.md b/docs/scripting/functions/GetPlayer3DTextLabelDrawDist.md new file mode 100644 index 000000000..69eafba1a --- /dev/null +++ b/docs/scripting/functions/GetPlayer3DTextLabelDrawDist.md @@ -0,0 +1,51 @@ +--- +title: GetPlayer3DTextLabelDrawDist +description: Gets the player's 3D text label draw distance. +tags: ["player", "3dtextlabel"] +--- + +:::warning + +This function is deprecated. Please see [GetPlayer3DTextLabelDrawDistance](GetPlayer3DTextLabelDrawDistance). + +::: + +## Description + +Gets the player's 3D text label draw distance. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| playerid | The ID of the player. | +| PlayerText3D:textid | The ID of the player's 3D text label to get the draw distance of. | + +## Returns + +Returns the draw distance of the player's 3D text label as float. + +## Examples + +```c +new PlayerText3D:playerTextId; +new Float:X, Float:Y, Float:Z; +new Float:drawdistance; + +GetPlayerPos(playerid, X, Y, Z); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0); + +drawdistance = GetPlayer3DTextLabelDrawDist(playerid, playerTextId); +// The `drawdistance` will be 40.0 +``` + +## Notes + +:::tip + +This function is just short name of [GetPlayer3DTextLabelDrawDistance](GetPlayer3DTextLabelDrawDistance). + +::: + +## Related Functions + +- [SetPlayer3DTextLabelDrawDistance](SetPlayer3DTextLabelDrawDistance): Sets the player's 3D text label draw distance. +- [Get3DTextLabelDrawDistance](Get3DTextLabelDrawDistance): Gets the 3D text label draw distance. diff --git a/docs/scripting/functions/GetPlayer3DTextLabelDrawDistance.md b/docs/scripting/functions/GetPlayer3DTextLabelDrawDistance.md new file mode 100644 index 000000000..25bd81006 --- /dev/null +++ b/docs/scripting/functions/GetPlayer3DTextLabelDrawDistance.md @@ -0,0 +1,39 @@ +--- +title: GetPlayer3DTextLabelDrawDistance +description: Gets the player's 3D text label draw distance. +tags: ["player", "3dtextlabel"] +--- + + + +## Description + +Gets the player's 3D text label draw distance. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| playerid | The ID of the player. | +| PlayerText3D:textid | The ID of the player's 3D text label to get the draw distance of. | + +## Returns + +Returns the draw distance of the player's 3D text label as float. + +## Examples + +```c +new PlayerText3D:playerTextId; +new Float:X, Float:Y, Float:Z; +new Float:drawdistance; + +GetPlayerPos(playerid, X, Y, Z); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0); + +drawdistance = GetPlayer3DTextLabelDrawDistance(playerid, playerTextId); +// The `drawdistance` will be 40.0 +``` + +## Related Functions + +- [SetPlayer3DTextLabelDrawDistance](SetPlayer3DTextLabelDrawDistance): Sets the player's 3D text label draw distance. +- [Get3DTextLabelDrawDistance](Get3DTextLabelDrawDistance): Gets the 3D text label draw distance. diff --git a/docs/scripting/functions/GetPlayer3DTextLabelLOS.md b/docs/scripting/functions/GetPlayer3DTextLabelLOS.md new file mode 100644 index 000000000..2d4024a31 --- /dev/null +++ b/docs/scripting/functions/GetPlayer3DTextLabelLOS.md @@ -0,0 +1,39 @@ +--- +title: GetPlayer3DTextLabelLOS +description: Gets the player's 3D text label line-of-sight. +tags: ["player", "3dtextlabel"] +--- + + + +## Description + +Gets the player's 3D text label line-of-sight. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| playerid | The ID of the player. | +| PlayerText3D:textid | The ID of the player's 3D text label to get the line-of-sight of. | + +## Returns + +Returns the line-of-sight of the player's 3D text label as boolean (false/true). + +## Examples + +```c +new PlayerText3D:playerTextId; +new Float:X, Float:Y, Float:Z; +new bool:testLOS; + +GetPlayerPos(playerid, X, Y, Z); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, true); + +testLOS = GetPlayer3DTextLabelLOS(playerid, playerTextId); +// The `testLOS` will be true +``` + +## Related Functions + +- [SetPlayer3DTextLabelLOS](SetPlayer3DTextLabelLOS): Sets the player's 3D text label line-of-sight. +- [Get3DTextLabelLOS](Get3DTextLabelLOS): Gets the 3D text label line-of-sight. diff --git a/docs/scripting/functions/GetPlayer3DTextLabelPos.md b/docs/scripting/functions/GetPlayer3DTextLabelPos.md new file mode 100644 index 000000000..a6e667efd --- /dev/null +++ b/docs/scripting/functions/GetPlayer3DTextLabelPos.md @@ -0,0 +1,36 @@ +--- +title: GetPlayer3DTextLabelPos +description: Gets the player's 3D text label position. +tags: ["player", "3dtextlabel"] +--- + + + +## Description + +Gets the player's 3D text label position. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| playerid | The ID of the player. | +| PlayerText3D:textid | The ID of the player's 3D text label to get the position of. | +| &Float:x | An float variable into which to store the X coordinate, passed by reference. | +| &Float:y | An float variable into which to store the Y coordinate, passed by reference. | +| &Float:z | An float variable into which to store the Z coordinate, passed by reference. | + +## Examples + +```c +new PlayerText3D:playerTextId; +new Float:playerX, Float:playerY, Float:playerZ; + +GetPlayerPos(playerid, playerX, playerY, playerZ); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, playerX, playerY, playerZ, 40.0); + +new Float:x, Float:y, Float:z; +GetPlayer3DTextLabelPos(playerid, playerTextId, x, y, z); +``` + +## Related Functions + +- [Get3DTextLabelPos](Get3DTextLabelPos): Gets the 3D text label position. diff --git a/docs/scripting/functions/GetPlayer3DTextLabelText.md b/docs/scripting/functions/GetPlayer3DTextLabelText.md new file mode 100644 index 000000000..974fc46b3 --- /dev/null +++ b/docs/scripting/functions/GetPlayer3DTextLabelText.md @@ -0,0 +1,38 @@ +--- +title: GetPlayer3DTextLabelText +description: Gets the player's 3D text label text. +tags: ["player", "3dtextlabel"] +--- + + + +## Description + +Gets the player's 3D text label text. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| playerid | The ID of the player. | +| PlayerText3D:textid | The ID of the player's 3D text label to get the text of. | +| text[] | An array into which to store the text, passed by reference. | +| len | The length of the text that should be stored. | + +## Examples + +```c +new PlayerText3D:playerTextId; +new Float:X, Float:Y, Float:Z; +new text[16]; + +GetPlayerPos(playerid, X, Y, Z); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello World!", 0x008080FF, X, Y, Z, 40.0); + +GetPlayer3DTextLabelText(playerid, playerTextId, text, sizeof(text)); +// The `text` will be 'Hello World!' +``` + +## Related Functions + +- [CreatePlayer3DTextLabel](CreatePlayer3DTextLabel): Creates a 3D Text Label only for a specific player. +- [UpdatePlayer3DTextLabelText](UpdatePlayer3DTextLabelText): Updates a player 3D Text Label's text and colour. +- [Get3DTextLabelText](Get3DTextLabelText): Gets the 3D text label text. diff --git a/docs/scripting/functions/GetPlayer3DTextLabelVirtualW.md b/docs/scripting/functions/GetPlayer3DTextLabelVirtualW.md new file mode 100644 index 000000000..6bc9a4f47 --- /dev/null +++ b/docs/scripting/functions/GetPlayer3DTextLabelVirtualW.md @@ -0,0 +1,56 @@ +--- +title: GetPlayer3DTextLabelVirtualW +description: Gets the player's 3D text label virtual world id. +tags: ["player", "3dtextlabel"] +--- + +:::warning + +This function is deprecated. Please see [GetPlayer3DTextLabelVirtualWorld](GetPlayer3DTextLabelVirtualWorld). + +::: + +## Description + +Gets the player's 3D text label virtual world id. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| playerid | The ID of the player. | +| Text3D:textid | The ID of the player's 3D text label to get the virtual world id of. | + +## Returns + +Returns the virtual world id of the player's 3D text label. + +## Examples + +```c +new PlayerText3D:playerTextId; +new Float:X, Float:Y, Float:Z; +new worldid; + +GetPlayerPos(playerid, X, Y, Z); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0); + +worldid = GetPlayer3DTextLabelVirtualW(playerid, playerTextId); +``` + +## Notes + +:::warning + +There is no virtual world support for player 3D text labels. +This function just returns the player's virtual world! + +::: + +:::tip + +This function is just short name of [GetPlayer3DTextLabelVirtualWorld](GetPlayer3DTextLabelVirtualWorld). + +::: + +## Related Functions + +- [Get3DTextLabelVirtualWorld](Get3DTextLabelVirtualWorld): Gets the 3D text label virtual world id. diff --git a/docs/scripting/functions/GetPlayer3DTextLabelVirtualWorld.md b/docs/scripting/functions/GetPlayer3DTextLabelVirtualWorld.md new file mode 100644 index 000000000..73a185d12 --- /dev/null +++ b/docs/scripting/functions/GetPlayer3DTextLabelVirtualWorld.md @@ -0,0 +1,46 @@ +--- +title: GetPlayer3DTextLabelVirtualWorld +description: Gets the player's 3D text label virtual world id. +tags: ["player", "3dtextlabel"] +--- + + + +## Description + +Gets the player's 3D text label virtual world id. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| playerid | The ID of the player. | +| Text3D:textid | The ID of the player's 3D text label to get the virtual world id of. | + +## Returns + +Returns the virtual world id of the player's 3D text label. + +## Examples + +```c +new PlayerText3D:playerTextId; +new Float:X, Float:Y, Float:Z; +new worldid; + +GetPlayerPos(playerid, X, Y, Z); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0); + +worldid = GetPlayer3DTextLabelVirtualWorld(playerid, playerTextId); +``` + +## Notes + +:::warning + +There is no virtual world support for player 3D text labels. +This function just returns the player's virtual world! + +::: + +## Related Functions + +- [Get3DTextLabelVirtualWorld](Get3DTextLabelVirtualWorld): Gets the 3D text label virtual world id. diff --git a/docs/scripting/functions/Is3DTextLabelStreamedIn.md b/docs/scripting/functions/Is3DTextLabelStreamedIn.md new file mode 100644 index 000000000..20d497c0e --- /dev/null +++ b/docs/scripting/functions/Is3DTextLabelStreamedIn.md @@ -0,0 +1,45 @@ +--- +title: Is3DTextLabelStreamedIn +description: Checks if a 3D text label is streamed in for a player. +tags: ["3dtextlabel"] +--- + + + +## Description + +Checks if a 3D text label is streamed in for a player. + +| Name | Description | +| ----------- | --------------------- | +| playerid | The ID of the player. | +| Text3D:textid | The ID of the 3D text label. | + +## Returns + +This function returns true if the 3D text label is streamed in for the player, or false if it is not. + +## Examples + +```c +new Text3D:gMyLabel; + +public OnGameModeInit() +{ + gMyLabel = Create3DTextLabel(...); + return 1; +} + +public OnPlayerSpawn(playerid) +{ + if (Is3DTextLabelStreamedIn(playerid, gMyLabel)) + { + // Do something + } +} +``` + +## Related Functions + +- [Create3DTextLabel](Create3DTextLabel): Creates a 3D Text Label at a specific location in the world. +- [IsPlayerStreamedIn](IsPlayerStreamedIn): Checks if a player is streamed in for another player. diff --git a/docs/scripting/functions/IsValid3DTextLabel.md b/docs/scripting/functions/IsValid3DTextLabel.md new file mode 100644 index 000000000..ace0da4b9 --- /dev/null +++ b/docs/scripting/functions/IsValid3DTextLabel.md @@ -0,0 +1,42 @@ +--- +title: IsValid3DTextLabel +description: Checks if a 3D text label is valid. +tags: ["3dtextlabel"] +--- + + + +## Description + +Checks if a 3D text label is valid. + +| Name | Description | +| ----------- | --------------------- | +| Text3D:textid | The ID of the 3D text label to check. | + +## Returns + +This function returns true if the 3D text label is valid, or false if it is not. + +## Examples + +```c +new Text3D:gMyLabel; + +public OnGameModeInit() +{ + gMyLabel = Create3DTextLabel(...); + + if (IsValid3DTextLabel(gMyLabel)) + { + // Do something + } + + return 1; +} +``` + +## Related Functions + +- [Create3DTextLabel](Create3DTextLabel): Creates a 3D Text Label at a specific location in the world. +- [IsValidPlayer3DTextLabel](IsValidPlayer3DTextLabel): Checks if a player's 3D text label is valid. diff --git a/docs/scripting/functions/IsValidPlayer3DTextLabel.md b/docs/scripting/functions/IsValidPlayer3DTextLabel.md new file mode 100644 index 000000000..642682275 --- /dev/null +++ b/docs/scripting/functions/IsValidPlayer3DTextLabel.md @@ -0,0 +1,40 @@ +--- +title: IsValidPlayer3DTextLabel +description: Checks if a player's 3D text label is valid. +tags: ["player", "3dtextlabel"] +--- + + + +## Description + +Checks if a player's 3D text label is valid. + +| Name | Description | +| ----------- | --------------------- | +| playerid | The ID of the player. | +| PlayerText3D:textid | The ID of the player's 3D text label to check. | + +## Returns + +This function returns true if the player's 3D text label is valid, or false if it is not. + +## Examples + +```c +new PlayerText3D:playerTextId; +new Float:X, Float:Y, Float:Z; + +GetPlayerPos(playerid, X, Y, Z); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0); + +if (IsValidPlayer3DTextLabel(playerid, playerTextId)) +{ + // Do something +} +``` + +## Related Functions + +- [CreatePlayer3DTextLabel](CreatePlayer3DTextLabel): Creates a 3D Text Label only for a specific player. +- [IsValid3DTextLabel](IsValid3DTextLabel): Checks if a 3D text label is valid. diff --git a/docs/scripting/functions/Set3DTextLabelDrawDistance.md b/docs/scripting/functions/Set3DTextLabelDrawDistance.md new file mode 100644 index 000000000..df2a4d48c --- /dev/null +++ b/docs/scripting/functions/Set3DTextLabelDrawDistance.md @@ -0,0 +1,36 @@ +--- +title: Set3DTextLabelDrawDistance +description: Sets the 3D text label draw distance. +tags: ["3dtextlabel"] +--- + + + +## Description + +Sets the 3D text label draw distance. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| Text3D:textid | The ID of the 3D text label to set the draw distance. | +| Float:drawDistance | The distance from where you are able to see the 3D Text Label. | + +## Returns + +This function always returns true. + +## Examples + +```c +new Text3D:gMyLabel; + +gMyLabel = Create3DTextLabel("Hello World!", 0x008080FF, 30.0, 40.0, 50.0, 10.0, 0, false); + +Set3DTextLabelDrawDistance(gMyLabel, 20.0); +// The draw distance changed from 10.0 to 20.0 +``` + +## Related Functions + +- [Get3DTextLabelDrawDistance](Get3DTextLabelDrawDistance): Gets the 3D text label draw distance. +- [SetPlayer3DTextLabelDrawDistance](SetPlayer3DTextLabelDrawDistance): Sets the player 3D text label draw distance. diff --git a/docs/scripting/functions/Set3DTextLabelLOS.md b/docs/scripting/functions/Set3DTextLabelLOS.md new file mode 100644 index 000000000..2b7a221b7 --- /dev/null +++ b/docs/scripting/functions/Set3DTextLabelLOS.md @@ -0,0 +1,32 @@ +--- +title: Set3DTextLabelLOS +description: Sets the 3D text label line-of-sight. +tags: ["3dtextlabel"] +--- + + + +## Description + +Sets the 3D text label line-of-sight. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| Text3D:textid | The ID of the 3D text label to set the line-of-sight. | +| testLOS | false/true Test the line-of-sight so this text can't be seen through objects | + +## Examples + +```c +new Text3D:gMyLabel; + +gMyLabel = Create3DTextLabel("Hello World!", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0, true); + +Set3DTextLabelLOS(gMyLabel, false); +// The line-of-sight changed from 'true' to 'false' +``` + +## Related Functions + +- [Get3DTextLabelLOS](Get3DTextLabelLOS): Gets the 3D text label line-of-sight. +- [SetPlayer3DTextLabelLOS](SetPlayer3DTextLabelLOS): Sets the player 3D text label line-of-sight. diff --git a/docs/scripting/functions/Set3DTextLabelVirtualWorld.md b/docs/scripting/functions/Set3DTextLabelVirtualWorld.md new file mode 100644 index 000000000..453cb7b8b --- /dev/null +++ b/docs/scripting/functions/Set3DTextLabelVirtualWorld.md @@ -0,0 +1,32 @@ +--- +title: Set3DTextLabelVirtualWorld +description: Sets the 3D text label virtual world id. +tags: ["3dtextlabel"] +--- + + + +## Description + +Sets the 3D text label virtual world id. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| Text3D:textid | The ID of the 3D text label to set the virtual world id. | +| VirtualWorld | The virtual world in which you are able to see the 3D Text | + +## Examples + +```c +new Text3D:gMyLabel; + +gMyLabel = Create3DTextLabel("Hello World!", 0x008080FF, 30.0, 40.0, 50.0, 10.0, 20, false); + +Set3DTextLabelVirtualWorld(gMyLabel, 60); +// The virtual world id changed from '20' to '60' +``` + +## Related Functions + +- [Get3DTextLabelVirtualWorld](Get3DTextLabelVirtualWorld): Gets the 3D text label virtual world id. +- [SetPlayer3DTextLabelVirtualWorld](SetPlayer3DTextLabelVirtualWorld): Sets the player 3D text label virtual world id. diff --git a/docs/scripting/functions/SetPlayer3DTextLabelVirtualW.md b/docs/scripting/functions/SetPlayer3DTextLabelVirtualW.md new file mode 100644 index 000000000..e535c6fec --- /dev/null +++ b/docs/scripting/functions/SetPlayer3DTextLabelVirtualW.md @@ -0,0 +1,47 @@ +--- +title: SetPlayer3DTextLabelVirtualW +description: Sets the player's 3D text label virtual world id. +tags: ["player", "3dtextlabel"] +--- + +:::warning + +This function is deprecated. Please see [SetPlayer3DTextLabelVirtualWorld](SetPlayer3DTextLabelVirtualWorld). + +::: + +## Description + +Sets the player's 3D text label virtual world id. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| playerid | The ID of the player. | +| PlayerText3D:textid | The ID of the player's 3D text label to set the virtual world id. | +| VirtualWorld | The virtual world in which you are able to see the 3D Text | + +## Examples + +```c +new PlayerText3D:playerTextId; +new Float:X, Float:Y, Float:Z; + +GetPlayerPos(playerid, X, Y, Z); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0); + +SetPlayer3DTextLabelVirtualW(playerid, playerTextId, 60); +``` + +## Notes + +:::warning + +There is no virtual world support for player 3D text labels. +This function does nothing and is fundamentally broken! + +::: + +## Related Functions + +- [GetPlayer3DTextLabelVirtualWorld](GetPlayer3DTextLabelVirtualWorld): Gets the player's 3D text label virtual world id. +- [Set3DTextLabelVirtualWorld](Set3DTextLabelVirtualWorld): Sets the 3D text label virtual world id. diff --git a/docs/scripting/functions/SetPlayer3DTextLabelVirtualWorld.md b/docs/scripting/functions/SetPlayer3DTextLabelVirtualWorld.md new file mode 100644 index 000000000..ace85b0de --- /dev/null +++ b/docs/scripting/functions/SetPlayer3DTextLabelVirtualWorld.md @@ -0,0 +1,43 @@ +--- +title: SetPlayer3DTextLabelVirtualWorld +description: Sets the player's 3D text label virtual world id. +tags: ["player", "3dtextlabel"] +--- + + + +## Description + +Sets the player's 3D text label virtual world id. + +| Name | Description | +| --------- | ------------------------------------------------------------------------- | +| playerid | The ID of the player. | +| PlayerText3D:textid | The ID of the player's 3D text label to set the virtual world id. | +| VirtualWorld | The virtual world in which you are able to see the 3D Text | + +## Examples + +```c +new PlayerText3D:playerTextId; +new Float:X, Float:Y, Float:Z; + +GetPlayerPos(playerid, X, Y, Z); +playerTextId = CreatePlayer3DTextLabel(playerid, "Hello\nI'm at your position", 0x008080FF, X, Y, Z, 40.0); + +SetPlayer3DTextLabelVirtualWorld(playerid, playerTextId, 60); +``` + +## Notes + +:::warning + +There is no virtual world support for player 3D text labels. +This function does nothing and is fundamentally broken! + +::: + +## Related Functions + +- [GetPlayer3DTextLabelVirtualWorld](GetPlayer3DTextLabelVirtualWorld): Gets the player's 3D text label virtual world id. +- [Set3DTextLabelVirtualWorld](Set3DTextLabelVirtualWorld): Sets the 3D text label virtual world id. diff --git a/docs/scripting/functions/Update3DTextLabelText.md b/docs/scripting/functions/Update3DTextLabelText.md index f8159bbfd..f04a9f60d 100644 --- a/docs/scripting/functions/Update3DTextLabelText.md +++ b/docs/scripting/functions/Update3DTextLabelText.md @@ -44,6 +44,8 @@ If text[] is empty, the server/clients next to the text might crash! - [Create3DTextLabel](Create3DTextLabel): Create a 3D text label. - [Delete3DTextLabel](Delete3DTextLabel): Delete a 3D text label. +- [Get3DTextLabelText](Get3DTextLabelText): Gets the 3D text label text. +- [Get3DTextLabelColour](Get3DTextLabelColour): Gets the 3D text label colour. - [Attach3DTextLabelToPlayer](Attach3DTextLabelToPlayer): Attach a 3D text label to a player. - [Attach3DTextLabelToVehicle](Attach3DTextLabelToVehicle): Attach a 3D text label to a vehicle. - [CreatePlayer3DTextLabel](CreatePlayer3DTextLabel): Create A 3D text label for one player. diff --git a/docs/scripting/functions/UpdatePlayer3DTextLabelText.md b/docs/scripting/functions/UpdatePlayer3DTextLabelText.md index 5567a6e9e..41516aa6d 100644 --- a/docs/scripting/functions/UpdatePlayer3DTextLabelText.md +++ b/docs/scripting/functions/UpdatePlayer3DTextLabelText.md @@ -31,10 +31,8 @@ If text[] is empty, the server/clients next to the text might crash! ## Related Functions -- [Create3DTextLabel](Create3DTextLabel): Create a 3D text label. -- [Delete3DTextLabel](Delete3DTextLabel): Delete a 3D text label. -- [Attach3DTextLabelToPlayer](Attach3DTextLabelToPlayer): Attach a 3D text label to a player. -- [Attach3DTextLabelToVehicle](Attach3DTextLabelToVehicle): Attach a 3D text label to a vehicle. -- [Update3DTextLabelText](Update3DTextLabelText): Change the text of a 3D text label. - [CreatePlayer3DTextLabel](CreatePlayer3DTextLabel): Create A 3D text label for one player. - [DeletePlayer3DTextLabel](DeletePlayer3DTextLabel): Delete a player's 3D text label. +- [GetPlayer3DTextLabelText](GetPlayer3DTextLabelText): Gets the player's 3D text label text. +- [GetPlayer3DTextLabelColour](GetPlayer3DTextLabelColour): Gets the player's 3D text label colour. +- [Update3DTextLabelText](Update3DTextLabelText): Change the text of a 3D text label.