Textdraw not showing..
#1

-- DELETED --
Reply
#2

The problem is that there's no timer for the textdraws to disappear. So it has to be done manually;

Use
Код:
TextDrawDestroy(//nameoftextdraw)
// or if it's a per player textdraw
PlayerTextDrawDestroy(//nameoftextdraw)
After you've destroyed the first text draw you can then create another one.

It is recommended that you use a timer to destroy text draws at a certain time, unless you want it to be done manually.
Reply
#3

Quote:
Originally Posted by Triggerz
Посмотреть сообщение
The problem is that there's no timer for the textdraws to disappear. So it has to be done manually;

Use
Код:
TextDrawDestroy(//nameoftextdraw)
// or if it's a per player textdraw
PlayerTextDrawDestroy(//nameoftextdraw)
After you've destroyed the first text draw you can then create another one.

It is recommended that you use a timer to destroy text draws at a certain time, unless you want it to be done manually.
This is my timer:

Код:
	new Get[6];
    gettime(Get[3],Get[4],Get[5]);
    getdate(Get[0],Get[1],Get[2]);

    printf("clock");

	for(new i; i < MAX_PLAYERS; i++)
	{
		TextDrawDestroy(DateHUD);
		format(szMessage, sizeof(szMessage) , "%02d.%02d.%02d" , Get[ 2 ] , Get[ 1 ] , Get[ 0 ] );
		TextDrawSetString(DateHUD, szMessage);
		TextDrawShowForPlayer(i, DateHUD);

		TextDrawDestroy(TimeHUD);
		format(szMessage, sizeof(szMessage), "%02d:%02d", Get[3],Get[4]);
		TextDrawSetString(TimeHUD, szMessage);
		TextDrawShowForPlayer(i, TimeHUD);
	}
The timer works, as I get every second the message "clock" in the console.
But the TD is still not showing.
Reply
#4

Problem is ... The textdraw you created is global... And you're trying to use it as player textdraw.
Reply
#5

Quote:
Originally Posted by iLearner
Посмотреть сообщение
Problem is ... The textdraw you created is global... And you're trying to use it as player textdraw.
And how do I have to create it then?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)