sn@!p
Умник
Добрый вечер, у меня такой вопрос
прописываю команду leaders, максимум показывает 2-х лидер, что не так ?
прописываю команду leaders, максимум показывает 2-х лидер, что не так ?
PHP:
CMD:leaders(playerid, params[])
{
new string[300], str[300], status_player[23], amount_player, status_player1[23];
foreach(new i: Player)
{
if(PlayerLogged[i] == false) continue;
if(PI[i][pLeader] > 0)
{
if(PI[i][pAFK] > 5) format(status_player, sizeof(status_player), "{ff6600}[на паузе]");
else format(status_player, sizeof(status_player), "{46CA00}[в игре]");
if(PI[i][pPhoneNumber] <= 1) format(status_player1, sizeof(status_player1), "{ff6600}Нет");
else format(status_player1, sizeof(status_player1), "{46CA00}%i", PI[i][pPhoneNumber]);
format(str, sizeof(str),"{ffcc00}Организация\t{ffcc00}Имя игрока\t{ffcc00}Статус\t{ffcc00}Телефон\n\n{FFFFFF}%s\t%s\t%s\t%s\t%s", Fraction_Name[PI[i][pLeader]], GetName(i), status_player, status_player1);
strcat(string, str);
amount_player++;
}
}
ShowPlayerDialogEx(playerid, 0000, DIALOG_STYLE_TABLIST_HEADERS, " ", string, "Закрыть", "");
format(string, 128, "Сейчас в сети {ffcc00}%i{ffffff} лидеров организаций", amount_player);
SendClientMessage(playerid, -1, string);
return 1;
}
