Help with ProgressBar2
#3

Code:
CMD:bar(playerid,params[])
{
	SendClientMessage(playerid,COLOR_PINK,"Progress bar activated");
	Bar = CreatePlayerProgressBar(playerid, 375.879943, 160.166656, 100.0, 15.0, COLOR_GREEN, 100.0, BAR_DIRECTION_RIGHT);
   	SetTimerEx("CountBar", 1000, true, "i", playerid);
   	ShowPlayerProgressBar(playerid,Bar);
	return 1;
}

CMD:hbar(playerid,params[])
{
    SendClientMessage(playerid,COLOR_PINK,"Health bar activated");
	HealthBar = CreatePlayerProgressBar(playerid, 375.879943, 160.166656, 100.0, 15.0, COLOR_LIMEGREEN, 100.0, BAR_DIRECTION_RIGHT);
   	SetTimerEx("HBUpdate", 1000, true, "i", playerid);
   	ShowPlayerProgressBar(playerid,HealthBar);
   	return 1;
}

forward CountBar(playerid);
public CountBar(playerid)
{
	new Float:BarCount;
	SetPlayerProgressBarValue(playerid, Bar, BarCount);
	SetPlayerProgressBarColour(playerid, Bar, COLOR_RED);
	BarCount++;
	return 1;
}

forward HBUpdate(playerid);
public HBUpdate(playerid)
{
	GetPlayerHealth(playerid,health);
	SetPlayerProgressBarValue(playerid, HealthBar, health);
	SetPlayerProgressBarColour(playerid, HealthBar, COLOR_RED);
	return 1;
}
The /bar is not working as i want it to be and /hbar is working but it shows Limegreen color first then GREEN then RED,idk why it shows the GREEN color,i need help here please
Reply


Messages In This Thread
Help with ProgressBar2 - by Nabster - 12.03.2015, 12:10
Re: Help with ProgressBar2 - by LegendOfScripts - 12.03.2015, 12:52
Re: Help with ProgressBar2 - by Nabster - 12.03.2015, 16:14

Forum Jump:


Users browsing this thread: 1 Guest(s)