AddTextComponentSubstringPlayerName
DocsAddTextComponentSubstringPlayerName(text)Description
Adds an arbitrary string as a text component placeholder, replacing ~a~ in the current text command's text label.
See the documentation on text formatting for more information.
Parameters
| Name | Type | Description |
|---|---|---|
text | char* | A string to add of up to 99 characters. This can contain additional `~` formatting directives. |
Returns
voidThis native does not return a value.
Examples
Official
-- on initialization
AddTextEntry('TEST_LABEL', 'Label: ~a~')
-- when drawing
BeginTextCommandDisplayText('TEST_LABEL')
AddTextComponentSubstringPlayerName('Hello, World!')
EndTextCommandDisplayText(0.5, 0.5)