VIPS Bug [rep+]
#1

Hello, when i write /vips, its show (Nickname and admin level instead of vip level) here is my vip and admins command:
Код:
CMD:vips(playerid,params[])
{
	new bool:First2 = false;
	new Count, i;
	new string[1024];
	new adminname[MAX_PLAYER_NAME];
	for(i = 0; i < MAX_PLAYERS; i++)
	if(IsPlayerConnected(i) && pInfo[i][Vip] > 0)
	Count++;


	if(Count == 0)
	return ShowPlayerDialog(playerid,9000,DIALOG_STYLE_MSGBOX,"Vips Online","{FF0000}No VIPS Online, Try to donate your self.","Ok","Back");

	for(i = 0; i < MAX_PLAYERS; i++)

	if(IsPlayerConnected(i) && pInfo[i][Vip] > 0)
	{
		switch(pInfo[i][Vip])
		{
			case 1: pVRank = "FREE";
			case 2: pVRank = "Donator";
			case 3: pVRank = "Silver";
			case 4: pVRank = "Gold";
			case 5: pVRank = "CO-Gold";
			case 6: pVRank = "Head Donator";
		}
		GetPlayerName(i, adminname, sizeof(adminname));
		if(!First2)
		{
			format(string, sizeof(string), "{FFFF00}|_________________VIPS Online_________________|{FFFFFF}\n{FFFF00}%s (ID %d)\t{FFFFFF}[%s]", pName(i),i,pARank);
			First2 = true;
		}
		else format(string,sizeof(string),"%s\n{F11100}%s (ID %d)\t{FFFFFF}[%s]",string,pName(i),i,pARank);
	}
	return ShowPlayerDialog(playerid,9001,DIALOG_STYLE_MSGBOX,"Vips Online",string,"Ok","Back");
}
admins command:
Код:
CMD:admins(playerid,params[])
{
	new bool:First2 = false;
	new Count, i;
	new string[1024];
	new adminname[MAX_PLAYER_NAME];
	for(i = 0; i < MAX_PLAYERS; i++)
	if(IsPlayerConnected(i) && pInfo[i][Admin] > 0 && pInfo[i][Hide] == 0)
	Count++;


	if(Count == 0)
	return ShowPlayerDialog(playerid,9000,DIALOG_STYLE_MSGBOX,"Admins Online","{FF0000}No Admins Online!","Ok","");

	for(i = 0; i < MAX_PLAYERS; i++)

	if(IsPlayerConnected(i) && pInfo[i][Admin] > 0 && pInfo[i][Hide] == 0)
	{
		if(IsPlayerAdmin(i))
		{
	 		pARank = "RCON Manager";
		}
		else if (pInfo[i][Admin] > 0)
		{
			switch(pInfo[i][Admin])
			{
				case 1: pARank = "Admin Level 1";
				case 2: pARank = "Admin Level 2";
				case 3: pARank = "Admin Level 3";
				case 4: pARank = "Admin Level 4";
				case 5: pARank = "Admin Level 5";
				case 6: pARank = "Admin Level 6";
			}
		}
		GetPlayerName(i, adminname, sizeof(adminname));
		if(!First2)
		{
			format(string, sizeof(string), "{FF0000}|_________________{FFFFFF}Admins Online{FF0000}_________________|\n{F11100}%s (ID %d)\t{FFFFFF}[%s]", pName(i),i,pARank);
			First2 = true;
		}
		else format(string,sizeof(string),"%s\n{F11100}%s (ID %d)\t{FFFFFF}[%s]",string,pName(i),i,pARank);
	}
	return ShowPlayerDialog(playerid,9000,DIALOG_STYLE_MSGBOX,"Admins Online",string,"Ok","Back");
}
Reply
#2

Becuase pArank is for admin and pVrank is for vip and in vip dialog u have added pArank change it to pvRank

pawn Код:
format(string, sizeof(string), "{FFFF00}|_________________VIPS Online_________________|{FFFFFF}\n{FFFF00}%s (ID %d)\t{FFFFFF}[%s]", pName(i),i,pARank);
Reply
#3

EDIT: Double Post.
Reply
#4

Thanks brother .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)