/aduty c Текстом Над Админом

Description: Готовые команды
Moderator: SJplayer

Romchik
Topic author, Ефрейтор
Ефрейтор
Avatar
Romchik
Topic author, Ефрейтор
Ефрейтор
Posts: 20
Joined: 12 May 2013
With us: 11 years 4 months

#1by Romchik » 12 May 2013, 15:24

Ко Всем new

Code: Select all

new AdminDuty[MAX_PLAYERS];
new Text3D:label[MAX_PLAYERS];


В enum pInfo

Code: Select all

pAdminduty,


В комманды

Code: Select all

if(!strcmp(cmdtext, "/aduty", true))
 {
  if(IsPlayerConnected(playerid))
  {
      if(gPlayerLogged[playerid] == 0)
      {
          SendClientMessage(playerid, COLOR_GREY, "С начало нужно войти");
    return 1;
      }
     if(PlayerInfo[playerid][pAdmin] >= 3)
     {
     if(AdminDuty[playerid] == 0)
     {
     AdminDuty[playerid] = 1;
     SetPlayerArmour(playerid, 999);
     SetPlayerHealth(playerid, 999);
     new PlayerName[30];
     new str[256];
     GetPlayerName(playerid, PlayerName, 30);
        format(str, 256, "[ID:%d] %s выходит на админ-дежурство", playerid, PlayerName);
        SetPlayerSkin(playerid,294);
        SetPlayerColor(playerid, 0xF60000F6);
        label[playerid] = Create3DTextLabel("Администратор на дежурстве\nНе стрелять!",0xFF0000FF,0,0,0,40,0,2);
        Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.4);
                    GivePlayerWeapon(playerid, 31, 10001);
                    GivePlayerWeapon(playerid, 9, 1);
                    GivePlayerWeapon(playerid, 24, 10000);
             SendClientMessageToAll(COLOR_RED, str);
     return 1;
          }
          else if(AdminDuty[playerid] == 1)
          {
      AdminDuty[playerid] = 0;
     new PlayerName[30];
     GetPlayerName(playerid, PlayerName, 30);
     SendClientMessage(playerid, COLOR_YELLOW," Вы ушли с админ-дежурства.");
     SetPlayerColor(playerid, 0xFFFFFFAA);
     Delete3DTextLabel(label[playerid]);
     SetPlayerSkin(playerid, PlayerInfo[playerid][pChar]);
     GivePlayerWeapon(playerid, 1, 1);
     SetPlayerColor(playerid,TEAM_HIT_COLOR);
     return 1;
          }
      }
      else
      
{
          SendClientMessage(playerid, COLOR_GREY, "Вы не Модератор");
          return 1;
      }
  }
     return 1;
 }


Return to “Команды”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest