Can anybody help me please ? T_T
#1

When i type /members

instead of showing my ALL OF family member, it showing my name,



Код:
CMD:members(playerid, params[])

{
	if(IsPlayerConnected(playerid))

	{
	    new string[128];
	    new sendername[MAX_PLAYER_NAME];
		new teamnumber;
		if (PlayerInfo[playerid][pLeader] != 0) teamnumber = PlayerInfo[playerid][pLeader];
		else if (PlayerInfo[playerid][pFaction] != 0) teamnumber = PlayerInfo[playerid][pFaction];
		else if (PlayerInfo[playerid][pGang] != 255) teamnumber = PlayerInfo[playerid][pGang];
		else

		{
			SendClientMessage(playerid, COLOR_GRAD1, "You are not a member of an organization!");
			return 1;

		}
		SendClientMessage(playerid, 0x808000AA, "Members Online:");
		for(new i = 0; i < MAX_PLAYERS; i++)

		{
			if (IsPlayerConnected(i))

			{
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "");
				if(PlayerInfo[playerid][pLeader] || PlayerInfo[playerid][pFaction])

				{
					if (PlayerInfo[i][pLeader] == teamnumber)

					{
						format(string, sizeof(string), "%s (Leader)",sendername);

					}
					else if (PlayerInfo[i][pFaction] == teamnumber)

					{
						format(string, sizeof(string), "%s, Rank: %d.",sendername, PlayerInfo[i][pRank]);

					}

				}
				else if(PlayerInfo[playerid][pGang] != 255)

				{
					if (PlayerInfo[i][pGang] == teamnumber)

					{
						format(string, sizeof(string), "%s, Rank: %d.",sendername, PlayerInfo[i][pRank]);

					}

				}
				if (strlen(string) > 1) SendClientMessage(playerid, 0xF5DEB3AA, string);

			}

		}

	}
	return 1;

}
Reply
#2

the 27th line down, which is
pawn Код:
GetPlayerName(playerid, sendername, sizeof(sendername));
should be
pawn Код:
GetPlayerName(i, sendername, sizeof(sendername));
Shouldn't it?
Reply
#3

Quote:
Originally Posted by Nathan_Taylor
Посмотреть сообщение
the 27th line down, which is
pawn Код:
GetPlayerName(playerid, sendername, sizeof(sendername));
should be
pawn Код:
GetPlayerName(i, sendername, sizeof(sendername));
Shouldn't it?
Cheee! Your fuc**n COOL! THANKS BRO +REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)