Set3DTextPosition: Difference between revisions
Jump to navigation
Jump to search
Synchronize Lua API documentation |
Complete Lua function catalog |
||
| Line 37: | Line 37: | ||
* Coordinates use metres and are replicated reliably after validation. | * Coordinates use metres and are replicated reliably after validation. | ||
[[Category:Lua Functions]] | |||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:World Functions]] | [[Category:World Functions]] | ||
[[Category:Spatial Functions]] | [[Category:Spatial Functions]] | ||
Latest revision as of 09:54, 15 August 2026
set3DTextPosition
Moves a replicated world-space text label owned by the current resource.
Syntax
bool set3DTextPosition(string textId, number x, number y, number z)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
textId |
string |
yes | The opaque identifier returned by create3DText. |
x |
number |
yes | New world X coordinate in metres. |
y |
number |
yes | New world Y coordinate in metres. |
z |
number |
yes | New world Z coordinate in metres. |
Returns
Returns true when the label is owned by the current resource and the update is accepted; otherwise returns false.
Examples
Place a label above a player's current position:
local position = getPlayerPosition(playerId)
if position then
set3DTextPosition(labelId, position.x, position.y, position.z + 2.0)
end
Notes
- Available only in server-side resource scripts.
- Coordinates use metres and are replicated reliably after validation.