thedestroyer Posted July 21, 2010 Share Posted July 21, 2010 How can i stop stat bars e.g th energy overstretching if you get more energy than ya maxenergy? Quote Link to comment Share on other sites More sharing options...
Analog Posted July 21, 2010 Share Posted July 21, 2010 if($enperc > 100) { $enperc = 100; } Quote Link to comment Share on other sites More sharing options...
thedestroyer Posted July 21, 2010 Author Share Posted July 21, 2010 thanks Quote Link to comment Share on other sites More sharing options...
Macintrash Posted July 28, 2010 Share Posted July 28, 2010 That might not always work, what if an item is supposed to bring it over 100%? Then it just shows 100%. Heres what i did: PUT IT Above the code that prints out your bars, then edit the bars to use enperc2 as the width instead of enperc. This way it will print out the real percentage while keeping the bars down to 120 width. :) It works great for me. $enperc2 = $enperc*1.2; if($enperc2>120) { $enperc2=120; } $enopp2 = $enopp*1.2; if($enopp2>120) { $enopp2=120; } $wiperc2 = $wiperc*1.2; if($wiperc2>120) { $wiperc2=120; } $wiopp2 = $wiopp*1.2; if($wiopp2>120) { $wiopp2=120; } $brperc2 = $brperc*1.2; if($brperc2>120) { $brperc2=120; } $bropp2 = $bropp*1.2; if($bropp2>120) { $bropp2=120; } $experc2 = $experc*1.2; if($experc2>120) { $experc2=120; } $exopp2 = $exopp*1.2; if($exopp2>120) { $exopp2=120; } $hpperc2 = $hpperc*1.2; if($hpperc2>120) { $hpperc2=120; } $hpopp2 = $hpopp*1.2; if($hpopp2>120) { $hpopp2=120; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.