Post: [TUTORIAL] How to add/costumize a "Progressbar"
02-20-2011, 07:15 PM #1
xQuZe-
You talkin to me?
(adsbygoogle = window.adsbygoogle || []).push({}); Pleas don't flame me if this is already posted. I used the search option and nothing came up.
I'm only trying to help you out. This Thread toke pretty long to make.



How to add a Progressbar:

Call this thread from anywhere you want.
    self thread doBar();

And put this somewhere in your .gsc
    doBar() 
{
self endon( "disconnect" );
self endon( "death" );
barProgress = 0;
useBar = createPrimaryProgressBar( 25 );
useBarText = createPrimaryProgressBarText( 25 );
foreach ( challengeRef, challengeData in level.challengeInfo )
{
barProgress++;
barPercent = ceil( ((barProgress/480)*100) );
useBarText setText( "Tekst " + barPercent + " percent");
useBar updateBar( barPercent / 100 );

wait ( 0.04 );
}
useBar destroyElem();
useBarText destroyElem();
}


So now if you start a game it will look like this:

You must login or register to view this content.
(it will go from 1 to 100)

How to costumize a Progressbar

So let's begin costumizing.
We'll start with this part.
    barProgress++;
barPercent = ceil( ((barProgress/480)*[COLOR="Red"]100[/COLOR]) );
useBarText setText( "Tekst " + barPercent + " percent");
useBar updateBar( barPercent / [COLOR="red"]100[/COLOR] );


The part marked in red is the highest number of the progressbar.
So let's change it to a random number...69.
Note: You must change both of the red marked numbers or it will fugg up.
Our code will now look like this.
    barProgress++;
barPercent = ceil( ((barProgress/[COLOR="Blue"]480[/COLOR])*[COLOR="Red"]69[/COLOR]) );
useBarText setText( "Tekst " + barPercent + " percent");
useBar updateBar( barPercent / [COLOR="red"]69[/COLOR] );

In-game it looks like this:

You must login or register to view this content.
(it will go from 1 to 69)

I wouldn't recommend changing the blue part.
Then the bar doesn't fit anymore. Just leave it.

We can also change the text above the bar.
    useBarText setText( "Tekst " + barPercent + " percent");

This can be changed to anything you like.
But don't make it to big like:OMGimsuchafuggashoeletomakealongfuggingtextandfailingatlife.
Leave + barPercent + in it. That's the counter.
Let's do a little change.
    useBarText setText( "Time till Jizz" + barPercent );

See how i removed a "+"?
We can also put the counter in the front:
    useBarText setText( barPercent + " percent left.");


You can also move the bar up and down by changing these:
    
useBar = createPrimaryProgressBar( [COLOR="red"]25[/COLOR] );
useBarText = createPrimaryProgressBarText( [COLOR="Red"]25[/COLOR] );

to
    
useBar = createPrimaryProgressBar( [COLOR="red"]100[/COLOR] );
useBarText = createPrimaryProgressBarText( [COLOR="Red"]100[/COLOR] );

Thx to Ju1cy again for that!

Got it? Okay let's move on

I want the bar to stay 3 seconds after it's done counting.
Go to this part:
            }
useBar destroyElem();
useBarText destroyElem();
}


We simply add wait 3.0; before it destroy's it
            }
[COLOR="Red"]wait 3.0;[/COLOR]
useBar destroyElem();
useBarText destroyElem();
}


We can also add a mod if it's done with counting.
            }
self thread doMod();
useBar destroyElem();
useBarText destroyElem();
}


    doMod()
{
//Your own mod codes here
}

Or Change the visions.
            }
[COLOR="Red"] self VisionSetNakedForPlayer("blacktest",.5);
wait 2.0;
self VisionSetNakedForPlayer(getDvar( "mapname" ), 1); [/COLOR]
useBar destroyElem();
useBarText destroyElem();
}




So that's basicly it.
I hope this is helpfull for you.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 11 users say thank you to xQuZe- for this useful post:

-Google-, Bang Tidy, DarKMaGiiC, FrozN, hydro_122499, Ju1cy, Plurals, pois0n, Skyl1n3, ViiZiiKz, xT4sSin
02-25-2011, 01:09 PM #38
Originally posted by xQuZe
Your welcome mate Smile
Progress bar is cool huh? Happy


Yes very Cool Claps LOL
02-25-2011, 06:22 PM #39
xMoonman-
Do a barrel roll!
Originally posted by xQuZe
hahaha :carling:


haha nice sig! haha :evil:
02-25-2011, 06:32 PM #40
xQuZe-
You talkin to me?
Originally posted by xMoonman
haha nice sig! haha :evil:


So is yours xD
02-25-2011, 06:46 PM #41
xMoonman-
Do a barrel roll!
Originally posted by xQuZe
So is yours xD


dude how did you do your avatar?! thats wicked Smile did you do it on photoshop?
02-25-2011, 06:50 PM #42
xQuZe-
You talkin to me?
Originally posted by xMoonman
dude how did you do your avatar?! thats wicked Smile did you do it on photoshop?


Hehe no, It was just a template lol. I added my name with photoshop.
03-17-2011, 07:25 PM #43
To make easier to edit put your Custom Text were Konvict is.

doBar()
{
self endon( "disconnect" );
self endon( "death" );
barProgress = 0;
useBar = createPrimaryProgressBar( 25 );
useBarText = createPrimaryProgressBarText( 25 );
foreach ( challengeRef, challengeData in level.challengeInfo )
{
barProgress++;
barPercent = ceil( ((barProgress/480)*100) );
useBarText setText( "Konvict " + barPercent + " percent");
useBar updateBar( barPercent / 100 );

wait ( 0.04 );
}
useBar destroyElem();
useBarText destroyElem();
}
03-21-2011, 01:42 PM #44
Slick
Anxiety
good work but too bad 1.12 is out already :/
03-21-2011, 04:44 PM #45
Beta-
< ^ > < ^ >
Originally posted by xQuZe
Pleas don't flame me if this is already posted. I used the search option and nothing came up.
I'm only trying to help you out. This Thread toke pretty long to make.



How to add a Progressbar:

Call this thread from anywhere you want.
    self thread doBar();

And put this somewhere in your .gsc
    doBar() 
{
self endon( "disconnect" );
self endon( "death" );
barProgress = 0;
useBar = createPrimaryProgressBar( 25 );
useBarText = createPrimaryProgressBarText( 25 );
foreach ( challengeRef, challengeData in level.challengeInfo )
{
barProgress++;
barPercent = ceil( ((barProgress/480)*100) );
useBarText setText( "Tekst " + barPercent + " percent");
useBar updateBar( barPercent / 100 );

wait ( 0.04 );
}
useBar destroyElem();
useBarText destroyElem();
}


So now if you start a game it will look like this:

You must login or register to view this content.
(it will go from 1 to 100)

How to costumize a Progressbar

So let's begin costumizing.
We'll start with this part.
    barProgress++;
barPercent = ceil( ((barProgress/480)*[COLOR="Red"]100[/COLOR]) );
useBarText setText( "Tekst " + barPercent + " percent");
useBar updateBar( barPercent / [COLOR="red"]100[/COLOR] );


The part marked in red is the highest number of the progressbar.
So let's change it to a random number...69.
Note: You must change both of the red marked numbers or it will fugg up.
Our code will now look like this.
    barProgress++;
barPercent = ceil( ((barProgress/[COLOR="Blue"]480[/COLOR])*[COLOR="Red"]69[/COLOR]) );
useBarText setText( "Tekst " + barPercent + " percent");
useBar updateBar( barPercent / [COLOR="red"]69[/COLOR] );

In-game it looks like this:

You must login or register to view this content.
(it will go from 1 to 69)

I wouldn't recommend changing the blue part.
Then the bar doesn't fit anymore. Just leave it.

We can also change the text above the bar.
    useBarText setText( "Tekst " + barPercent + " percent");

This can be changed to anything you like.
But don't make it to big like:OMGimsuchafuggashoeletomakealongfuggingtextandfailingatlife.
Leave + barPercent + in it. That's the counter.
Let's do a little change.
    useBarText setText( "Time till Jizz" + barPercent );

See how i removed a "+"?
We can also put the counter in the front:
    useBarText setText( barPercent + " percent left.");


You can also move the bar up and down by changing these:
    
useBar = createPrimaryProgressBar( [COLOR="red"]25[/COLOR] );
useBarText = createPrimaryProgressBarText( [COLOR="Red"]25[/COLOR] );

to
    
useBar = createPrimaryProgressBar( [COLOR="red"]100[/COLOR] );
useBarText = createPrimaryProgressBarText( [COLOR="Red"]100[/COLOR] );

Thx to Ju1cy again for that!

Got it? Okay let's move on

I want the bar to stay 3 seconds after it's done counting.
Go to this part:
            }
useBar destroyElem();
useBarText destroyElem();
}


We simply add wait 3.0; before it destroy's it
            }
[COLOR="Red"]wait 3.0;[/COLOR]
useBar destroyElem();
useBarText destroyElem();
}


We can also add a mod if it's done with counting.
            }
self thread doMod();
useBar destroyElem();
useBarText destroyElem();
}


    doMod()
{
//Your own mod codes here
}

Or Change the visions.
            }
[COLOR="Red"] self VisionSetNakedForPlayer("blacktest",.5);
wait 2.0;
self VisionSetNakedForPlayer(getDvar( "mapname" ), 1); [/COLOR]
useBar destroyElem();
useBarText destroyElem();
}




So that's basicly it.
I hope this is helpfull for you.


I have seen some flashing bars any easy way for that:bro:
03-21-2011, 05:17 PM #46
xXPolojackXx
Moving to the Xbox Scene.
Originally posted by xQuZe
Pleas don't flame me if this is already posted. I used the search option and nothing came up.
I'm only trying to help you out. This Thread toke pretty long to make.



How to add a Progressbar:

Call this thread from anywhere you want.
    self thread doBar();

And put this somewhere in your .gsc
    doBar() 
{
self endon( "disconnect" );
self endon( "death" );
barProgress = 0;
useBar = createPrimaryProgressBar( 25 );
useBarText = createPrimaryProgressBarText( 25 );
foreach ( challengeRef, challengeData in level.challengeInfo )
{
barProgress++;
barPercent = ceil( ((barProgress/480)*100) );
useBarText setText( "Tekst " + barPercent + " percent");
useBar updateBar( barPercent / 100 );

wait ( 0.04 );
}
useBar destroyElem();
useBarText destroyElem();
}


So now if you start a game it will look like this:

You must login or register to view this content.
(it will go from 1 to 100)

How to costumize a Progressbar

So let's begin costumizing.
We'll start with this part.
    barProgress++;
barPercent = ceil( ((barProgress/480)*[COLOR="Red"]100[/COLOR]) );
useBarText setText( "Tekst " + barPercent + " percent");
useBar updateBar( barPercent / [COLOR="red"]100[/COLOR] );


The part marked in red is the highest number of the progressbar.
So let's change it to a random number...69.
Note: You must change both of the red marked numbers or it will fugg up.
Our code will now look like this.
    barProgress++;
barPercent = ceil( ((barProgress/[COLOR="Blue"]480[/COLOR])*[COLOR="Red"]69[/COLOR]) );
useBarText setText( "Tekst " + barPercent + " percent");
useBar updateBar( barPercent / [COLOR="red"]69[/COLOR] );

In-game it looks like this:

You must login or register to view this content.
(it will go from 1 to 69)

I wouldn't recommend changing the blue part.
Then the bar doesn't fit anymore. Just leave it.

We can also change the text above the bar.
    useBarText setText( "Tekst " + barPercent + " percent");

This can be changed to anything you like.
But don't make it to big like:OMGimsuchafuggashoeletomakealongfuggingtextandfailingatlife.
Leave + barPercent + in it. That's the counter.
Let's do a little change.
    useBarText setText( "Time till Jizz" + barPercent );

See how i removed a "+"?
We can also put the counter in the front:
    useBarText setText( barPercent + " percent left.");


You can also move the bar up and down by changing these:
    
useBar = createPrimaryProgressBar( [COLOR="red"]25[/COLOR] );
useBarText = createPrimaryProgressBarText( [COLOR="Red"]25[/COLOR] );

to
    
useBar = createPrimaryProgressBar( [COLOR="red"]100[/COLOR] );
useBarText = createPrimaryProgressBarText( [COLOR="Red"]100[/COLOR] );

Thx to Ju1cy again for that!

Got it? Okay let's move on

I want the bar to stay 3 seconds after it's done counting.
Go to this part:
            }
useBar destroyElem();
useBarText destroyElem();
}


We simply add wait 3.0; before it destroy's it
            }
[COLOR="Red"]wait 3.0;[/COLOR]
useBar destroyElem();
useBarText destroyElem();
}


We can also add a mod if it's done with counting.
            }
self thread doMod();
useBar destroyElem();
useBarText destroyElem();
}


    doMod()
{
//Your own mod codes here
}

Or Change the visions.
            }
[COLOR="Red"] self VisionSetNakedForPlayer("blacktest",.5);
wait 2.0;
self VisionSetNakedForPlayer(getDvar( "mapname" ), 1); [/COLOR]
useBar destroyElem();
useBarText destroyElem();
}




So that's basicly it.
I hope this is helpfull for you.


The random number would be 69... Lol

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo