24.01.2015, 23:29
pawn Code:
//top of script
new IntroCount[MAX_PLAYERS];
new IntroTimer[MAX_PLAYERS];
//whenever you want to start countdown:
IntroTimer[playerid] = SetTimerEx("IntroCountdown", 100, 1, "u", playerid);
IntroCount[playerid] = 0;
//Somewhere else in script:
forward IntroCountdown(playerid);
public IntroCountdown(playerid)
{
new str[16];
IntroCount[playerid]++;
format(str, sizeof(str), "Loading: %03d%%", IntroCount[playerid]);
TextDrawHideForPlayer(playerid, textdraw);
TextDrawSetString(textdraw, str);
TextDrawShowForPlayer(playerid, textdraw);
if(IntroCount[playerid] == 100)
{
KillTimer(IntroTimer[playerid]);
//Continue
}
return 1;
}