TextDrawSetSelectable
Description:
Function TextDrawSetSelectable sets whether a textdraw can be selected (clicked on) or not
Function TextDrawSetSelectable was added in 0.3e and will not work in earlier versions! |
TextDrawSetSelectable must be used BEFORE the textdraw is shown to players for it to be selectable. |
Use TextDrawTextSize to define the clickable area. |
Parameters:
(Text:text, set)
int | text | The ID of the textdraw to make selectable. |
bool | set | 1 to make it selectable, or 0 to make it not selectable. |
Return Values:
This function does not return any specific values.
Examples:
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 well, as they are related to this callback in one way or another.
- OnPlayerClickTextDraw: Called when a player clicks on a textdraw.