OnPlayerClickTextDraw messes up
#1

Hello, I have a problem when I try to create more than one selectable textdraw.

Nothing happen at all, when I hold the mouse over the other textdraw(it should turn into orange when hovering)

You cant see the mouse, since I took the screenshot with SA-MP.

http://i712.photobucket.com/albums/w...eykings/ss.png

Anyway, here is my code:

Код:
new Text:gTextDraw;
new Text:gTextDraw1;



public OnGameModeInit()
{
    gTextDraw = TextDrawCreate(10.000000, 141.000000, "Help");
    TextDrawTextSize(gTextDraw,60.000000, 20.000000);
    TextDrawAlignment(gTextDraw,0);
    TextDrawBackgroundColor(gTextDraw,0x000000ff);
    TextDrawFont(gTextDraw,1);
    TextDrawLetterSize(gTextDraw,0.250000, 1.000000);
    TextDrawColor(gTextDraw,0xffffffff);
    TextDrawSetProportional(gTextDraw,1);
    TextDrawSetShadow(gTextDraw,1);
    TextDrawSetSelectable(gTextDraw, 1);
    
    gTextDraw1 = TextDrawCreate(162.000000, 433.000000, "Stats");
    TextDrawTextSize(gTextDraw1,60.000000, 20.000000);
    TextDrawAlignment(gTextDraw1,0);
    TextDrawBackgroundColor(gTextDraw1,0x000000ff);
    TextDrawFont(gTextDraw1,1);
    TextDrawLetterSize(gTextDraw1,0.250000, 1.000000);
    TextDrawColor(gTextDraw1,0xffffffff);
    TextDrawSetProportional(gTextDraw1,1);
    TextDrawSetShadow(gTextDraw1,1);
    TextDrawSetSelectable(gTextDraw1, 1);
    return 1;
}



public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == gTextDraw)
    {
         ShowMenu(playerid, 54);
         CancelSelectTextDraw(playerid);
    }
    if(clickedid == gTextDraw1)
    {
         ShowStats(playerid,playerid);
         CancelSelectTextDraw(playerid);
    }
	return 1;
}


// My command:

if(!strcmp(cmdtext, "/td", true)) // Daniel
    {
        SelectTextDraw(playerid, 0xFF9900AA); 
        SendClientMessage(playerid, COLOR_SERVER, "SERVER: Please select a textdraw!");
        return 1;
	}
Thanks in advance!
Reply
#2

No one?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)