[HELP] Loading TextDraw
#4

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;
}
Reply


Messages In This Thread
[HELP] Loading TextDraw - by LStrike17 - 24.01.2015, 22:04
Re: [HELP] Loading TextDraw - by xAzKingx - 24.01.2015, 22:52
Re: [HELP] Loading TextDraw - by LStrike17 - 24.01.2015, 22:59
Re: [HELP] Loading TextDraw - by Schneider - 24.01.2015, 23:29

Forum Jump:


Users browsing this thread: 1 Guest(s)