Progress Bar problem - 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 problem (
/showthread.php?tid=488783)
Progress Bar problem -
PakPak - 19.01.2014
Hello,
I've a problem with my progress bar.
The first one doesn't work, any value have bar at each update it drops to 0, the other 2 are working properly.
(They are called every minutes with a timer)
pawn Code:
public DescendreFaim()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetProgressBarValue(hungry[i], GetProgressBarValue(hungry[i])-5.00);
UpdateProgressBar(hungry[i]);
PlayerInfo[i][pFaim] = GetProgressBarValue(hungry[i]);
}
}
public DescendreSoif()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetProgressBarValue(bladder[i], GetProgressBarValue(bladder[i])-5.00);
UpdateProgressBar(bladder[i]);
PlayerInfo[i][pSoif] = GetProgressBarValue(bladder[i]);
}
}
public DescendreEnergie()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetProgressBarValue(energy[i], GetProgressBarValue(energy[i])-5.00);
UpdateProgressBar(energy[i]);
PlayerInfo[i][pEnergie] = GetProgressBarValue(energy[i]);
}
}
Thanks in advance.
Re: Progress Bar problem -
Hansrutger - 19.01.2014
I assume you have forwarded them? If so, something is wrong with the other functions you use: "SetProgrssBar", "Get…" and "UpdateProgress…".
Re : Progress Bar problem -
PakPak - 19.01.2014
Yes I've forwarded them, the functions come from this include :
https://sampforum.blast.hk/showthread.php?tid=113443