Posts: 539
	Threads: 82
	Joined: Sep 2009
	
Reputation: 
0
	 
 
	
	
		Hey everyone,
I was wondering how could i make a simple experience bar, which is filling up as the player gains exp, i tried looking at all-bar FS but i didn't come up with a way to use the script on my experience bar, so can anyone tell me how to do it? ex drawing:
      EXPERIENCE
[        50/100       ]
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 2,175
	Threads: 235
	Joined: Sep 2009
	
Reputation: 
0
	 
 
	
	
		just make a textdraw and make some .......... in string like ....... is 50% of bar and like if bla bla bla textdrawsetstiring .... and go 20%
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 2,175
	Threads: 235
	Joined: Sep 2009
	
Reputation: 
0
	 
 
	
	
		if(LevelExp >= 5000...
{
TextDrawSetString(yourtextdraw[playerid],".............");
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 539
	Threads: 82
	Joined: Sep 2009
	
Reputation: 
0
	 
 
	
	
		I don't think thats the way of using it, if it is then how to fully write the line:
if(LevelExp[40]...
p.s, im using dudb for experience, i don't write like playerinfo[playerid][experience]+=amount;, i instantly save it to a file.
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 539
	Threads: 82
	Joined: Sep 2009
	
Reputation: 
0
	 
 
	
	
		Now it stays at 0,i mean the bar is all empty
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 141
	Threads: 24
	Joined: Jan 2009
	
Reputation: 
0
	 
 
	
	
		I dont know that function that you use but you just have to use your brain.
-> Amount of Pixels that the bar has
-> Maximum amount of what you want to display
Then you can 'calculate' the pixels that the bar has to be enlarged for each exp
e.g. The bar has 300 pixels and the maximum amount of Exp is 100
Then you have to enlarge the bar by 3 pixels for each exp
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 539
	Threads: 82
	Joined: Sep 2009
	
Reputation: 
0
	 
 
	
	
		Still not solved, help please..
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 1,079
	Threads: 64
	Joined: Jan 2010
	
	
 
	
	
		You do know that one is really really messed up? SetProgressBarMaxValue sets a max value of a progressbar, but it's on every progress bar (So if you got Bar:EXPBar[MAX_PLAYERS], and on OnPlayerConnect you do SetProgressBarMaxValue, that it changes EVERY EXPBar there is, so for every player?)..
atleast, it does kinda for me ;s