SA-MP Forums Archive
Issue with OnPlayerClickTextDraw: - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Issue with OnPlayerClickTextDraw: (/showthread.php?tid=527463)



Issue with OnPlayerClickTextDraw: - Twizted - 22.07.2014

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.


Re: Issue with OnPlayerClickTextDraw: - Twizted - 22.07.2014

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