Gressie
Мастер
PHP:
if(strcmp(cmd, "/warnlist", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_RED, "Вы не уполномочены использовать эту команду!");
if (dostup[playerid] != 1) return true;
new countmute = 0, w_List[64];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pWarns] >= 1 && IsPlayerConnected(i))
{
GetPlayerName(i, sendername, sizeof(sendername));
format(w_List, 64, "%s [ID: %d] | Варнов: %d\n", sendername, i,PlayerInfo[i][pWarns]);
countmute++;
strcat(string, w_List);
}
ShowPlayerDialog(playerid, 1580, DIALOG_STYLE_MSGBOX, "Warn List", string, "Закрыть", " ");
}
if(countmute == 0) SendClientMessage(playerid, COLOR_GRAD1, "Нет игроков с Варнами");
else
{
format(string, sizeof(string), "Всего: %d человек!", countmute);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
PHP:
if (strcmp(cmd, "/mutelist", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_RED, "Вы не уполномочены использовать эту команду!");
if (dostup[playerid] != 1) return true;
new countmute = 0, m_List[64];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pMuted] == 1 && IsPlayerConnected(i))
{
GetPlayerName(i, sendername, sizeof(sendername));
format(m_List, 64, "%s [ID: %d] | %d секунд\n", sendername, i,PlayerInfo[i][pMuteTime]);
countmute++;
strcat(string, m_List);
}
ShowPlayerDialog(playerid, 1599, DIALOG_STYLE_MSGBOX, "Mute List", string, "Закрыть", " ");
}
if(countmute == 0) SendClientMessage(playerid, COLOR_GRAD1, "Нет игроков с баном чата");
else
{
format(string, sizeof(string), "Всего: %d человек!", countmute);
SendClientMessage(playerid, COLOR_ISPOLZUY, string);
}
}
Последнее редактирование:
