[Help] Countdown
#1

So, i got this command, the admin write and make a event automatically, and i puted a timer and GameTextForPlayer to do a countdown, but, the GameText show in game a countdown for up, it shows: -1, -2, -3, -4, -5 rather than 5, 4, 3, 2, 1, Besides that, the GameText dont hide after event begins, someone know why?

Command that create the event:

PHP код:
ACMD:criarevento[1](playeridparams[])
{
    
inserttime params[0]/1000;
    if(
sscanf(params"i"params[0]))
        return 
Msg(playeridNovoA"[ > ] Uso correto: /evento [tempo] (1000 = 1 Segundo)");
     
SetTimer("IniciarEvento"params[0], false);
     
timer SetTimer("Countdownregressive"1000true);
     return 
1;

Fowards:

PHP код:
forward IniciarEvento();
public 
IniciarEvento()
{
    
KillTimer(timer);
    
inserttime 0;

PHP код:
forward Countdownregressive();
public 
Countdownregressive()
{
    
inserttime--;
    new 
string[240];
    
format(stringsizeof(string), "~y~O Evento sera iniciado em: ~g~%d~n~~y~Guarde seus ITENS!"inserttime);
    for(new 
0MAX_PLAYERSi++)
    return 
GameTextForPlayer(istring10005);    

there are other things throughout the code, however they are irrelevant to this, the error is in the count I think.
Reply


Messages In This Thread
[Help] Countdown - by ApolloScripter - 30.11.2018, 23:53
Re: [Help] Countdown - by akib - 01.12.2018, 01:07
Re: [Help] Countdown - by Jefff - 01.12.2018, 01:23
Re: [Help] Countdown - by ApolloScripter - 01.12.2018, 02:24
Re: [Help] Countdown - by ApolloScripter - 01.12.2018, 13:51
Re: [Help] Countdown - by UFF - 01.12.2018, 16:39

Forum Jump:


Users browsing this thread: 1 Guest(s)