[Ayuda] Necesito con un comando.
#4

Quote:
Originally Posted by armandozetaxx
Посмотреть сообщение
Lo siento si no me explique bien, pero quiero que te diga el tiempo exacto que tienes que esperar por un string.
Si te explicastes bien, nomas me di flojera hacerlo que diga el tiempo.

pawn Код:
new tsHola[MAX_PLAYERS];

CMD:hola(playerid, params[])
{
    new string[144];
    if((gettime() - tsHola[playerid]) < 60 * 3)
    {
        format(string, sizeof(string), "Tienes que esperar %d segundos para utilizar este cmd de nuevo!", (60 * 3) - (gettime() - tsHola[playerid]));
        return SendClientMessage(playerid, -1, string);
    }

    tsHola[playerid] = gettime();
    return 1;
}


Nota evidente: 60 * 3 es equivalente al tiempo de espera en segundos, osea, 3 minutos en este caso.
Reply


Messages In This Thread
[Ayuda] Necesito con un comando. - by armandozetaxx - 02.05.2015, 01:26
Re: [Ayuda] Necesito con un comando. - by SickAttack - 02.05.2015, 01:51
Respuesta: [Ayuda] Necesito con un comando. - by armandozetaxx - 02.05.2015, 03:15
Re: Respuesta: [Ayuda] Necesito con un comando. - by SickAttack - 02.05.2015, 03:30
Respuesta: [Ayuda] Necesito con un comando. - by armandozetaxx - 02.05.2015, 03:36

Forum Jump:


Users browsing this thread: 1 Guest(s)