27.02.2014, 17:50
(
Последний раз редактировалось Dj_maryo1993; 27.02.2014 в 17:53.
Причина: solved
)
I made a clock , but it doesnt change ,it stays at the hour you enter .
LE :Edit , forgot that functions can be called via timer only if public
Код:
stock UpdateTime() { gettime(clockhour, clockminute); format(timestr,32,"%02d:%02d",clockhour,clockminute); TextDrawSetString(txtTimeDisp,timestr); }
Код:
public OnGameModeInit() { //some code SetTimer("UpdateTime",1000 * 60,1); return 1; }
Код:
txtTimeDisp = TextDrawCreate(605.0,25.0,"00:00"); TextDrawUseBox(txtTimeDisp, 0); TextDrawFont(txtTimeDisp, 3); TextDrawSetShadow(txtTimeDisp,0); // no shadow TextDrawSetOutline(txtTimeDisp,2); // thickness 1 TextDrawBackgroundColor(txtTimeDisp,0x000000FF); TextDrawColor(txtTimeDisp,0xFFFFFFFF); TextDrawAlignment(txtTimeDisp,3); TextDrawLetterSize(txtTimeDisp,0.5,1.5); UpdateTime();