Привет, Гость!
  • Страница 1 из 1
  • 1
Как сделать "Щит"
AdminДата: Вторник, 16.02.2016, 16:51 | Сообщение # 1
Генерал-майор
Группа: Администраторы
Сообщений: 272
Репутация: 0
Статус: Offline
Нужно ко всем "new" добавляем
Код
new shield[MAX_PLAYERS];

Далее в public OnPlayerConnect(playerid)
Код
shield [playerid]= 0;

Далее в public OnPlayerCommandText(playerid, cmdtext[])
Код
if(strcmp(cmd, "/shield", true) == 0)   
     {   
         if(IsPlayerConnected(playerid))   
         {   
             if(shield [playerid]== 0)   
             {   
                 SetPlayerAttachedObject(playerid, 1, 18637, 14, 0.0, 0.0, 0.0, 0.0, 180.0, 180.0);   
         SetPlayerHealth(playerid, 999);   
         shield [playerid]= 1;   
       }   
       else   
       {   
           RemovePlayerAttachedObject(playerid, 1);   
           SetPlayerHealth(playerid, 50);   
           shield [playerid]= 0;   
       }   
      }   
      return 1;   
     }

Автор: Неизвестен
 
  • Страница 1 из 1
  • 1
Поиск: