Progress.inc
Letöltés! Bõvebb leírás:
Katt!Zcmd.inc
Letöltés!
#include <a_samp>
#include <zcmd>
#include <progress>
new Bar:bar, BarTimer[MAX_PLAYERS];
CMD:bartest(playerid, params[])
{
bar = CreateProgressBar(268.00, 222.00, 102.50, 8.50, 0xB60000FF, 59);
ShowProgressBarForPlayer(playerid, bar);
UpdateBar(playerid);
return 1;
}
forward UpdateBar(playerid);
public UpdateBar(playerid)
{
if(GetProgressBarValue(bar) < 59)
{
BarTimer[playerid] = SetTimerEx(\"UpdateBar\", 1000, false, \"i\", playerid);
SetProgressBarValue(bar, GetProgressBarValue(bar) +1 );
UpdateProgressBar(bar, playerid);
}
else if(GetProgressBarValue(bar) == 59)
{
HideProgressBarForPlayer(playerid, bar);
SetProgressBarValue(bar, 0);
KillTimer(BarTimer[playerid]);
}
return 1;
}