TextDrawSetString problem
#1

I made a clock , but it doesnt change ,it stays at the hour you enter .

Код:
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();
LE :Edit , forgot that functions can be called via timer only if public
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)