Jump to content
  • 0

Problema /viplist


[XSR]NexT

Question

Salut!

Deci am o problema suntem mai multi vipi pe server si cand folosesc /viplist ma vad doar pe mine :| de ce?

Ce am gresit!

Cmd:

dcmd_viplist(playerid,params[])
{
	#pragma unused params
	if(AccInfo[playerid][LoggedIn] == 1)
	{
	 	new bool:First2 = false;
 		new CountVL, i,string[128];
		new adminname[MAX_PLAYER_NAME];
		new pName2[MAX_PLAYER_NAME];
	   	GetPlayerName(playerid, pName2, sizeof(pName2));

		for(i = 0; i < MAX_PLAYERS; i++){ if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0) CountVL++; }

		if(CountVL == 0) return SendClientMessage(playerid,red, "No players have VIP Account!");
		for(i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
			{
				if(AccInfo[i][pVip] > 1)
				{
					switch(AccInfo[i][pVip])
	    			{
						case 1: AccType = "Silver";
						case 2: AccType = "Gold";
						case 3: AccType = "Premium";
					}
				}
	 			GetPlayerName(i, adminname, sizeof(adminname));
				if(!First2)
				{
					format(string, sizeof(string),"Vips {FC0303}: {00CEFC}%s", pName2);

					First2 = true;
				}
				else format(string,sizeof(string),"%s",string,pName2);
    		}
		}
  		return SendClientMessage(playerid,green,string);
	}
	else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}

35012l1.png.aee1a3398b9bd9f8eec50574d2cd

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

ia vezi asa...

dcmd_viplist(playerid,params[])
{
	#pragma unused params
	if(AccInfo[playerid][LoggedIn] == 1)
	{
	 	new bool:First2 = false;
 		new CountVL, i,string[128];
		new adminname[MAX_PLAYER_NAME];
		new pName2[MAX_PLAYER_NAME];
	   	GetPlayerName(playerid, pName2, sizeof(pName2));

		for(i = 0; i < MAX_PLAYERS; i++){ if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0) CountVL++; }

		if(CountVL == 0) return SendClientMessage(playerid,red, "No players have VIP Account!");
		for(i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
			{
				if(AccInfo[i][pVip] >= 1)
				{
					switch(AccInfo[i][pVip])
	    			{
						case 1: AccType = "Silver";
						case 2: AccType = "Gold";
						case 3: AccType = "Premium";
					}
				}
	 			GetPlayerName(i, adminname, sizeof(adminname));
				if(!First2)
				{
					format(string, sizeof(string),"Vips {FC0303}: {00CEFC}%s", adminname);

					First2 = true;
				}
				else format(string,sizeof(string),"%s",adminname);
    		}
		}
  		return SendClientMessage(playerid,green,string);
	}
	else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}

nu am testat dar probabil asa e bn :)

tLYRl.gif
Link to comment
Share on other sites

dcmd_viplist(playerid,params[])
{
	#pragma unused params
	if(AccInfo[playerid][LoggedIn] == 1)
	{
	 	new bool:First2 = false;
 		new CountVL, i,string[128];
		new pName2[MAX_PLAYER_NAME];

		for(i = 0; i < MAX_PLAYERS; i++){ if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0) CountVL++; }

		if(CountVL == 0) return SendClientMessage(playerid,red, "No players have VIP Account!");
		for(i = 0; i < MAX_PLAYERS; i++)
		{
			if(IsPlayerConnected(i) && AccInfo[i][pVip] > 0)
			{
	 			GetPlayerName(i, pName2, sizeof(pName2));
				if(!First2)
				{
					format(string, sizeof(string),"Vips {FC0303}: {00CEFC}%s", pName2);

					First2 = true;
				}
				else format(string,sizeof(string),"%s",pName2);
    		}
		}
  		return SendClientMessage(playerid,green,string);
	}
	else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}

ia vezi asa :) nu are cum sa nu mearga ...

tLYRl.gif
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.