SA-MP Forums Archive
Problem Progres bar - 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: Problem Progres bar (/showthread.php?tid=652013)



Problem Progres bar - FxK1nG - 01.04.2018

Salut am o problema cu progress bar-ul doar admini il vad daca nu am admin, nu il vad la comanda /hud
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]);
		}
DialogȘ
Код:
		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: Problem Progres bar - Mugala - 01.04.2018

maybe in English?
you can use your local forum for your local community.
http://forum.sa-mp.com/forumdisplay.php?f=33