Das Problem ist,
wenn man Leader ist (/makeleader), kann man den D chat nichtmehr lesen,
ich mach ganznormal Rang 1-6 gehts.
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, "- Tipp - : (/d)epartments [Department-Chat]");
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(PlayerInfo[playerid][pRank] == 7) { format(string, sizeof(string), "** Direktor %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Direktor %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Direktorassistent %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Ausbildender Polizist %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Polizist %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Auszubildender Polizist %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Praktikant %s: %s, over. **", sendername, result); }
else if(PlayerInfo[playerid][pLeader] == 1) { format(string, sizeof(string), "** Direktor %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);
SendTeamMessage(3, COLOR_ALLDEPT, string);
SendTeamMessage(7, COLOR_ALLDEPT, string);
SendTeamMessage(4, COLOR_ALLDEPT, string);
printf("%s", string);
return 1;
}