Stats TextDraw Bug
#7

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Create per-player textdraws instead of what your doing and you don't even need to use a timer, just update the textdraw every time the stat changes.

Example:
pawn Код:
new PlayerText:Time[MAX_PLAYERS];

Time[playerid] = CreatePlayerTextDraw(playerid, 554.000000, 205.000000, "~g~05:00");
PlayerTextDrawAlignment(playerid, Time[playerid], 2);
PlayerTextDrawBackgroundColor(playerid, Time[playerid], 22);
PlayerTextDrawFont(playerid, Time[playerid], 2);
PlayerTextDrawLetterSize(playerid, Time[playerid], 0.560000, 6.100000);
PlayerTextDrawColor(playerid, Time[playerid], -1);
PlayerTextDrawSetOutline(playerid, Time[playerid], 1);
PlayerTextDrawSetProportional(playerid, Time[playerid], 1);
PlayerTextDrawSetSelectable(playerid, Time[playerid], 0);

// To update the textdraw
new string[128];
format(string, sizeof (string), "~g~%02d:%02d", minutes, seconds);
PlayerTextDrawSetString(playerid, Time[playerid], string);
Thanks + rep , but where to add both of functions? onplayerupdate?
Reply


Messages In This Thread
Stats TextDraw Bug [+REP's!] - by SPA - 25.06.2014, 15:32
Re: Stats TextDraw Bug - by RenovanZ - 25.06.2014, 15:35
Re: Stats TextDraw Bug - by SPA - 25.06.2014, 15:47
Re: Stats TextDraw Bug - by RenovanZ - 25.06.2014, 15:58
Respuesta: Stats TextDraw Bug - by SickAttack - 25.06.2014, 16:08
Re: Stats TextDraw Bug - by SPA - 25.06.2014, 16:13
Re: Respuesta: Stats TextDraw Bug - by SPA - 25.06.2014, 16:45
Re: Respuesta: Stats TextDraw Bug - by RenovanZ - 25.06.2014, 16:53

Forum Jump:


Users browsing this thread: 1 Guest(s)