Progress Bar [HELP] [+REP] -
Sting. - 24.04.2012
How do I create a progress bar for a player score bar? I will deal with the color. I want is , that this progress bar to be just below the screen. The Max Score is 10000. (Accomplished Player). So, if the player is new, it will show 0/10000 (Empty Bar), and the bar to update instantly when a player receives score. So, slowly the bar will fill up to show him how much he was to work hard to achieve. How do I do that? If its hard to give me the coordinates, its ok. I'll find it myself. I also have to add the text just above the bar saying "Score Progress /10000" because If I don't, the player might get confused wondering what that bar is... Please help me. No matter who does, every single person gets a Reputation.
Re: Progress Bar [HELP] [+REP] -
Sasino97 - 24.04.2012
Use this, is one of most useful includes + ingame progress bar creator:
https://sampforum.blast.hk/showthread.php?tid=113443
Re: Progress Bar [HELP] [+REP] -
Sting. - 24.04.2012
It doesn't work for me, that's why I posted this. I always search before posting for HELP.
Re: Progress Bar [HELP] [+REP] -
Sting. - 25.04.2012
Anyone?
Re: Progress Bar [HELP] [+REP] -
Azazelo - 25.04.2012
why you not use a couple of text draw box with different colors for stage of progress ?
edit : Like this
Re: Progress Bar [HELP] [+REP] -
zbt - 25.04.2012
follow the example
pawn Код:
new Bar:barid[MAX_PLAYERS];
new Value[MAX_PLAYERS];
public OnPlayerConnect(playerid) {
barid[playerid] = //CreateProgressBar ( .. ) ;
ShowProgressBarForPlayer(playerid, barid[playerid]) ;
SetProgressBarValue(barid[playerid], Value[playerid]) ;
SetProgressBarMaxValue(barid[playerid], 10000);
SetTimerEx("UpdateBar", 5000, true, "i", playerid) ;
return true ;
}
//when you gain experience
Value[playerid] ++;
forward UpdateBar(playerid);
public UpdateBar(playerid) {
SetProgressBarValue(barid[playerid], Value[playerid]) ;
UpdateProgressBar(barid[playerid], playerid);
return true;
}
is now with you.
Re: Progress Bar [HELP] [+REP] -
Sting. - 25.04.2012
Alright thanks guys.
Re: Progress Bar [HELP] [+REP] -
Sting. - 25.04.2012
Where do I put this?
Re: Progress Bar [HELP] [+REP] -
MadeMan - 25.04.2012
Quote:
Originally Posted by RTR12
|
There
Quote:
Originally Posted by RTR12
... when a player receives score ...
|
Re: Progress Bar [HELP] [+REP] -
Jonny5 - 25.04.2012
I would not use a timer here...
you could update the progress when you Value[playerid] ++;
why update it every 5000ms when you can update it only when needed.
something like
pawn Код:
new Bar:barid[MAX_PLAYERS];
new Value[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
barid[playerid] = //CreateProgressBar ( .. ) ;
ShowProgressBarForPlayer(playerid, barid[playerid]) ;
SetProgressBarValue(barid[playerid], Value[playerid]) ;
SetProgressBarMaxValue(barid[playerid], 10000);
//SetTimerEx("UpdateBar", 5000, true, "i", playerid) ;
return true ;
}
forward UpdateBar(playerid);
public UpdateBar(playerid)
{
SetProgressBarValue(barid[playerid], Value[playerid]) ;
UpdateProgressBar(barid[playerid], playerid);
return true;
}
//when you gain experience
Value[playerid] ++;
UpdateBar(playerid);