SA-MP Forums Archive
[Ajuda] Criar tempo round - 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] Criar tempo round (/showthread.php?tid=425523)



Criar tempo round - Coringa_Vilao - 25.03.2013

Resolvido !


Re: Criar tempo round - Lуs - 25.03.2013

Textdraws, variбveis e settimers.


Re: Criar tempo round - Coringa_Vilao - 25.03.2013

Resolvido !


Re: Criar tempo round - Lуs - 25.03.2013

Quote:
Originally Posted by Coringa_Vilao
Посмотреть сообщение
tipo posso usar uma base de um relogio ?
Sim, й sу vocк reverter ele.


Re: Criar tempo round - DAKOT4 - 25.03.2013

new TempoArena = 50;

public time

TempoArena --;

if(TempoArena == 0)
{
killtimer
}


Re: Criar tempo round - Coringa_Vilao - 25.03.2013

Resolvido !


Respuesta: Re: Criar tempo round - Pedro Pawno - 26.03.2013

Quote:
Originally Posted by DAKOT4
Посмотреть сообщение
new TempoArena = 50;

public time

TempoArena --;

if(TempoArena == 0)
{
killtimer
}
public time?
vish vocк nem definiu a callback..

Se quer explicar explique direito nгo me leve a mal. : Confuso:


Re: Criar tempo round - Coringa_Vilao - 26.03.2013

Resolvido !


Re: Criar tempo round - @Riichard - 26.03.2013

Um exemplo em mensagem, estude-o...
pawn Код:
new rMinutos[MAX_PLAYERS], rSegundos[MAX_PLAYERS], TempoKill[MAX_PLAYERS], String[35];

CMD:iniciar(playerid)
{
    if(TempoKill[playerid] != 0) return 1;
    rMinutos[playerid] = 9; // 9 Minutos
    rSegundos[playerid] = 60; // 60 Segundos
    TempoKill[playerid] = SetTimerEx("MinutosSegundos", 1000, true, "d", playerid);
    SendClientMessage(playerid, -1, "Iniciando..");
    return 1;
}

forward MinutosSegundos(playerid);
public MinutosSegundos(playerid)
{
    rSegundos[playerid] -= 1;
    if(rSegundos[playerid] == 0) rMinutos[playerid] -= 1, rSegundos[playerid] = 59;
    format(String, sizeof(String), "Iniciando em %02d minuto(s) e %02d segundo(s)...", rMinutos[playerid], rSegundos[playerid]);
    SendClientMessage(playerid, -1, String);
    if(rMinutos[playerid] == 0 && rSegundos[playerid] == 0)
    {
        SendClientMessage(playerid, -1, "A contagem terminou!");
        KillTimer(TempoKill[playerid]);
    }
    return 1;
}
Incerteza que funcione, apenas um EXEMPLO.


Re: Criar tempo round - Coringa_Vilao - 26.03.2013

Resolvido !