Set3DTextColor
Jump to navigation
Jump to search
set3DTextColor
Changes the RGBA color of a replicated world-space text label.
Syntax
bool set3DTextColor(string textId, int red, int green, int blue [, int alpha = 255])
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
textId |
string |
yes | The opaque identifier returned by create3DText. |
red |
int |
yes | Red channel from 0 to 255. |
green |
int |
yes | Green channel from 0 to 255. |
blue |
int |
yes | Blue channel from 0 to 255. |
alpha |
int |
no | Alpha channel from 0 to 255; defaults to 255. |
Returns
Returns true when the label is owned by the current resource and the update is accepted; otherwise returns false.
Examples
Turn a label red while an area is unavailable:
set3DTextColor(areaLabel, 220, 70, 60, 255)
Notes
- Available only in server-side resource scripts.
- All color channels must be whole numbers in the accepted range.