Clickable TextDraw help!
#4

Forget what I said before. Here:
pawn Code:
Textdraw5 = TextDrawCreate(230.000000, 233.000000, "OK");
    TextDrawBackgroundColor(Textdraw5, 255);
    TextDrawFont(Textdraw5, 1);
    TextDrawLetterSize(Textdraw5, 0.500000, 1.000000);
    TextDrawColor(Textdraw5, -1);
    TextDrawSetOutline(Textdraw5, 1);
    TextDrawSetProportional(Textdraw5, 1);
    TextDrawUseBox(Textdraw5, 1);
    TextDrawBoxColor(Textdraw5, 255);
    TextDrawTextSize(Textdraw5, 389.000000, 0.000000);
    TextDrawSetSelectable(Textdraw5, true); // Add this here
pawn Code:
CMD:credits(playerid,params[])
{
    TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw2);
    TextDrawShowForPlayer(playerid, Textdraw3);
    TextDrawShowForPlayer(playerid, Textdraw4);
    TextDrawShowForPlayer(playerid, Textdraw5);
    SelectTextDraw(Textdraw5, 0xFFFFFFFF);  // Change the 0xFFFFFFFF wit any color you want.
    return 1;
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == Textdraw5)
    {
        TextDrawHideForPlayer(playerid, Textdraw0);
        TextDrawHideForPlayer(playerid, Textdraw1);
        TextDrawHideForPlayer(playerid, Textdraw2);
        TextDrawHideForPlayer(playerid, Textdraw3);
        TextDrawHideForPlayer(playerid, Textdraw4);
        TextDrawHideForPlayer(playerid, Textdraw5);
        CancelSelectTextDraw(playerid);
    }
    return 1;
}
Reply


Messages In This Thread
Clickable TextDraw help! - by Tuntun - 09.09.2013, 15:27
Re: Clickable TextDraw help! - by Dragonsaurus - 09.09.2013, 15:55
Re: Clickable TextDraw help! - by Tuntun - 09.09.2013, 16:25
Re: Clickable TextDraw help! - by Dragonsaurus - 09.09.2013, 16:28
Re: Clickable TextDraw help! - by Tuntun - 09.09.2013, 16:45
Re: Clickable TextDraw help! - by Dragonsaurus - 09.09.2013, 16:50
Re: Clickable TextDraw help! - by Tuntun - 09.09.2013, 16:54
Re: Clickable TextDraw help! - by Tuntun - 09.09.2013, 17:18
Re: Clickable TextDraw help! - by Dragonsaurus - 09.09.2013, 17:33
Re: Clickable TextDraw help! - by Tuntun - 09.09.2013, 17:34

Forum Jump:


Users browsing this thread: 1 Guest(s)