TextDraw timer
#1

Hey guys,
I've made a textdraw but it do shows the nessage but never disappeares ..
Reply
#2

Then use the TextDrawDestroy function to remove it.
Reply
#3

I want it to be shown for at least 5 seconds..not just to immediately close it
Reply
#4

Anyone?
Reply
#5

Could you provide more details about the textdraw? When does it appear?
Reply
#6

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	#pragma unused TimeM
	#pragma unused TimeS
	#pragma unused Time
	SendClientMessage(playerid, COLOR_YELLOW, "GREAT,You are now on death list");
	deathText[playerid] = CreatePlayerTextDraw(playerid, 320.0, 240.0, "HA Ha, You got OWNED :D");
	PlayerTextDrawShow(playerid, deathText[playerid]);
	Time = SetTimer("UpdateTime", 1000, true);
    SendDeathMessage(killerid, playerid, reason);
    return 1;
}
Reply
#7

Anyone?
Reply
#8

Код:
forward TimeTextForPlayer(playerid, Text:text, time);

public TimeTextForPlayer(playerid, Text:text, time)
{
    TextDrawShowForPlayer(playerid, text);
    SetTimerEx("DestroyTextTimerForPlayer", time, 0, "di", playerid, _:text);
}

public DestroyTextTimerForPlayer(playerid, Text:text)
{
	TextDrawHideForPlayer(playerid, text);
}


Example:
TimeTextForPlayer(playerid, MY_TEXTDRAW, 3000); //3000 ms = 3 seconds
Reply
#9

Can't udnerstand
Reply
#10

Quote:
Originally Posted by Trollerz
Посмотреть сообщение
Can't udnerstand
What don't you understand?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)