17.12.2013, 21:52
Ye well that doesn't change a thing, now take a look at my code, and let me explain what is going on.
Now at some command this code is runned:
Now inside ClosePlayerList there has been used a CancelSelectTextDraw call.
Inside ShowPlayerOptions the variable: pList[playerid][OPTION_TYPE] has been set on true
When CancelSelectTextDraw gets called in ClosePlayerList, this OPTION_TYPE variable is already set on true in ShowPlayerOptions., which makes my ShowPlayerOptions textdraws directly get destroyed because of CancelSelectTextDraw .
And I can't remove CancelSelectTextDraw from ClosePlayerList, because ClosePlayerList is used on alot of different locations in my script.
pawn Код:
public OnPlayerClickTextDraw(playerid,Text:clickedid)
{
if(_:clickedid == INVALID_TEXT_DRAW)
{
if(pList[playerid][LIST_TYPE] != FALSE) ClosePlayerList(playerid);
if(pList[playerid][OPTION_TYPE] != FALSE) ClosePlayerOptions(playerid);
}
return 1;
}
pawn Код:
ClosePlayerList(playerid);
ShowPlayerOptions(playerid,OPTION_FURNITURE);
Inside ShowPlayerOptions the variable: pList[playerid][OPTION_TYPE] has been set on true
When CancelSelectTextDraw gets called in ClosePlayerList, this OPTION_TYPE variable is already set on true in ShowPlayerOptions., which makes my ShowPlayerOptions textdraws directly get destroyed because of CancelSelectTextDraw .
And I can't remove CancelSelectTextDraw from ClosePlayerList, because ClosePlayerList is used on alot of different locations in my script.