CancelSelectTextDraw
#1

When applied whilst player menu is shown, it will return INVALID_TEXT_DRAW in OnPlayerSelectTextDraw

pawn Код:
if(clickedid == Text:VehBuyMenu[6]) /* Back to vehicle model list */
{
    if(shopping{playerid} == true)
    {
        ShowMenuForPlayer(CarList, playerid);
        HideVehBuyText(playerid); // Contains HideTextDraw and CancelSelectTextDraw, nothing more
    }
    return 0;
}
Fix if using INVALID_TEXT_DRAW to check something:
pawn Код:
if(cilckedid == Text:INVALID_TEXT_DRAW && GetPlayerMenu(playerid) == Menu:INVALID_MENU)
{

}
Reply
#2

I don't really get this, but CancelSelectTextDraw always calls OnPlayerSelectTextDraw with textid 65535 (INVALID_TEXT_DRAW) if that's what you're trying to tell us
Reply
#3

Then I suppose
https://sampwiki.blast.hk/wiki/CancelSelectTextDraw
should be edited.

Quote:

Returns This function doesn't return a specific value

Reply
#4

Quote:
Originally Posted by Hanger
Посмотреть сообщение
Why? It's not returning anything specific. It's just calling a callback (OnPlayerSelectTextDraw) with INVALID_TEXT_DRAW (65535)!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)