Привет, Гость!
  • Страница 1 из 1
  • 1
Форум pawno » Pawno » Готовые команды » /a по рангамм (Админ чат по рангам.)
/a по рангамм
BicbaiДата: Понедельник, 29.10.2012, 03:15 | Сообщение # 1
Полковник
Группа: Администратор
Сообщений: 288
Статус: Offline
Ко всем forward

Code
forward SendAdminMessage(color, string[]);


это в конец мода можно
Code
public SendAdminMessage(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1)
{
SendClientMessage(i, color, string);
}
}
}
}


Code
if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)      
         {      
             if(IsPlayerConnected(playerid))      
             {      
                 GetPlayerName(playerid, sendername, sizeof(sendername));      
                 new length = strlen(cmdtext);      
                 while ((idx < length) && (cmdtext[idx] <= ' '))      
                 {      
                     idx++;      
                 }      
                 new offset = idx;      
                 new result[64];      
                 while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))      
                 {      
                     result[idx - offset] = cmdtext[idx];      
                     idx++;      
                 }      
                 result[idx - offset] = EOS;      
                 if(!strlen(result))      
                 {      
                     SendClientMessage(playerid, COLOR_GREEN, "Вводите: (/a)dmin [чат]");      
                     return 1;      
                 }      

                 new arank[64];      
                 if(PlayerInfo[playerid][pAdmin] == 1) { arank = "{bef574}Помошник Модератора"; }      
                 else if(PlayerInfo[playerid][pAdmin] == 2) { arank = "{5da130}Мл.Модератор"; }      
                 else if(PlayerInfo[playerid][pAdmin] == 3) { arank = "{ff0033}Модератор"; }      
                 else if(PlayerInfo[playerid][pAdmin] == 4) { arank = "{ff0033}Гл.Модератор"; }      
                 else if(PlayerInfo[playerid][pAdmin] == 5) { arank = "{FFA500}Помошник Адм."; }      
                 else if(PlayerInfo[playerid][pAdmin] == 6) { arank = "{ff0033}Администратор"; }      
                 else if(PlayerInfo[playerid][pAdmin] == 7) { arank = "{ff0033}Рп Админ"; }      
                 else if(PlayerInfo[playerid][pAdmin] == 8) { arank = "{FFA500}Гл.Пиарщик"; }      
                 else if(PlayerInfo[playerid][pAdmin] == 9) { arank = "{ff0033}Вебмастер"; }      
                 else if(PlayerInfo[playerid][pAdmin] == 10) { arank = "{ff0033}Скриптёр"; }      
                 else if(PlayerInfo[playerid][pAdmin] == 11) { arank = "{ff0033}Зам.Гл Админа"; }      
                 else if(PlayerInfo[playerid][pAdmin] == 12) { arank = "{FFA500}Гл.Админ"; }      
                 else { arank = "Модератор"; }      

                 format(string, sizeof(string), "* %s {7fff00}%s  %s", arank, sendername, result);      
                 if (PlayerInfo[playerid][pAdmin] >= 1)      
                 {      
                     SendAdminMessage(COLOR_RED, string);      
                 }      
                 //printf("Администратор %s: %s", sendername, result);      
             }      
             return 1;      
         }
 
Форум pawno » Pawno » Готовые команды » /a по рангамм (Админ чат по рангам.)
  • Страница 1 из 1
  • 1
Поиск: