Box not hide automatically
#1

Box not hide automatically

Code:
stock ShadInfoBoxForPlayer(playerid, text[])
{
    TextDrawHideForPlayer(playerid, ShadInfoBox);
	new info[700];
    ShadInfoBoxShowing[playerid] = 1;
    format(info, sizeof(info), "%s~n~", text);
    TextDrawSetString(ShadInfoBox, info);
	TextDrawShowForPlayer(playerid, ShadInfoBox);
	printf("(%d) Has Just the Shown",playerid);
	InfoTimer = SetTimer("InfoBoxTimer", 5000, false);
}

forward InfoBoxTimer(playerid);
public InfoBoxTimer(playerid)
{
	if(ShadInfoBoxShowing[playerid] == 1)
	{
		TextDrawHideForPlayer(playerid, ShadInfoBox);
		TextDrawDestroy(ShadInfoBox);
		KillTimer(InfoTimer);
		printf("(%d) Has Just Deleted the Shadow Info Box From his Screen",playerid);
		return 1;
	}
    return 1;
}
Reply
#2

Use https://sampwiki.blast.hk/wiki/SetTimerEx
pawn Code:
InfoTimer = SetTimerEx("InfoBoxTimer", 5000, false, "i", playerid);
Reply
#3

It works, thanks
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)