Derpie doesn't understand Clickable Textdraws, frustrating!
#1

Ohello!

Alright.. so.. As I decided to take a first look at clickable textdraws, I found my first issue. I knew I had to use "TextDrawTextSize", however, that whole part is frustrating me like crazy! I'm spending time on one line since 12:00 PM (It's 7:50 PM now, spent 7 hours.). I decided to ask some help from the people who know more about this than me.

Alright, so I made a simple, small box. I want to make it clickable.
I'm talking about this box:
pawn Код:
Timerdraw[0] = CreatePlayerTextDraw(playerid, 55.666656, 91.099945, "box");
    PlayerTextDrawLetterSize(playerid, Timerdraw[0], 0.000000, 2.433331);
    PlayerTextDrawTextSize(playerid, Timerdraw[0], 17.666648, 24.888879);
    PlayerTextDrawAlignment(playerid, Timerdraw[0], 1);
    PlayerTextDrawColor(playerid, Timerdraw[0], 0);
    PlayerTextDrawUseBox(playerid, Timerdraw[0], true);
    PlayerTextDrawBoxColor(playerid, Timerdraw[0], 102);
    PlayerTextDrawSetShadow(playerid, Timerdraw[0], 0);
    PlayerTextDrawSetOutline(playerid, Timerdraw[0], 0);
    PlayerTextDrawFont(playerid, Timerdraw[0], 0);
    PlayerTextDrawSetSelectable(playerid, Timerdraw[0], true);
The TextdrawTextSize I am using now, is the first time the box actually doesn't changes it's size. HOWEVER.. I can click on the whole freaking screen and then my server tells me "Hai".
pawn Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(playertextid == Timerdraw[5])
    {
        SendClientMessageToAll(0xFFFFFFAA, "Hai");
    }
    return 1;
}
I'd like to ask if there is someone who could help me to get the right size, and explain me how it works? I know the first size parameter is X, the second is Y. I know X is horizontal, Y is vertical.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)