Digital548
Новичок
Помогите разобраться с командой /leaders , дело в том что у меня в моде нету этой команды и решил сам сделать её. Всё работает , но когда вхожу на сервер пишу /leaders и ничего не появляется.
Вот Код:
Что нужно добавить чтобы команда на сервере работала. Помогите пожалуйста.
Вот Код:
PHP:
if(strcmp(cmd, "/leaders", true) == 0)
{
string[12] = 12;
for(new i=0;i<MAX_PLAYERS;i++)
{
new ttext[300];
if(!IsPlayerConnected(i) || IsPlayerNPC(i)) continue;
if(PINFO[i][pLeader] <= 0) continue;
{
if(PINFO[i][pLeader] == 1) { ttext = "LSPD"; }
else if(PINFO[i][pLeader] == 2) { ttext = "ФБР"; }
else if(PINFO[i][pLeader] == 3) { ttext = "Армия: Авианосец"; }
else if(PINFO[i][pLeader] == 4) { ttext = "Байкеры"; }
else if(PINFO[i][pLeader] == 5) { ttext = "La Cosa Nostra"; }
else if(PINFO[i][pLeader] == 6) { ttext = "Yakuza"; }
else if(PINFO[i][pLeader] == 7) { ttext = "Мэрия"; }
else if(PINFO[i][pLeader] == 8) { ttext = "Casino Rich"; }
else if(PINFO[i][pLeader] == 9) { ttext = "SF NEWS"; }
else if(PINFO[i][pLeader] == 10) { ttext = "SFPD"; }
else if(PINFO[i][pLeader] == 11) { ttext = "Инструкторы"; }
else if(PINFO[i][pLeader] == 12) { ttext = "The Ballas"; }
else if(PINFO[i][pLeader] == 13) { ttext = "The Los Santos Vagos"; }
else if(PINFO[i][pLeader] == 14) { ttext = "Русская мафия"; }
else if(PINFO[i][pLeader] == 15) { ttext = "The Groove Street"; }
else if(PINFO[i][pLeader] == 17) { ttext = "The Varios Los Aztecas"; }
else if(PINFO[i][pLeader] == 18) { ttext = "The San Fierro Rifa"; }
else if(PINFO[i][pLeader] == 19) { ttext = "Армия: Зона 51"; }
else if(PINFO[i][pLeader] == 20) { ttext = "LVPD"; }
else if(PINFO[i][pLeader] == 21) { ttext = "МЧС Лос Сантос"; }
}
new sendername[MAX_PLAYER_NAME];
GetPlayerName(i, sendername, sizeof(sendername));
format(string,sizeof(string),"%s%s: %s[%d]\n",string,ttext,sendername,i);
}
ShowPlayerDialog(playerid,1051, DIALOG_STYLE_MSGBOX, "Лидеры Онлайн:", string, "Закрыть", "");
return 1;
}
