[HELP] Loading TextDraw - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] Loading TextDraw (
/showthread.php?tid=559722)
[HELP] Loading TextDraw -
LStrike17 - 24.01.2015
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.
Re: [HELP] Loading TextDraw -
xAzKingx - 24.01.2015
For each player or just one player? when its triggered
Re: [HELP] Loading TextDraw -
LStrike17 - 24.01.2015
for one player, i want to make it in intro when players connect.
Re: [HELP] Loading TextDraw -
Schneider - 24.01.2015
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;
}