Issue with OnPlayerClickTextDraw:
#1

This is my chunk of code:

pawn Код:
new PlayerText:Textdraw2[MAX_PLAYERS];

        Textdraw2[playerid] = CreatePlayerTextDraw(playerid, 553.000000, 149.333282, "AGE");
        PlayerTextDrawLetterSize(playerid, Textdraw2[playerid], 0.790498, 1.649999);
        PlayerTextDrawAlignment(playerid, Textdraw2[playerid], 2);
        PlayerTextDrawColor(playerid, Textdraw2[playerid], -1);
        PlayerTextDrawSetShadow(playerid, Textdraw2[playerid], 0);
        PlayerTextDrawSetOutline(playerid, Textdraw2[playerid], 1);
        PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid], 51);
        PlayerTextDrawFont(playerid, Textdraw2[playerid], 3);
        PlayerTextDrawSetProportional(playerid, Textdraw2[playerid], 1);
        PlayerTextDrawSetSelectable(playerid, Textdraw2[playerid], true);

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == Textdraw2[playerid])
    {
        print("Age textdraw works");
    }
    return 1;
}
When I compile, I get an error on clickedid == Textdraw2[playerid], the error stating warning 213: tag mismatch. I've tried to make it clickedid == PlayerText:Textdraw2[playerid], but I do get the same error. What am I supposed to do? If it helps, I used iPLEOMAX's textdraw editor to do this.
Reply
#2

I created player textdraws instead of global textdraws, that was the issue.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)