/department 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
  • ich hab ka was du meinst (bin noob scripter ) aber paar davon xD


    forward SendTeamMessage(team, color, string[]);
    public SendTeamMessage(team, color, string[])
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(gTeam[i] == team)
    {
    SendClientMessage(i, color, string);
    }
    }
    }
    }

  • machs so:



    public SendTeamMessage(team, color, string[])
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    new leader = PlayerInfo[i][pLeader];
    new member = PlayerInfo[i][pMember];
    if(leader == team || member == team)
    {
    SendClientMessage(i, color, string);
    }
    }
    }
    }


    jeder hat mal klein angefangen ;)


    edit: oder besser vielleicht:


    zeig mal SendFamilyMessage.

  • SAPD [Done]
    FBI [DONE]
    ARmy & MEdic [-.- ]


    SAPD geht genau wie fbi aber MEdic & army nicht -.-

  • <=5 heißt es ist kleiner als 5 oder es ist 5
    == 6 ist klar


    >=1höher als 1 oder 1


  • machs wieder rückgängig und versuchs mit SendFamilyMessage. zeig mal die funktion (hab dir was falsch angegeben sry ^^)


    und du musst für die anderen fraktionen auch noch
    SendTeamMessage(ARMYID, COLOR_ALLDEPT, string);
    SendTeamMessage(MEDICID, COLOR_ALLDEPT, string);


    angeben..

  • public SendFamilyMessage(family, color, string[])
    {
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pMember] == family || PlayerInfo[i][pLeader] == family)
    {
    if(!gFam[i])
    {
    SendClientMessage(i, color, string);
    }
    }
    }
    }
    }


    Meinst du so?


    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), "** Officer %s: %s, over. **", sendername, result);
    }
    SendTeamMessage(4, COLOR_ALLDEPT, string);
    SendTeamMessage(3, COLOR_ALLDEPT, string);
    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(4, COLOR_ALLDEPT, string);
    SendTeamMessage(3, COLOR_ALLDEPT, string);
    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), "** Private %s: %s, over. **", sendername, result);
    }
    SendTeamMessage(4, COLOR_ALLDEPT, string);
    SendTeamMessage(3, COLOR_ALLDEPT, string);
    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), "** Notarzt %s: %s, over. **", sendername, result);
    SendTeamMessage(4, COLOR_ALLDEPT, string);
    SendTeamMessage(3, COLOR_ALLDEPT, string);
    SendTeamMessage(2, COLOR_ALLDEPT, string);
    SendTeamMessage(1, COLOR_ALLDEPT, string);
    printf("%s", string);
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Du bist keiner Ordnungsfraktion zugewießen !");
    return 1;

  • ich liebe dich XD nein fun aber danke dir für deine ganze hilfe es funkt nun alles super :) :love: :love: :thumbup:
    zumindistens einer kennt sich von uns aus XD