Set3DTextPosition

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

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.