Members command problem
#1

I have problem with command, when i type /members it show me first player rank,then who are the leader.
I want command showing me first who are the leader then which player is rank.

Код:
CMD:members(playerid, params[])
{
	new stringer[213];
	new teamnumber;
	if (PlayerInfo[playerid][pLeader] != 0)
	{
		teamnumber = PlayerInfo[playerid][pLeader];
	}
	else if (PlayerInfo[playerid][pMember] != 0)
	{
		teamnumber = PlayerInfo[playerid][pMember];
	}
	else
	{
		return SendClientMessage(playerid, COLOR_GRAD1, "Вы ни где не состоите!");
	}
	SendClientMessage(playerid, 0x059BD3AA, "Члены организации Online:");
	new countmute = 0;
	foreach(new i : Player)
	{
		if ((PlayerInfo[i][pMember] == teamnumber) && IsPlayerConnected(i))
		{
			format(stringer, sizeof(stringer), "");
			countmute++;
			if (PlayerInfo[i][pLeader] == teamnumber)
			{
				format(stringer, sizeof(stringer), "[%d] %s ранг: Лидер {FFFFFF}", i, NamePlayer[i]);
			}
			else if (PlayerInfo[i][pMember] == teamnumber)
			{
				format(stringer, sizeof(stringer), "[%d] %s ранг: %d {FFFFFF}", i, NamePlayer[i], PlayerInfo[i][pRank]);
			}
			if (strlen(stringer) > 1)
			{
				SendClientMessage(playerid, 0xC0E1EEFF, stringer);
			}
		}
	}
	if (countmute == 0)
	{
		SendClientMessage(playerid, COLOR_GRAY, "Нет игроков");
	}
	else
	{
		SendMes(playerid, COLOR_YELLOW, "Всего: %d человек", countmute);
	}
	return true;
}
Reply


Messages In This Thread
Members command problem - by bigboy81 - 30.09.2015, 16:33
Re: Members command problem - by jihadmeneer - 30.09.2015, 20:55
Re: Members command problem - by bigboy81 - 30.09.2015, 22:20
Re: Members command problem - by PrO.GameR - 30.09.2015, 22:34
Re: Members command problem - by bigboy81 - 30.09.2015, 23:31
Re: Members command problem - by Sew_Sumi - 01.10.2015, 00:44
Re: Members command problem - by MD5 - 01.10.2015, 01:11
Re: Members command problem - by PrO.GameR - 01.10.2015, 09:16
Re: Members command problem - by bigboy81 - 01.10.2015, 11:01
Re: Members command problem - by Sew_Sumi - 01.10.2015, 15:24

Forum Jump:


Users browsing this thread: 1 Guest(s)