11.02.2014, 08:28
Quote:
pawn Код:
|
pawn Код:
//Arriba de todo, abajo de los includes
new bool:IsPlayerSelectingTextDraw[MAX_PLAYERS char], TextDrawSelectColor[MAX_PLAYERS];
stock SelectTextDrawEx(playerid, color)
{
IsPlayerSelectingTextDraw{playerid} = true;
TextDrawSelectColor[playerid] = color;
SelectTextDraw(playerid, color);
}
stock OriginalSelectTextDraw(playerid, color) return SelectTextDraw(playerid, color);
#define SelectTextDraw SelectTextDrawEx
stock CancelSelectTextDrawEx(playerid)
{
IsPlayerSelectingTextDraw{playerid} = false;
TextDrawSelectColor[playerid] = 0;
CancelSelectTextDraw(playerid);
}
#define CancelSelectTextDraw CancelSelectTextDrawEx
//Callback
public OnPlayerClickTextDraw(playerid, Text:clickedid){
if(_:clickedid == INVALID_TEXT_DRAW && IsPlayerSelectingTextDraw{playerid}) {
OriginalSelectTextDraw(playerid, TextDrawSelectColor[playerid]);
return 1;
}
//Todo el resto de la callback
return 1;
}