I have a RP mode and it's my own mode i made it! I was fixing something on my command /d or /departments and then sudenly in game if i'm a PD or FBI or SWAT if i type /d it says "USE:/d [text]" and when i use ti "/d How are you?" the chat stays clean nothing apperas no text no chat nothing so the problem is that it is not showing the text for PD,FBI,SWAT and MD!
Код:
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, "USAGE: (/d)epartments [department chat]");
return 1;
}
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "{3E3E9F}** (PD)Nacelnik %s: {AAAAD4}%s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "{3E3E9F}** (PD)Kapiten %s:{AAAAD4} %s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "{3E3E9F}** (PD)Porucnik %s:{AAAAD4} %s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "{3E3E9F}** (PD)Narednik %s: {AAAAD4}%s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "{3E3E9F}** (PD)Policajac %s: {AAAAD4}%s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "{3E3E9F}** (PD)Cadet %s:{AAAAD4} %s, prijem. **", sendername, result); }
else
{
format(string, sizeof(string), "{3E3E9F}** (PD)Policajac %s:{AAAAD4} %s, prijem. **", sendername, result);
}
SendTeamMessage(1, 0x42A0A0FF, 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), "{3E3E9F}** (FBI)Director %s: {AAAAD4}%s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "{3E3E9F}** (FBI)Asistent %s: {AAAAD4}%s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "{3E3E9F}** (FBI)Specijalni agent %s: {AAAAD4}%s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "{3E3E9F}** (FBI)Agent %s: {AAAAD4}%s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "{3E3E9F}** (FBI)Cadet %s: {AAAAD4}%s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "{3E3E9F}** (FBI)Pomagac %s:{AAAAD4} %s, prijem. **", sendername, result); }
else
{
format(string, sizeof(string), "{3E3E9F}** (FBI)Pocetnik %s:{AAAAD4} %s, prijem. **", sendername, result);
}
SendTeamMessage(1, 0x42A0A0FF, 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), "{3E3E9F}** (SIPA)General %s:{AAAAD4} %s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "{3E3E9F}** (SIPA)Porucnik %s:{AAAAD4} %s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "{3E3E9F}** (SIPA)Kapiten %s:{AAAAD4} %s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "{3E3E9F}** (SIPA)Major %s: {AAAAD4}%s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "{3E3E9F}** (SIPA)Narednik %s: {AAAAD4}%s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "{3E3E9F}** (SIPA)Cadet %s: {AAAAD4}%s, prijem. **", sendername, result); }
else
{
format(string, sizeof(string), "{3E3E9F}** (SIPA)Pocetnik %s: {AAAAD4}%s, prijem. **", sendername, result);
}
SendTeamMessage(1, 0x42A0A0FF, string);
printf("%s", string);
return 1;
}
else if(gTeam[playerid] == 1 || PlayerInfo[playerid][pMember]==4 || PlayerInfo[playerid][pLeader]==4)
{
if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "{3E3E9F}** (MD)Director %s: {AAAAD4}%s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "{3E3E9F}** (MD)Doktor %s:{AAAAD4} %s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "{3E3E9F}** (MD)Hirurg %s:{AAAAD4} %s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "{3E3E9F}** (MD)Med. Sestra %s:{AAAAD4} %s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "{3E3E9F}** (MD)Asistent %s:{AAAAD4} %s, prijem. **", sendername, result); }
else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "{3E3E9F}** (MD)Stazista %s:{AAAAD4} %s, prijem. **", sendername, result); }
else
{
format(string, sizeof(string), "{3E3E9F}** (MD)Stazista %s:{AAAAD4} %s, prijem. **", sendername, result);
}
SendTeamMessage(1, 0x42A0A0FF, string);
printf("%s", string);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Nisi clan PD,FBI,SIPA!");
return 1;
}
}
return 1;
}