SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 24/01/2015, 10:04 PM   #1
LStrike17
Little Clucker
 
Join Date: Sep 2012
Posts: 25
Reputation: 0
Default [HELP] Loading TextDraw

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.
LStrike17 is offline   Reply With Quote
Old 24/01/2015, 10:52 PM   #2
xAzKingx
Little Clucker
 
xAzKingx's Avatar
 
Join Date: Jan 2015
Posts: 23
Reputation: 45
Default Re: [HELP] Loading TextDraw

For each player or just one player? when its triggered
__________________
xAzKingx

SAMP 2009-2015

"It does not matter how slowly you go as long as you do not stop."

------------------------------
xAzKingx is offline   Reply With Quote
Old 24/01/2015, 10:59 PM   #3
LStrike17
Little Clucker
 
Join Date: Sep 2012
Posts: 25
Reputation: 0
Default Re: [HELP] Loading TextDraw

for one player, i want to make it in intro when players connect.
LStrike17 is offline   Reply With Quote
Old 24/01/2015, 11:29 PM   #4
Schneider
Gangsta
 
Schneider's Avatar
 
Join Date: Jun 2007
Location: Netherlands
Posts: 515
Reputation: 136
Default Re: [HELP] Loading TextDraw

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;
}
Schneider is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading Textdraw AgusZ Scripting Help 5 01/01/2015 03:35 PM
TextDraw Loading... ZmaXy Scripting Help 3 24/01/2014 12:27 AM
Loading other sprites? [TextDraw] BullseyeHawk Scripting Help 4 14/01/2014 05:53 PM
Textdraw Not Loading Avi Raj Scripting Help 0 24/11/2013 02:10 PM
Help: loading textdraw.. NewbieScripter Scripting Help 2 28/08/2012 07:27 PM


All times are GMT. The time now is 11:39 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.