PDA

View Full Version : [HELP] Loading TextDraw


LStrike17
24/01/2015, 10:04 PM
Hello everyone, I want to know how to make Loading TextDraw.
Example
Loading: 10%
Loading: 11%
Loading blablblaba%

I want to make in miliseconds to go from 0 to 100 % in 10 seconds.

I hope that someones understands me what I want to make. :)

xAzKingx
24/01/2015, 10:52 PM
For each player or just one player? when its triggered

LStrike17
24/01/2015, 10:59 PM
for one player, i want to make it in intro when players connect.

Schneider
24/01/2015, 11:29 PM
//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;
}