SA-MP Forums Archive
Problema progres bar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Română/Romanian (https://sampforum.blast.hk/forumdisplay.php?fid=40)
+---- Thread: Problema progres bar (/showthread.php?tid=652022)



Problema progres bar - FxK1nG - 01.04.2018

Salut, nustiu de ce progres bar-ul arata doar la admini, ma puteti ajuta>
Cod sursa:
Code:
		if(PlayerInfo[playerid][pHUD5] == 1) {
			new expamount;
		    expamount = PlayerInfo[playerid][pLevel]*levelexp;
		    format(GlobalString, sizeof(GlobalString), "Level: %d / RP: %d/%d", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pExp], expamount);
		    PlayerTextDrawSetString(playerid, HudTD, GlobalString);
			PlayerTextDrawShow(playerid, HudTD);
			SetPlayerProgressBarMaxValue(playerid, HudProgress[playerid], PlayerInfo[playerid][pLevel]*levelexp);
			SetPlayerProgressBarValue(playerid, HudProgress[playerid], PlayerInfo[playerid][pExp]);
			ShowPlayerProgressBar(playerid, HudProgress[playerid]);
		}
		if(PlayerInfo[playerid][pHUD5] == 0) {
			new expamount;
		    expamount = PlayerInfo[playerid][pLevel]*levelexp;
		    format(GlobalString, sizeof(GlobalString), "Level: %d / RP: %d/%d", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pExp], expamount);
		    PlayerTextDrawSetString(playerid, HudTD, GlobalString);
			PlayerTextDrawShow(playerid, HudTD);
			PlayerTextDrawHide(playerid, HudTD);
			SetPlayerProgressBarMaxValue(playerid, HudProgress[playerid], PlayerInfo[playerid][pLevel]*levelexp);
			SetPlayerProgressBarValue(playerid, HudProgress[playerid], PlayerInfo[playerid][pExp]);
			ShowPlayerProgressBar(playerid, HudProgress[playerid]);
			HidePlayerProgressBar(playerid, HudProgress[playerid]);
		}
Si
Code:
		case DIALOG_HUD5: {
		    if(response)
			{
			    if(listitem == 0)
			    {
			        PlayerInfo[playerid][pHUD5] = 0;
					PlayerTextDrawHide(playerid, HudTD);
			        HidePlayerProgressBar(playerid, HudProgress[playerid]);
				}
				if(listitem == 1)
				{
				    PlayerInfo[playerid][pHUD5] = 1;
				}
				Update(playerid, pHUD5x);
	      		SendClientMessage(playerid, COLOR_DARKPINK, "Progress-Bar options updated!"); }
		}



Re: Problema progres bar - FxK1nG - 02.04.2018

up cineva ?


Re: Problema progres bar - ForCop - 05.04.2018

Quote:
Originally Posted by FxK1nG
View Post
up cineva ?
nu vad nimic aici, care la admini sau la in simplu player sa fie aratate "progres bar"

poate e problema in functia SetPlayerProgressBarMaxValue, SetPlayerProgressBarValue, ShowPlayerProgressBar sau Update(playerid, pHUD5x)


Re: Problema progres bar - FxK1nG - 13.04.2018

Code:
function OnPlayerUpdates(playerid) {
	new string[45];
	if(PlayerInfo[playerid][pHUD4] == 1) {
		new expamount;
	    expamount = PlayerInfo[playerid][pLevel]*levelexp;
	    format(string, sizeof(string), "Level: %d / RP: %d/%d", PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pExp], expamount);
	    PlayerTextDrawSetString(playerid, HudTD, string);
		PlayerTextDrawShow(playerid, HudTD);
		SetPlayerProgressBarMaxValue(playerid, HudProgress[playerid], PlayerInfo[playerid][pLevel]*levelexp);
		SetPlayerProgressBarValue(playerid, HudProgress[playerid], PlayerInfo[playerid][pExp]);
		ShowPlayerProgressBar(playerid, HudProgress[playerid]);
	}
	return 1; }