Szerző Téma: GF  (Megtekintve 660 alkalommal)

Nem elérhető quips

GF
« Dátum: 2010. április 13. - 15:20:57 »
0 Show voters
Üdv
 

Megint department hibám van :S
 

   if(strcmp(cmd, \"/departments\", true) == 0 || strcmp(cmd, \"/d\", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
   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_GRAD2, \"Használat: (/d)epartments [department chat]\");
      return 1;
   }
   if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
   {
       if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), \"** Tábornok %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), \"** Ezredes %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), \"** Százados %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), \"** Törzsormester %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), \"** Ormester %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), \"** Kadét %s: %s, over. **\", sendername, result); }
      else
      {
         format(string, sizeof(string), \"** Officer %s: %s, over. **\", sendername, result);
      }
      SendTeamMessage(2, COLOR_ALLDEPT, string);
      SendTeamMessage(1, COLOR_ALLDEPT, string);
      printf(\"%s\", string);
      return 1;
   }
   else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
   {
       if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), \"** Director %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), \"** Assistant Director in Charge %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), \"** Special Agent in Charge %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), \"** Special Agent %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), \"** Special Agent Trainee %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), \"** Professional Staff %s: %s, over. **\", sendername, result); }
      else
      {
         format(string, sizeof(string), \"** Intern %s: %s, over. **\", sendername, result);
      }
      SendTeamMessage(2, COLOR_ALLDEPT, string);
      SendTeamMessage(1, COLOR_ALLDEPT, string);
      printf(\"%s\", string);
      return 1;
   }
   else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
   {
       if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), \"** General %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), \"** Lieutenant %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), \"** Captain %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), \"** Major %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), \"** Sergeant %s: %s, over. **\", sendername, result); }
      else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), \"** Private %s: %s, over. **\", sendername, result); }
      else
      {
         format(string, sizeof(string), \"** Privát %s: %s, over. **\", sendername, result);
      }
      SendTeamMessage(2, COLOR_ALLDEPT, string);
      SendTeamMessage(1, COLOR_ALLDEPT, string);
      printf(\"%s\", string);
      return 1;
   }
   else if(gTeam[playerid] == 1||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4)
   {
      format(string, sizeof(string), \"** Szanitéc %s: %s, over. **\", sendername, result);
      SendTeamMessage(2, COLOR_ALLDEPT, string);
      SendTeamMessage(1, COLOR_ALLDEPT, string);
      printf(\"%s\", string);
      return 1;
   }
   else
   {
      SendClientMessage(playerid, COLOR_GRAD2, \"   Nem vagy csapatban !\");
      return 1;
   }
}
return 1;
}

 

Nos itt a department.Az a probléma ha használod a /d parancsot akkor elküldi a többi játékosnak az üzenetet de te nem látod.Kérlek segítsetek ezt megoldani.
 

Köszönettel:Quips

Nem elérhető grove4l

  • 1545
    • Profil megtekintése
GF
« Válasz #1 Dátum: 2010. április 13. - 18:01:06 »
0 Show voters
ien velem is volt
ha admin vagy ird be /setteam neved 2
és látni lehtlesz
és mindíg ez a gond amúgy
mindenhol
/setteam neved 2

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal