03.07.2012, 16:49
You mean it was disappearing after some time automatically, but now doesn't work?
Maybe you had in your script an else that was hiding the TextDraw (where you are checking the positions) and you deleted it.
pawn Код:
new HideTimer[MAX_PLAYERS];
stock InfoBoxForPlayer(playerid, text[])
{
TextDrawHideForPlayer(playerid, InfoBox[playerid]);
new string[800];
format(string, sizeof(string), "%s", text);
TextDrawSetString(InfoBox[playerid], string);
TextDrawShowForPlayer(playerid, InfoBox[playerid]); //You can't hide it with this function because you show it again here.
KillTimer(HideTimer[playerid]);
HideTimer[playerid] = SetTimerEx("HideNow",8000,false,"i",playerid);
}
forward HideNow(playerid);
public HideNow(playerid) { TextDrawHideForPlayer(playerid, InfoBox[playerid]); return 1; }