TextDrawSetSelectable
From SA-MP Wiki
Description:
Sets whether a textdraw can be selected (clicked on) or not
(Text:text, set)
text | The ID of the textdraw to make selectable. |
set | 1 to make it selectable, or 0 to make it not selectable. |
Return Values:
This function does not return any specific values.
Important | TextDrawSetSelectable must be used BEFORE the textdraw is shown to players for it to be selectable. |
Tip | Use TextDrawTextSize to define the clickable area. |
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/selectd", true)) { for(new i = 0; i < MAX_TEXT_DRAWS; i++) TextDrawSetSelectable(Text:i, 1); SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: All textdraws can be selected now!"); return 1; } return 0; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- SelectTextDraw: Enables the mouse, so the player can select a textdraw
- CancelSelectTextDraw: Cancel textdraw selection with the mouse
Related Callbacks
The following callbacks might be useful, as they're related to this function in one way or another.
- OnPlayerClickTextDraw: Called when a player clicks on a textdraw.