• Страница 1 из 1
  • 1
Модератор форума: AlexPPPP  
[C.M.D] Делаем команду /setskill
DrExtremДата: Вторник, 02.10.2012, 22:05 | Сообщение # 1
.::Offline::.
Разбойник
Сообщений: 34
[ 8 ]
Награды: 2

Статус отсутствует
Code
    else if(strcmp(cmd, "/setskill", true) == 0)  
     {  
         if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 5)  
          {  
             tmp = strtok(cmdtext, idx);  
             if(!strlen(tmp))  
                {  
                         SendClientMessage(playerid, COLOR_WHITE, "{F74848}» Введите:{FFFFFF} /setstat [id] [номер] [количество]");  
                         SendClientMessage(playerid, COLOR_GRAD4, "[1] SDPistol | [2] DesertEagle {3300FF}|[3] M4 | [4] M5 {CC3300}| [5] ShotGun | [6] AK-47");  
                         return true;  
             }  
               giveplayerid = ReturnUser(tmp);  
             if(IsPlayerConnected(giveplayerid))  
             {  
                 if(giveplayerid != INVALID_PLAYER_ID)  
                 {  
                     tmp = strtok(cmdtext, idx);  
                     if(!strlen(tmp))  
                     {  
                         SendClientMessage(playerid, COLOR_WHITE, "{F74848}» Введите:{FFFFFF} /setstat [id] [номер] [количество]");  
                         SendClientMessage(playerid, COLOR_GRAD4, "[1] SDPistol | [2] DesertEagle {3300FF}|[3] M4 | [4] M5 {CC3300}| [5] ShotGun | [6] AK-47");  
                         return true;  
                     }  
                     new stat;  
                     stat = strval(tmp);  
                     tmp = strtok(cmdtext, idx);  
                     if(!strlen(tmp))  
                     {  
                         SendClientMessage(playerid, COLOR_WHITE, "{F74848}» Введите:{FFFFFF} /setstat [id] [номер] [количество]");  
                         SendClientMessage(playerid, COLOR_GRAD4, "[1] SDPistol | [2] DesertEagle {3300FF}|[3] M4 | [4] M5 {CC3300}| [5] ShotGun | [6] AK-47");  
                         return true;  
                     }  
                     new amount;  
                     amount = strval(tmp);  
                     if (PlayerInfo[playerid][pAdmin] >= 5)  
                     {  
                         switch (stat)  
                         {  
                             case 1:  
                             {  
                    PlayerInfo[giveplayerid][pSDPistol] = amount;  
                    format(string, sizeof(string), "SDPistol: %d", amount);  
                             }  
                             case 2:  
                             {  
                    PlayerInfo[giveplayerid][pDesertEagle] = amount;  
                    format(string, sizeof(string), "DesertEagle: %d ", amount);  
                             }  
                    case 3:  
                             {  
                    PlayerInfo[giveplayerid][pM4] = amount;  
                    format(string, sizeof(string), "M4: %d ", amount);  
                             }  
                             case 4:  
                             {  
                    PlayerInfo[giveplayerid][pMP5] = amount;  
                    format(string, sizeof(string), " M5: %d", amount);  
                             }  
                             case 5:  
                             {  
                    PlayerInfo[giveplayerid][pShotGun] = amount;  
                    format(string, sizeof(string), "ShotGun: %d", amount);  
                             }  
                             case 6:  
                             {  
                    PlayerInfo[giveplayerid][pAK47] = amount;  
                    format(string, sizeof(string), "AK-47: %d", amount);  
                             }  
                    default:  
                             {  
                    format(string, sizeof(string), "[Ошибка]", amount);  
                             }  

                         }  
                         SendClientMessage(playerid, COLOR_GRAD1, string);  
                     }  
                     else  
                     {  
                         SendClientMessage(playerid, COLOR_GRAD1, "Нет прав доступа!");  
                     }  
                     OnPlayerUpdateRL(playerid);  
                 }//not valid id  
             }//not connected  
         }  
         return true;  
     }
 
  • Страница 1 из 1
  • 1
Поиск:


Copyright www.SAMP-TEAM.com (c) 2009-2024
Правила использования материалов сайта

При копировании материалов из нашего сайта
ссылка на www.SAMP-TEAM.com обязательна!
Нарушители правил будут строго наказаны!

Хостинг от uCoz   
Для корректного просмотра мы рекомендуем Вам использовать браузер Google Chrome.
Яндекс.Метрика