TextDraw Overlap/Bunk
#1

Hi, I have a problem with a TextDraw sometimes not always when changing or time overlaps minutes old time instead set properly. Excuse my bad English.
http://postimg.org/image/r3q3pn2tx/

http://postimg.org/image/yc4cipqol/ - Normal
http://postimg.org/image/gyfeiusw9/ - Overlap



Код:
	//Data		
		txtDateDisp[playerid] = TextDrawCreate(546.296203, 9.333327, "  ");
TextDrawLetterSize(txtDateDisp[playerid], 0.338023, 1.564998);
TextDrawAlignment(txtDateDisp[playerid], 1);
TextDrawColor(txtDateDisp[playerid], -1);
TextDrawSetShadow(txtDateDisp[playerid], 0);
TextDrawSetOutline(txtDateDisp[playerid], 1);
TextDrawBackgroundColor(txtDateDisp[playerid], 255);
TextDrawFont(txtDateDisp[playerid], 3);
TextDrawSetProportional(txtDateDisp[playerid], 1);
//Clock
txtTimeDisp[playerid] = TextDrawCreate(546.295898, 20.416660, "  ");
TextDrawLetterSize(txtTimeDisp[playerid], 0.627569, 2.585828);
TextDrawAlignment(txtTimeDisp[playerid], 1);
TextDrawColor(txtTimeDisp[playerid], 0x358AD4FF);
TextDrawSetShadow(txtTimeDisp[playerid], 1);
TextDrawSetOutline(txtTimeDisp[playerid], 1);
TextDrawBackgroundColor(txtTimeDisp[playerid], 255);
TextDrawFont(txtTimeDisp[playerid], 3);
TextDrawSetProportional(txtTimeDisp[playerid], 1);

TextDrawShowForPlayer(playerid,txtTimeDisp[playerid]);
TextDrawShowForPlayer(playerid,txtDateDisp[playerid]);
And timer of 10 milliseconds:

new hours,day,year,minutes,month;
gettime(hours, minutes);
getdate(year, month, day);
format(datestr,128,"~w~%02d.%02d.%d", day, month, year);
format(timestr,32,"~g~%02d:%02d",hours,minutes);
foreach(Player, i)
{
TextDrawSetString(txtTimeDisp[i],timestr);
TextDrawSetString(txtDateDisp[i],datestr);
}
Reply
#2

Somehow you recreate the same textdraw, check your script, how it gets to txtDateDisp[playerid] = TextDrawCreate(546.296203, 9.333327, " "); twice.
Reply
#3

I checked and there is not always overlap, it can be the lag? server is hosted in the works and keep it in pc. Excuse my bad English.
Reply
#4

FIXED
Reply
#5

Quote:
Originally Posted by w3b
Посмотреть сообщение
And timer of 10 milliseconds:
That is even faster than OnPlayerUpdate, which updates roughly every 30 milliseconds. For your information: the blink of an eye is about 300 milliseconds. And you're not even displaying seconds here. You could probably get away using a timer set for 5 seconds.

Also since it likely concerns a global textdraw (i.e. it is the same for all players) you should rather create one normal global textdraw rather than a separate one for each player.
Reply
#6

Wait so you are creating a 10 millisecond timer for something that changes every 1 minute ? (600000 ms)
Now I can finally understand how people can script some lag which does a simple task every now and then.
And to top that off, server's clock IS SAME FOR EVERYONE and yet it's being created as a player textdraw.
Reply
#7

Quote:
Originally Posted by Vince
Посмотреть сообщение
That is even faster than OnPlayerUpdate, which updates roughly every 30 milliseconds. For your information: the blink of an eye is about 300 milliseconds. And you're not even displaying seconds here. You could probably get away using a timer set for 5 seconds.

Also since it likely concerns a global textdraw (i.e. it is the same for all players) you should rather create one normal global textdraw rather than a separate one for each player.
If the timer is 10 milliseconds is placed on the server lag? I've used it at that because we spedometer timer and I want to look km and very fast and do not jump eg from 2km / h to 4km / h
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)