[Ajuda]Criar relogio de up
#5

pawn Код:
new Text:DisplayTime;
new minutos=2, segundos=60;
new timestr[32];

forward UpdateTime();

public UpdateTime()
{
    segundos--;
    if(segundos < 1 && minutos >= 1){minutos--; segundos=60;}
    format(timestr,32,"%02d:%02d",minutos,segundos);
    TextDrawSetString(DisplayTime,timestr);
}

public OnGameModeInit()
{
    DisplayTime = TextDrawCreate(605.0,25.0,"00:00");
    TextDrawUseBox(DisplayTime, 0);
    TextDrawFont(DisplayTime, 3);
    TextDrawSetShadow(DisplayTime,0);
    TextDrawSetOutline(DisplayTime,2);
    TextDrawBackgroundColor(DisplayTime,0x000000FF);
    TextDrawColor(DisplayTime,0xFFFFFFFF);
    TextDrawAlignment(DisplayTime,3);
    TextDrawLetterSize(DisplayTime,0.5,1.5);
    SetTimer("UpdateTime", 1000, 1);
    return 1;
}


Algum tempo depois...
Usado o mesmo textdraw do gl_realtime.
Isto й apenas um exemplo, modifique para o modo que quer usar.
Nгo esquecer do(уbvio) TextDrawShowForPlayer.
Reply


Messages In This Thread
[Ajuda]Criar relogio de up - by DrTHE - 25.09.2011, 19:13
Re: [Ajuda]Criar relogio de up - by Izaac Abreu - 25.09.2011, 20:25
Re: [Ajuda]Criar relogio de up - by DrTHE - 25.09.2011, 20:54
Re: [Ajuda]Criar relogio de up - by Izaac Abreu - 25.09.2011, 21:14
Re: [Ajuda]Criar relogio de up - by Shelby - 25.09.2011, 21:45
Re: [Ajuda]Criar relogio de up - by DrTHE - 25.09.2011, 22:28
Re: [Ajuda]Criar relogio de up - by Shelby - 25.09.2011, 22:43

Forum Jump:


Users browsing this thread: 1 Guest(s)