SA-MP Forums Archive
comando /membros - 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: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: comando /membros (/showthread.php?tid=119879)



comando /membros - xolp25 - 09.01.2010

cm td mundo sabe eu andei editando o gf e talz + algm me ensina a fase um cmd assim para tipo

Membro da pm ve todos os membro da pm
MEMBRO DOS HIT VE TODOS ....


Re: comando /membros - Guilherme_Canani - 09.01.2010

Code:
	if(strcmp(cmd,"/Membros",true)==0)
	{
   if(IsPlayerConnected(playerid))
	  {
			new teamnumber;
			if (PlayerInfo[playerid][pLider] != 0) teamnumber = PlayerInfo[playerid][pLider];
			else if (PlayerInfo[playerid][pMembro] != 0) teamnumber = PlayerInfo[playerid][pMembro];
			else
			{
				SendClientMessage(playerid,COLOR_GRAD1,"Voce nгo й Membro de uma Equipe!");
				return 1;
			}
	  	SendClientMessage(playerid,COLOR_YELLOW2,"Membros:");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if (IsPlayerConnected(i))
				{
					GetPlayerName(i,sendername,sizeof(sendername));
					format(string,sizeof(string),"");
					if (PlayerInfo[i][pLider] == teamnumber) format(string,sizeof(string),"%s [CHEFE]",sendername);
					else if (PlayerInfo[i][pMembro] == teamnumber) format(string,sizeof(string),"%s,Cargo: [%d].",sendername,PlayerInfo[i][pCargo]);
					if (strlen(string) > 1) SendClientMessage(playerid,COLOR_WHITE,string);
				}
			}
		}
		return 1;
	}