Posts: 447
Threads: 105
Joined: Feb 2013
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?