Привет, Гость!
  • Страница 1 из 1
  • 1
Форум pawno » Pawno » Готовые команды » /pban Перманентный бан
/pban Перманентный бан
BicbaiДата: Вторник, 25.12.2012, 22:25 | Сообщение # 1
Полковник
Группа: Администратор
Сообщений: 288
Статус: Offline
Код
if(strcmp(cmd, "/pban", true) == 0)
      {
          if(IsPlayerConnected(playerid))
          {
              tmp = strtok(cmdtext, idx);
              if(!strlen(tmp))
              {
                  SendClientMessage(playerid, COLOR_GREEN, "[DM DRIFT] {FFFFFF}/ban [Ид/ИмяИгрока] [Причина]");
                  return 1;
              }
              giveplayerid = ReturnUser(tmp);
              if (PlayerInfo[playerid] [pAdmin]>= 3)
              {
                  if(IsPlayerConnected(giveplayerid))
                  {
                      if(giveplayerid != INVALID_PLAYER_ID)
                      {
                          GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                          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, "[DM DRIFT] {FFFFFF}/pban [playerid/PartOfName] [Причина]");
                    return 1;
                          }
                          new year, month,day;
                          getdate(year, month, day);
                          format(string, sizeof(string), "%s был забанен администратором %s, причина: %s (%d.%d.%d)", giveplayer, sendername, (result),day,month,year);
                          if(GetPlayerScore(playerid) == 1)
                          {
                    format(string, sizeof(string), "%s был забанен администратором %s, причина: %s", giveplayer, sendername, (result));
                          }
                          else if(GetPlayerScore(playerid) == 2)
                          {
                    format(string, sizeof(string), "%s была забанена администратором %s, причина: %s", giveplayer, sendername, (result));
                          }
                          SendClientMessageToAll(COLOR_GRAD2, string);
//_________________________________________________________________________________
                          new coordsstring1[512];
                          new msg1[] = "{1560bd}•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••\n\n\t{ff8800}Имя: {FFFFFF}%s\n\t{ff8800}Забанил(а): {FFFFFF}%s\n\t{ff8800}Дата бана: {FFFFFF}(%d.%d.%d)\n\t{ff8800}Причина: {FFFFFF}%s\n\t{ff8800}Сайт: {FFFFFF}DJ-Sergey.ucoz.net\n\n{1560bd}••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••";
                          format(coordsstring1, sizeof coordsstring1, msg1, giveplayer,sendername,day,month,year,result);
                          ShowPlayerDialog(giveplayerid,80,DIALOG_STYLE_MSGBOX,"Блокировка аккаунта",coordsstring1,"Выход","");
//___________________________________________________________________________
                          BanEx(giveplayerid,string);
                          return 1;
                      }
                  }
              }
              else
              {
                  format(string, sizeof(string), "Недостаточно прав для использования команды.");
                  SendClientMessage(playerid, COLOR_GRAD2, string);
              }
          }
          return 1;
       }


IP: 83.222.105.54:8358
© [CRMP] Россия - Дрифт
 
Форум pawno » Pawno » Готовые команды » /pban Перманентный бан
  • Страница 1 из 1
  • 1
Поиск: