[ Новые сообщения · Участники · Правила форума · Поиск · RSS ]
  • Страница 1 из 1
  • 1
/invite (нужна помощь)
Дата: 13.11.2010, Суббота, 17:40:56 | Сообщение # $NUMBER
Группа: Проверенные
Сообщений: 112
Репутация: 14+
У меня есть небольшая проблема с /invite.Когда каково-то игрока снимаешь с лидера,а потом пытаешся принять во фракцию,пишет вот такой бред.
"Этот игрок в текущем розыске / меняет команду / Или готов к поступлению в банду. "

Вот код.Помогите

Code
    if(strcmp(cmd, "/invite", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       {
     tmp = strtok(cmdtext, idx);
     if(!strlen(tmp))
     {
      SendClientMessage(playerid, COLOR_GRAD2, "*Èñïîëüçóéòå: /invite [id èãðîêà/÷àñòü íèêà]");
      return 1;
     }
     new para1;
     new ftext[20];
     para1 = ReturnUser(tmp);
     if (PlayerInfo[playerid][pLeader] >= 1)
     {
         if(IsPlayerConnected(para1))
         {
             if(para1 != INVALID_PLAYER_ID)
             {
           if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
           {
               if(PlayerInfo[para1][pJob] > 0)
               {
                   SendClientMessage(playerid, COLOR_RED, "** Íåëüçÿ ïðèãëàñèòü èãðîêà îí íà ðàáîòå !");
                   return 1;
               }
               if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Police Force"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }
               else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI/ATF"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
               else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "National Guard"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
               else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Firemen/Ambulance"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
               else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 120); }
               else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 120; SetPlayerSkin(para1, 258); }
               else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Prisedent"; ChosenSkin[para1] = 164; SetPlayerSkin(para1, 166); }
               else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Hitman Agency"; ChosenSkin[para1] = 127; SetPlayerSkin(para1, 127); }
               else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "CNN Studio"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
               else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Cab Company"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
               else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "School Instructors"; ChosenSkin[para1] = 59; SetPlayerSkin(para1, 59); }
               else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 5; ftext = "Street Race"; ChosenSkin[para1] = 29; SetPlayerSkin(para1, 29); }
               else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 5; ftext = "West Side Groove"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 107); }
               else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 5; ftext = "Mara Salvatrucha 13"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 116); }
               else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Latin Kings"; ChosenSkin[para1] = 108; SetPlayerSkin(para1, 108); }
                else if(PlayerInfo[playerid][pLeader] == 19) { PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 19; ftext = "San Fiero Rifa"; ChosenSkin[para1] = 174; SetPlayerSkin(para1, 174); }
               else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 5; ftext = "East Side Ballas"; ChosenSkin[para1] = 102; SetPlayerSkin(para1, 103); }
               else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 5; ftext = "Flaming Cobra"; ChosenSkin[para1] = 247; SetPlayerSkin(para1, 248); }
               else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 5; ftext = "Triads"; ChosenSkin[para1] = 118; SetPlayerSkin(para1, 120); }
               else if(PlayerInfo[playerid][pLeader] == 20) { PlayerInfo[para1][pTeam] = 21; gTeam[para1] = 21; ftext = "Russian Mafia"; ChosenSkin[para1] = 112; SetPlayerSkin(para1, 112); }
               else if(PlayerInfo[playerid][pLeader] == 21) { PlayerInfo[para1][pTeam] = 96; gTeam[para1] = 96; ftext = "Parkour"; ChosenSkin[para1] = 96; SetPlayerSkin(para1, 96); }
                    else if(PlayerInfo[playerid][pLeader] == 143) { PlayerInfo[para1][pTeam] = 294; gTeam[para1] = 294; ftext = "Adminisracia"; ChosenSkin[para1] = 294; SetPlayerSkin(para1, 294); }
                    else if(PlayerInfo[playerid][pLeader] == 23) { PlayerInfo[para1][pTeam] = 23; ftext = "Kolxoz"; ChosenSkin[para1] = 132; SetPlayerSkin(para1, 132); }
                    else if(PlayerInfo[playerid][pLeader] == 24) { PlayerInfo[para1][pTeam] = 24; ftext = "Crazy Lemons"; ChosenSkin[para1] = 161; SetPlayerSkin(para1, 161); }
                    else if(PlayerInfo[playerid][pLeader] == 25) { PlayerInfo[para1][pTeam] = 25; ftext = "Farm Racers"; ChosenSkin[para1] = 202; SetPlayerSkin(para1, 202); }
                    else if(PlayerInfo[playerid][pLeader] == 26) { PlayerInfo[para1][pTeam] = 26; ftext = "Hunters"; ChosenSkin[para1] = 160; SetPlayerSkin(para1, 160); }
                    else if(PlayerInfo[playerid][pLeader] == 27) { PlayerInfo[para1][pTeam] = 27; ftext = "Crips"; ChosenSkin[para1] = 176; SetPlayerSkin(para1, 176); }
                     else if(PlayerInfo[playerid][pLeader] == 28) { PlayerInfo[para1][pTeam] = 28; ftext = "Google Help"; ChosenSkin[para1] = 217; SetPlayerSkin(para1, 217); }
            else { return 1; }
         GetPlayerName(para1, giveplayer, sizeof(giveplayer));
         GetPlayerName(playerid, sendername, sizeof(sendername));
         PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
         PlayerInfo[para1][pRank] = 1;
         printf("AdmCmd: %s áûë ïðèãëàøåí %s ïðèñîåäèíèòüñÿ ê %s.", sendername, giveplayer, ftext);
         format(string, sizeof(string), "* Âû èìååòå ïðèãëàøåíèå îò %s, ïðèñîåäèíèòüñÿ ê ëèäåðàì %s", ftext, sendername);
         SendClientMessage(para1, COLOR_LIGHTBLUE, string);
         format(string, sizeof(string), "* Âû èìååòå ïðåäëîæåíèå îò %s äëÿ ïðèñîåäèíåíèÿ ê %s.", giveplayer,ftext);
         SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
         SetPlayerInterior(para1,0);
         new rand = random(sizeof(gInviteSpawns));
         SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
         SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
         SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
         SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
         TogglePlayerControllable(para1, 0);
            SelectChar[para1] = 255;
            SelectCharID[para1] = PlayerInfo[para1][pMember];
            SelectCharPlace[para1] = 1;
            PlayerInfo[para1][pModel] = ChosenSkin[para1];
            PlayerInfo[para1][pChar] = ChosenSkin[para1];
            SendClientMessage(para1, COLOR_ISPOLZUY, "* Èñïîëüçóéòå 'next' äëÿ âûáîðà ïåðñîíàæà.");
            SendClientMessage(para1, COLOR_ISPOLZUY, "* Åñëè âû íàøëè ïåðñîíàæà êîòîðîãî õîòèòå èñïîëüçîâàòü ââåäèòå 'done'.");
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "**Этот игрок в текущем розыске / меняет команду / Или готов к поступлению в банду.");
            return 1;
        }
       }
      }//not connected
     }
     else
     {
      SendClientMessage(playerid, COLOR_RED, "** Íåò ïðàâ íà èñïîëüçîâàíèå êîìàíäû(òîëüêî äëÿ ëèäåðîâ)!");
     }
    }
    return 1;
   }
Дата: 14.11.2010, Воскресенье, 11:43:31 | Сообщение # $NUMBER
Группа: Проверенные
Сообщений: 112
Репутация: 14+
aptyp, хорошо,я посмотрю.

Добавлено (14.11.2010, 11.43)
---------------------------------------------
aptyp, c makeleader все в порядке,такие строчки есть только в /invite.

  • Страница 1 из 1
  • 1
Поиск: