Ugrás a fő tartalomhoz

TextDrawSetSelectable

Description

Sets whether a textdraw can be selected (clicked on) or not

NameDescription
Text:textidThe ID of the textdraw to make selectable.
bool:selectable'true' to make it selectable, or 'false' to make it not selectable.

Returns

This function does not return any specific values.

Examples

new Text:gMyTextdraw;

public OnGameModeInit()
{
gMyTextdraw = TextDrawCreate(100.0, 33.0, "Example TextDraw");
TextDrawTextSize(gMyTextdraw, 30.0, 10.0);
TextDrawSetSelectable(gMyTextdraw, true);
return 1;
}

Notes

tanács

Use TextDrawTextSize to define the clickable area.

vigyázat

TextDrawSetSelectable must be used BEFORE the textdraw is shown to players for it to be selectable.