[Ajuda] Relogio que reinicia a cada 10M
#1

E ae emadas, como eu faзo uma textDrawn com um relogio que reinicie a cada 10 Minutos? Tipo:

comaзa em 10:00 e vai diminuindo os segundos e tal atй chegar a 00:00 ai ele volta para 10:00.
Reply
#2

Bom vou dar a base:

No topo:
pawn Код:
new TempoTimerM=9,TempoTimerS=60;
OnGameModeInit:
pawn Код:
SetTimer("RelogioBaixo",1000,true);
//E cria a textdraw
Timer:
pawn Код:
forward RelogioBaixo();
public RelogioBaixo()
{
        TTS--;
        new tempo[7];
        if(MMS>9) {format(tempo,7,0%d:%d",MMT,MMS);
        if(MMS<10) {format(tempo,7,0%d:0%d"
,MMT,MMS);
        TextDrawSetString(...);
        if(TTS==0) {TTS=60;TTM--;}
        if(TTM==0&&TTS==0) {
                //Chegou a 0, faz aqui
        }
        return 1;
}
Bugs? Avise.
Reply
#3

@[NWD]Tweener_:
Seria Algo Extremamente Chato de se Fazer ¬¬

pawn Код:
new Count = 600000,minutos = 0, segundos = 60; // Inicio GameMode
forward ContarRegressiv(playerid); //FINAL GameMode
public ContarRegressiv(playerid)
{
    if (Count > 0)
    {
       
        Count=Count-1000;
        new gametext[128];
        minutos = floatround((Count / 60000));
        segundos = segundos-1;
        format(gametext, 128, "~r~%d~b~:~w~%d", minutos, segundos);
        GameTextForPlayer(playerid,gametext,999,4);
        if(segundos == 0) segundos = 60;
        SetTimerEx("ContarRegressiv",1000,false,"i",playerid);
    }
    if(Count == 0)
    {
        Count = 600000;//Comeзa Tudo DNV
        SetTimerEx("ContarRegressiv",1000,false,"ii",playerid);
    }
    return 1;
}
Usando uma Array e alguns Floats *-*
Reply
#4

os 2 nгo contao

sabem por que?
pawn Код:
forward ContarRegressiv(playerid); //FINAL GameMode
public ContarRegressiv(playerid)
{
    if (Count > 0)
    {

        Count=Count-1000;
        new gametext[128];
        minutos = floatround((Count / 60000));
        segundos = segundos-1;
        format(gametext, 128, "~r~%d~b~:~w~%d", minutos, segundos);
        TextDrawSetString(text30, gametext);
        if(segundos == 0) segundos = 60;
        SetTimerEx("ContarRegressiv",1000,false,"i",playerid);
    }
    if(Count == 0)
    {
        Count = 600000;//Comeзa Tudo DNV
        SetTimerEx("ContarRegressiv",1000,false,"ii",playerid);
    }
    return 1;
}
pawn Код:
forward RelogioBaixo();
public RelogioBaixo()
{
        TempoTimerS--;
        new tempo[7];
        if(TempoTimerS>9)
        {
        format(tempo,7,"0%d:%d",TempoTimerM,TempoTimerS);
        }
        if(TempoTimerS<10)
        {
        format(tempo,7,"0%d:0%d",TempoTimerM,TempoTimerS);
        TextDrawSetString(text30, tempo);
        }
        if(TempoTimerS==0)
        {
        TempoTimerS=60;TempoTimerM--;
        }
        if(TempoTimerM==0&&TempoTimerS==0)
        {
                //Chegou a 0, faz aqui
        }
        return 1;
}
Reply
#5

29/08/2010 a 07/10/2011..Quase 1 Ano..
Tenso...Drakins nem vem no Forum Mais,Sub_Zero Parou com SA-MP e [NWD]Tweener_ acho que parou tambem..
#Ressucitaretenso.
Reply
#6

uhsaushuu' '-'

queria essa bagaзa mais conta
Reply
#7

Eu venho as vezes, mais parei com SAMP, passei tudo para o Jim
Reply
#8

tweener e vc da tssa?
Reply
#9

Quote:
Originally Posted by Link_
Посмотреть сообщение
tweener e vc da tssa?
Joguei lб a mais de 2 anos atraz eu acho.
Reply
#10

Lol Lembar de Min ? Rangel '-' tbm joguei la um tempгo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)