note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
TextDrawSetSelectable
Description
Sets whether a textdraw can be selected (clicked on) or not
Name | Description |
---|---|
Text:textid | The 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
tip
Use TextDrawTextSize to define the clickable area.
warning
TextDrawSetSelectable must be used BEFORE the textdraw is shown to players for it to be selectable.
Related Functions
- TextDrawIsSelectable: Checks if a textdraw is selectable.
- SelectTextDraw: Enables the mouse, so the player can select a textdraw
- CancelSelectTextDraw: Cancel textdraw selection with the mouse
Related Callbacks
- OnPlayerClickTextDraw: Called when a player clicks on a textdraw.