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


Messages In This Thread
Can anybody help me please ? T_T - by Trynda - 07.05.2014, 11:41
Re: Can anybody help me please ? T_T - by Nathan_Taylor - 07.05.2014, 11:46
Re: Can anybody help me please ? T_T - by Trynda - 07.05.2014, 12:06

Forum Jump:


Users browsing this thread: 1 Guest(s)