Beamten Chat geht nicht richtig ..

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Heyl leute,


    Habe ein Problem mit meinem Chat, ich habe eine neue fraktion eingefügt die auch einen eigenen Chat haben soll + Behörden chat.
    Nur das problem ist dass wenn ich etwas im chat schreibe , erkent er es zwar in der server konsole aber ingame erscheint mir kein text im chat..... was ist daran falsch , hier mein /r chat :
    es geht um die Fraktion Nr 12


    if(strcmp(cmd, "/r", 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, "Benutze: (/r)adio [radio chat]");
    return 1;
    }
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Chief %s: %s, over. **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Captain %s: %s, over. **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Lieutenant %s: %s, over. **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Sergeant %s: %s, over. **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Officer %s: %s, over. **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Cadet %s: %s, over. **", sendername, result); }
    else
    {
    format(string, sizeof(string), "** Cadet %s: %s, over. **", sendername, result);
    }
    SendRadioMessage(1, TEAM_BLUE_COLOR, 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);
    }
    SendRadioMessage(2, TEAM_BLUE_COLOR, 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), "** Private %s: %s, over. **", sendername, result);
    }
    SendRadioMessage(3, TEAM_BLUE_COLOR, string);
    printf("%s", string);
    return 1;
    }
    else if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Regierungsrat %s: %s, over. **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Zollinspektor %s: %s, over. **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Zolloberwachtmeister %s: %s, over. **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Zollwachtmeister %s: %s, over. **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Zollwachtmeisteranwärter %s: %s, over. **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Praktikant %s: %s, over. **", sendername, result); }
    else
    {
    format(string, sizeof(string), "** Praktikant %s: %s, over. **", sendername, result);
    }
    SendRadioMessage(4, TEAM_BLUE_COLOR, string);
    printf("%s", string);
    return 1;
    }
    else if(gTeam[playerid] == 1||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4)
    {
    format(string, sizeof(string), "** Sanitäter %s: %s, over. **", sendername, result);
    SendRadioMessage(5, TEAM_CYAN_COLOR, string);
    printf("%s", string);
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du gehörst nicht zum Team Team !");
    return 1;
    }
    }
    return 1;
    }