Posts: 1,765
Threads: 1
Joined: Aug 2011
Reputation:
0
The code which updates the bars with the percentage it should be at?
In all honesty you should have more common sense than this? You even said "if we need code", last time I checked I wasn't physic.
Posts: 87
Threads: 22
Joined: Aug 2013
Reputation:
0
i'm noob at scripting
maybe this
Timer:PengurangData[1000]()
{
foreach(Player, i)
{
if(gPlayerLogged{i})
{
SetProgressBarValue(stabar[i], PlayerInfo[i][pEnergi]);
SetProgressBarValue(bladbar[i], PlayerInfo[i][pBladder]);
SetProgressBarValue(hungbar[i], PlayerInfo[i][pHunger]);
UpdateProgressBar(hungbar[i], i);
UpdateProgressBar(bladbar[i], i);
UpdateProgressBar(stabar[i], i);
if(GetProgressBarValue(hungbar[i]) < 90)
{
SetProgressBarColor(hungbar[i], 0x7BAD12FF);
UpdateProgressBar(hungbar[i], i);
}
if(GetProgressBarValue(hungbar[i]) < 70)
{
SetProgressBarColor(hungbar[i], 0x96AD12FF);
UpdateProgressBar(hungbar[i], i);
}
if(GetProgressBarValue(hungbar[i]) < 50)
{
SetProgressBarColor(hungbar[i], 0xAE9B11FF);
UpdateProgressBar(hungbar[i], i);
}
if(GetProgressBarValue(hungbar[i]) < 30)
{
SetProgressBarColor(hungbar[i], 0xAD6B12FF);
UpdateProgressBar(hungbar[i], i);
}
if(GetProgressBarValue(hungbar[i]) < 20)
{
SetProgressBarColor(hungbar[i], 0xAD3512FF);
UpdateProgressBar(hungbar[i], i);
}
if(GetProgressBarValue(hungbar[i]) < 10)
{
SetProgressBarColor(hungbar[i], 0xAE1111FF);
UpdateProgressBar(hungbar[i], i);
}
if(GetProgressBarValue(hungbar[i]) > 90)
{
SetProgressBarColor(hungbar[i], 0x48CD27FF);
UpdateProgressBar(hungbar[i], i);
}