/family chat

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
  • Hallo liebe Breadfish - Community.
    Ich habe ein Problem mit dem /f Chat.



    if(strcmp(cmd, "/family", true) == 0 || strcmp(cmd, "/f", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pMuted] == 1)
    {
    SendClientMessage(playerid, TEAM_CYAN_COLOR, "Du kannst nicht sprechen, du wurdest gemutet!");
    return 1;
    }
    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, "BENUTZUNG: (/f)amily [familien chat]");
    return 1;
    }
    new leader = PlayerInfo[playerid][pLeader];
    new member = PlayerInfo[playerid][pMember];
    //if (gTeam[playerid] >= 5 || PlayerInfo[playerid][pFMember] < 255)
    if( (member >= 1 && member <= 24) || (leader >= 1 && leader <= 24) )
    {
    if(member == 2 || leader == 2)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x0087FFFF, string);
    SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x0087FFFF, string);
    }
    else if(member == 3 || leader == 3)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x0087FFFF, string);
    SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x0087FFFF, string);
    }
    else if(member == 4 || leader == 4)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x0087FFFF, string);
    SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x0087FFFF, string);
    }
    else if(member == 5 || leader == 5)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(5, 0x0087FFFF, string);
    }
    else if(member == 6 || leader == 6)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(6, 0x0087FFFF, string);
    }
    else if(member == 7 || leader == 7)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(7, 0x0087FFFF, string);
    }
    else if(member == 8 || leader == 8)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(8, 0x0087FFFF, string);
    }
    else if(member == 9 || leader == 9)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(9, 0x0087FFFF, string);
    }
    else if(member == 10 || leader == 10)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x0087FFFF, string);
    SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x0087FFFF, string);
    }
    else if(member == 11 || leader == 11)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x0087FFFF, string);
    SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x0087FFFF, string);
    }
    else if(member == 12 || leader == 12)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x0087FFFF, string);
    SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x0087FFFF, string);
    }
    else if(member == 13 || leader == 13)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x0087FFFF, string);
    SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x0087FFFF, string);
    }
    else if(member == 14 || leader == 14)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x0087FFFF, string);
    SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x0087FFFF, string);
    }
    else if(member == 15 || leader == 15)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x0087FFFF, string);
    SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x0087FFFF, string);
    }
    else if(member == 16 || leader == 16)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x0087FFFF, string);
    SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x0087FFFF, string);
    }
    else if(member == 17 || leader == 17)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x0087FFFF, string);
    SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x0087FFFF, string);
    }
    else if(member == 18 || leader == 18)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x0087FFFF, string);
    SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x0087FFFF, string);
    }
    else if(member == 19 || leader == 19)
    {
    if(PlayerInfo[playerid][pRank] == 6) { format(string, sizeof(string), "** Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 5) { format(string, sizeof(string), "** Co-Leader %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 4) { format(string, sizeof(string), "** Member-Rank4 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 3) { format(string, sizeof(string), "** Member-Rank3 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 2) { format(string, sizeof(string), "** Member-Rank2 %s: %s. )) **", sendername, result); }
    else if(PlayerInfo[playerid][pRank] == 1) { format(string, sizeof(string), "** Member-Rank1 %s: %s. )) **", sendername, result); }
    SendFamilyMessage(PlayerInfo[playerid][pMember], 0x0087FFFF, string);
    SendFamilyMessage(PlayerInfo[playerid][pLeader], 0x0087FFFF, string);
    (Das geht noch bis Fraktion 24 , musste ich aus Platz gründen einsparen.)
    }
    }
    }
    return 1;
    } Der /f chat soll nur für die jeweilige Fraktion Les/Sichtbar sein.


    Ich bedanke mich im vorraus. :)

  • Das Problem ist , jede Fraktion kann denn Chat lesen.


    zB: La Cosa Nostra Schreibt "Lasst ma Gangfight gegen Groove Street machen"
    Groove Street kann es lesen und antwortet " Wir werden gerüstet sein"