SA-MP Forums Archive
CancelSelectTextDraw - 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: CancelSelectTextDraw (/showthread.php?tid=333529)



CancelSelectTextDraw - Hanger - 11.04.2012

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)
{

}



Re: CancelSelectTextDraw - Hiddos - 12.04.2012

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


Re: CancelSelectTextDraw - Hanger - 12.04.2012

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

Quote:

Returns This function doesn't return a specific value




Re: CancelSelectTextDraw - Ash. - 12.04.2012

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