Textdraw help +rep
#1

Hello

I have made system that if player accidentally press escape when selectable textdraw is open, call back will make him again selectable.

But problem is that textdraws doesn't getting cancel select.


pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(_:clickedid != INVALID_TEXT_DRAW)
    {
        if(clickedid == Landmine)
        {
             SendClientMessage(playerid, -1,"test ok");
        }
        CancelSelectTextDraw(playerid);
    }
    else
    {
        SelectTextDraw(playerid,COLOR_SKYBLUE);
    }
    return 1;
}
Reply
#2

Try this

pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(_:clickedid != INVALID_TEXT_DRAW)
    {
        if(clickedid == Landmine)
        {
             SendClientMessage(playerid, -1,"test ok");
             CancelSelectTextDraw(playerid);
        }
    }
    else
    {
        SelectTextDraw(playerid,COLOR_SKYBLUE);
    }
    return 1;
}
Reply
#3

Not working
Reply
#4

pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(_:clickedid != INVALID_TEXT_DRAW)
    {
        if(clickedid == Landmine)
        {
             SendClientMessage(playerid, -1,"test ok");
        }
        CancelSelectTextDraw(playerid);
        TextDrawHideForPlayer(playerid, Landmine);
    }
    return 1;
}
You don't place this SelectTextDraw(playerid,COLOR_SKYBLUE); in OnPlayerClickTextDraw, you place it where you show the player the textdraw like:

pawn Код:
CMD:landmine(playerid, params[])
{
    TextDrawShowForPlayer(playerid, Landmine);
    SelectTextDraw(playerid, COLOR_SKYEBLUE);
    return 1;
}
Reply
#5

No No i have added that SelectTextDraw(playerid, COLOR_SKYEBLUE); cuz of key escape.

i mean if player accidentally press escape.
Reply
#6

You're not making any sense right now, what key escape?
Reply
#7

Quote:
Originally Posted by Turn
Посмотреть сообщение
You're not making any sense right now, what key escape?
man key 'ESC'. a escape key. if press escape key textdraws will get cancelselect so i wanted to stop that in my this new codes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)