30.09.2015, 16:33
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.
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; }