31.10.2018, 10:10
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.
I added a little cool feature, which displays "GO!" in multi-color for 3 seconds after the countdown ends.
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);
}
}
pawn Code:
GameTextForAll("~g~G~r~O~b~!", 3000, 5);