[Ajuda] Contador regressivo - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Contador regressivo (
/showthread.php?tid=422659)
Contador regressivo -
Crueliz0n - 14.03.2013
estou criando um contador regressivo de 10 minutos, ele conta corretamente sу que em segundos desta forma:
600, 599, 598, 597...
como eu faria para contar assim? :
10:00, 09:59, 09:58, 09:57 ..
pawn Код:
#define TempoPartida 10 //minutos
new TempoRestante = TempoPartida*60;
SetTimer("RoundTimer",1000,true);
forward Timer();
public Timer()
{
printf("%d",TempoRestante);
TempoRestante --;
}
Re: Contador regressivo -
telmo_ferreira - 14.03.2013
format(string,sizeof(string),"%02d:%02d",TempoRest ante/60,TempoRestante%60);
GameTextForPlayer(playerid,string,3000,6);