Need help with clickable textdraws..
#1

So cursor doesn't shows up and I cant click textdraw.......

Code:

pawn Код:
Textdraw9 = TextDrawCreate(91.000000, 237.000000, "1");
    TextDrawBackgroundColor(Textdraw9, 255);
    TextDrawFont(Textdraw9, 1);
    TextDrawLetterSize(Textdraw9, 0.280000, 1.200000);
    TextDrawColor(Textdraw9, -1);
    TextDrawSetOutline(Textdraw9, 0);
    TextDrawSetProportional(Textdraw9, 1);
    TextDrawSetShadow(Textdraw9, 1);
        TextDrawSetSelectable(Textdraw9, 1);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SUBMISSION)
    {
        TextDrawShowForPlayer(playerid, Textdraw9);
        SelectTextDraw(playerid, 0xFF4040AA);
    }
    return 1;
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == Textdraw9)
    {
         SendClientMessage(playerid, 0xFFFFFFAA, "You clicked on a textdraw.");
         CancelSelectTextDraw(playerid);
    }
    return 1;
}
Reply
#2

I noticed that for some small textdraws, even on clicking, this callback doesn't get called, try making the textdraw bigger ("1" to "1512612612612") and then click and see if the expect result is achieved. That way you can narrow the problem down.
Reply
#3

You see I cant click it... at all.. Cursor isn't showing up... It's like in normal game without a cursor..
Reply
#4

check the newkeys like:
pawn Код:
if( newkeys & KEY_SUBMISSION)
Reply
#5

TextDrawTextSize() your missing this defines the size of a clickable area.
Reply
#6

Still cant klick.. You see the mouse cursor is not appiering.. Still... Yeah I thought about that too.. Now I will see if it will work.. But just intresting is that the mouse cursor ain't appiering...

OOkay.. this is interesting.. now when I press fire it appiers it's ok I put textdraws clickable region on

TextDrawTextSize(Textdraw9,60.000000, 20.000000);

Still it cant be clicked!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)