SelectTextDraw

From SA-MP Wiki

(Redirected from SelectTextdraw)
Jump to: navigation, search


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


Description:

Display the cursor and allow the player to select a textdraw


Image:32px-Ambox_warning_orange.png

Note

TextDrawSetSelectable or PlayerTextDrawSetSelectable MUST be used first, to allow a textdraw to be selectable.


Parameters:
(playerid, hovercolor)
playeridThe ID of the player that should be able to select a textdraw
hovercolorThe color of the textdraw when hovering over with mouse (RGBA)


Return Values:

This function does not return any specific values.


Image:32px-Ambox_warning_orange.png

Note

It is the TEXT which will be highlighted when hovered over, NOT the box (if one is shown).


Example Usage:

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/tdselect", true))
    {
        SelectTextDraw(playerid, 0x00FF00FF); // Highlight green when hovering over
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Please select a textdraw!");
        return 1;
    }
    return 0;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.


Related Callbacks

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

Personal tools
Navigation
Toolbox