CancelSelectTextDraw(playerid);
#1

Hi,

This callback OnPlayerClickTextDraw is called when i use this function?

CancelSelectTextDraw(playerid);
Reply
#2

Not, this callback is called when you click on selectable textdraw i gonna make an example:

pawn Code:
public OnGameModeInit()
{
TextBotton1 = TextDrawCreate(40.000000, 220.500030, "Bad Reputation");
    TextDrawLetterSize(TextBotton1, 0.449999, 1.600000);
    TextDrawAlignment(TextBotton1, 1);
    TextDrawColor(TextBotton1, -1);
    TextDrawSetShadow(TextBotton1, 0);
    TextDrawSetOutline(TextBotton1, 1);
    TextDrawBackgroundColor(TextBotton1, 51);
    TextDrawFont(TextBotton1, 3);
    TextDrawSetProportional(TextBotton1, 1);
    TextDrawSetSelectable(TextBotton1, true);
}

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == TextBotton1)
    {
        new skill[34];
        format(skill,sizeof(skill),"BReputation");
        pinfo[playerid][classe] = skill;
        GivePlayerWeapon(playerid,24,137);
        TextDrawHideForPlayer(playerid,Textbox);
        TextDrawHideForPlayer(playerid,Intestatext);
        TextDrawHideForPlayer(playerid,TextBotton1);
        TextDrawHideForPlayer(playerid,TextBotton2);
        TextDrawHideForPlayer(playerid,TextBotton3);
        TextDrawHideForPlayer(playerid,TextBotton4);
        TextDrawHideForPlayer(playerid,TextBotton5);
        TextDrawHideForPlayer(playerid,TextBotton6);
        TextDrawHideForPlayer(playerid,TextBotton7);
        TextDrawHideForPlayer(playerid,TextBotton8);
        TextDrawHideForPlayer(playerid,TextBotton9);
        CancelSelectTextDraw(playerid);
        classescelta[playerid] = 1;
    }
        return 1;
}
i hope this can help you
Enjoy.
Reply
#3

But i head, when this function is called, then clickedid is INVALID_3D_TEXT or no?
Reply
#4

Why not make a simple script, add a print below the callback and test it out for yourself? Would definitely save you the time you would otherwise need to bump this thread again.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)