SA-MP Forums Archive
[Help] Hide/Show Progressbar - 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: [Help] Hide/Show Progressbar (/showthread.php?tid=505549)



[Help] Hide/Show Progressbar - Elanggg - 09.04.2014

Код:
CMD:ss2(playerid,params[])
{
	if(GetPVarInt(playerid, "hungeronoff") == 0)
	{
		ShowProgressBarForPlayer(playerid, poop[playerid]);
		ShowProgressBarForPlayer(playerid, bladder[playerid]);
		TextDrawShowForPlayer(playerid, BSText[2]);
		TextDrawShowForPlayer(playerid, BSText[3]);
		SetPVarInt(playerid, "hungeronoff", 1);
	}
	else
	{
	    HideProgressBarForPlayer(playerid, poop[playerid]);
	    HideProgressBarForPlayer(playerid, bladder[playerid]);
		TextDrawHideForPlayer(playerid, BSText[2]);
		TextDrawHideForPlayer(playerid, BSText[3]);
		SetPVarInt(playerid, "hungeronoff", 0);
	}
	return 1;
}
why when I / SS2 textdraw just lost it? progressbar not lost.
please help me?


Re: [Help] Hide/Show Progressbar - Elanggg - 09.04.2014

no comment?


Re: [Help] Hide/Show Progressbar - SickAttack - 09.04.2014

If its not hiding that means "hungeronoff" isn't set to 1 or 2 or -1, etc. Its remaining on 0.


Re: [Help] Hide/Show Progressbar - Elanggg - 09.04.2014

thanks


Re: [Help] Hide/Show Progressbar - Pottus - 09.04.2014

Your using the wrong kind of progress bars as well that version is old you need per-player progress bars.

http://pastebin.com/Hpy4hb3k


Re: [Help] Hide/Show Progressbar - Elanggg - 09.04.2014

Okey, thanks