[SIMPLE] Creating a 1 minute countdown [SIMPLE]
#3

Alright... I haven't tested this, but it compiled fine.. So..
pawn Code:
new time = 60;
new timer1;

forward timer();
public timer()
{
    new string[128];
    if(time > 0)
    {
        time--;
        format(string, sizeof(string), "%d", time - 1);
    }
    else
    {
        time = 60;
        format(string, sizeof(string), "Go!");
        KillTimer(timer1);
    }
    GameTextForAll(string, 1000, 4);
    return 1;
}


CMD:countdown(playerid)
{
    timer1 = SetTimer("timer", 1000/* 1 second */, true);
    return 1;
}
Reply


Messages In This Thread
[SIMPLE] Creating a 1 minute countdown [SIMPLE] - by ShawtyyMacJunior - 27.07.2012, 21:42
Re: [SIMPLE] Creating a 1 minute countdown [SIMPLE] - by Dubya - 27.07.2012, 21:45
Re: [SIMPLE] Creating a 1 minute countdown [SIMPLE] - by Dubya - 27.07.2012, 22:00
Re: [SIMPLE] Creating a 1 minute countdown [SIMPLE] - by leonardo1434 - 27.07.2012, 23:29

Forum Jump:


Users browsing this thread: 1 Guest(s)