Timer
#11

Check this: GameText Styles

Style 1: Fades out after 8 seconds, regardless of time set. If you have a time setting longer than that, it will re-appear after fading out and repeat until the time ends.

So use another one, for example 5.

pawn Code:
#include <a_samp>
#include <zcmd>

new countvar = 10;
new CountDownTimer;

CMD:countdown(playerid, params[])
{
    CountDownTimer = SetTimer("CountDown", 1000, true);
    SetPlayerRaceCheckpoint(playerid, 1, -77.6183, 2501.9719, 15.4608, 0.0, 0.0, 0.0, 50.0);
    return 1;
}

forward CountDown();
public CountDown()
{
    countvar--;
    new str[6];
    if(countvar == 0)
    {
        GameTextForAll("~g~G~r~O~b~!", 3000, 5);
        KillTimer(CountDownTimer);
        countvar = 4;
    }
    else
    {
        format(str, sizeof(str), "%d", countvar);
        GameTextForAll(str, 1000, 5);
    }
}
I added a little cool feature, which displays "GO!" in multi-color for 3 seconds after the countdown ends.
pawn Code:
GameTextForAll("~g~G~r~O~b~!", 3000, 5);
Reply


Messages In This Thread
Timer - by Heress - 31.10.2018, 08:46
Re: Timer - by DaniceMcHarley - 31.10.2018, 08:51
Re: Timer - by Heress - 31.10.2018, 08:57
Re: Timer - by ReD_HunTeR - 31.10.2018, 09:02
Re: Timer - by Heress - 31.10.2018, 09:03
Re: Timer - by IceBilizard - 31.10.2018, 09:03
Re: Timer - by TheToretto - 31.10.2018, 09:18
Re: Timer - by Heress - 31.10.2018, 09:26
Re: Timer - by TheToretto - 31.10.2018, 09:29
Re: Timer - by Heress - 31.10.2018, 09:44
Re: Timer - by TheToretto - 31.10.2018, 10:10
Re: Timer - by Heress - 31.10.2018, 10:45
Re: Timer - by Heress - 31.10.2018, 10:48
Re: Timer - by TheToretto - 31.10.2018, 11:01
Re: Timer - by Heress - 31.10.2018, 11:03

Forum Jump:


Users browsing this thread: 1 Guest(s)