TextDrawSetSelectable

From SA-MP Wiki

Jump to: navigation, search


Sets the text draw to be selectable 1 or not 0


TextDrawSetSelectable was added in SA-MP 0.3x This function was added in SA-MP 0.3e and will not work in earlier versions!


Parameters:
(Text:text, set)
textThe textdraw id that should be made selectable.
setSet the textdraw selectable (1) or non-selectable (0). By default this is 0.


ReturnsThis function doesn't return a specific value


Image:32px-Circle-style-warning.png Important Note: TextDrawSetSelectable MUST be used BEFORE the textdraw is shown to players.


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/make all selectable", 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


Related Callbacks

The following callbacks might be useful, as they're related to this function in one way or another.

Personal tools