Progress bar help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Progress bar help (
/showthread.php?tid=552598)
Progress bar help -
Shinta307 - 25.12.2014
How to create progress bar , if(PlayerInfo[playerid][kondisi] == 40) progress bar change to red color ?
pawn Код:
if(kondisi[playerid] == INVALID_BAR_ID)
{
kondisi[playerid] = CreateProgressBar(45.00, 324.00, 86.50, 1.50, 866792447, 100.0); // green color default if full
}
Re: Progress bar help -
Shinta307 - 25.12.2014
Bump
Re: Progress bar help -
Lordzy - 25.12.2014
Simply change it's color when your array value becomes 40. If you're using Toribio's progress bar include, use SetProgressBarColor function.
pawn Код:
if(GetProgressBarValue(my_bar) == 40) SetProgressBarColor(my_bar, 0xFF0000FF);