Chat-Probleme

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 Breadfisher habe ein Problem mit den Chat der Behörden undzwar wen ich als Cop mit /r [Text] schreibe dann kommt was



    aber wen ich es bei Army oder FBI mit /r [Text] versuche kommt garnichts kann es sein da es doppelt ist das es nicht funktioniert?



    hier der code:




    if(strcmp(cmdtext,"/r",true,2) == 0)<-----------------------------------------------------------FUNKTNIERT!!!!
    {
    new string[128],name[24];
    GetPlayerName(playerid,name,sizeof name);
    format(string,sizeof string,"Chief %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Captain %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Lieutnant %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Seargent %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Officer %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Cadet %s: %s,over",name,cmdtext[3]);


    if(!strlen(cmdtext[2]))
    {
    SendClientMessage(playerid,COLOR_GREY,"Benutze: /r [text]");
    return 1;
    }
    if(gTeam[playerid] == TEAM_COPS|| gTeam[playerid] == TEAM_COPS)
    {
    for(new i=0 ; i <GetMaxPlayers() ; i++)
    {
    if(gTeam[i] == TEAM_COPS || gTeam[i] == TEAM_COPS)
    {
    SendClientMessage(i,COLOR_LSPDCHAT,string);
    }
    }
    }
    return 1;
    }
    //-------------------------------/FBI-CHAT/----------------------------------//
    if(strcmp(cmdtext,"/r",true,2) == 0)<--------------------------------------------------------FUNKTIONIERT NICHT!
    {
    new string[128],name[24];
    GetPlayerName(playerid,name,sizeof name);
    format(string,sizeof string,"Director %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Assistan Director in Charge %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Special Agent in Charge %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Special Agent %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Special Agent Trainee %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Professional Staff %s: %s,over",name,cmdtext[3]);


    if(!strlen(cmdtext[2]))
    {
    SendClientMessage(playerid,COLOR_GREY,"Benutze: /r [text]");
    return 1;
    }
    if(gTeam[playerid] == TEAM_FBI|| gTeam[playerid] == TEAM_FBI)
    {
    for(new i=0 ; i <GetMaxPlayers() ; i++)
    {
    if(gTeam[i] == TEAM_FBI || gTeam[i] == TEAM_FBI)
    {
    SendClientMessage(i,COLOR_LSPDCHAT,string);
    }
    }
    }
    return 1;
    }
    //----------------------------------/ARMY-CHAT/-------------------------------//
    if(strcmp(cmdtext,"/r",true,2) == 0)<--------------------------------------------------------------FUNKTIONIERT NICHT!
    {
    new string[128],name[24];
    GetPlayerName(playerid,name,sizeof name);
    format(string,sizeof string,"General %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Oberstleutnant %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Hauptmann %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Leutnant %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Stabsgefreiter %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Gefreiter %s: %s,over",name,cmdtext[3]);


    if(!strlen(cmdtext[2]))
    {
    SendClientMessage(playerid,COLOR_GREY,"Benutze: /r [text]");
    return 1;
    }
    if(gTeam[playerid] == TEAM_ARMY|| gTeam[playerid] == TEAM_ARMY)
    {
    for(new i=0 ; i <GetMaxPlayers() ; i++)
    {
    if(gTeam[i] == TEAM_ARMY || gTeam[i] == TEAM_ARMY)
    {
    SendClientMessage(i,COLOR_LSPDCHAT,string);
    }
    }
    }
    return 1;
    }


  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • also mit bulle ist gemeint ob er Polizist ist

  • Da hast du.

    if(strcmp(cmdtext,"/r",true,2) == 0)
    {
    new string[128],string2[128],string3[128],name[24];
    GetPlayerName(playerid,name,sizeof name);
    format(string,sizeof string,"Chief %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Captain %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Lieutnant %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Seargent %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Officer %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Cadet %s: %s,over",name,cmdtext[3]);


    format(string,sizeof string2,"Director %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string2,"Assistan Director in Charge %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string2,"Special Agent in Charge %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string2,"Special Agent %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string2,"Special Agent Trainee %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string2,"Professional Staff %s: %s,over",name,cmdtext[3]);


    format(string,sizeof string3,"General %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string3,"Oberstleutnant %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string3,"Hauptmann %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string3,"Leutnant %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string3,"Stabsgefreiter %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string3,"Gefreiter %s: %s,over",name,cmdtext[3]);


    if(!strlen(cmdtext[2]))
    {
    SendClientMessage(playerid,COLOR_GREY,"Benutze: /r [text]");
    return 1;
    }
    if(gTeam[playerid] == TEAM_COPS|| gTeam[playerid] == TEAM_COPS)
    {
    for(new i=0 ; i <GetMaxPlayers() ; i++)
    {
    if(gTeam[i] == TEAM_COPS || gTeam[i] == TEAM_COPS)
    {
    return SendClientMessage(i,COLOR_LSPDCHAT,string);
    }
    }
    }


    if(gTeam[playerid] == TEAM_FBI|| gTeam[playerid] == TEAM_FBI)
    {
    for(new i=0 ; i <GetMaxPlayers() ; i++)
    {
    if(gTeam[i] == TEAM_FBI || gTeam[i] == TEAM_FBI)
    {
    return SendClientMessage(i,COLOR_LSPDCHAT,string2);
    }
    }
    }


    if(gTeam[playerid] == TEAM_ARMY|| gTeam[playerid] == TEAM_ARMY)
    {
    for(new i=0 ; i <GetMaxPlayers() ; i++)
    {
    if(gTeam[i] == TEAM_ARMY || gTeam[i] == TEAM_ARMY)
    {
    return SendClientMessage(i,COLOR_LSPDCHAT,string3);
    }
    }
    }
    return 1;
    }

    Nein, das rücke ich dir nicht mehr ein.


    (Ich verweise mal wieder stillschweigend auf meine Signatur.)

  • ich möchte das nicht eingerückt haben aber Danke,




    //EDIT Funktioniert aber man sieht die Schrift nicht und bei dem Cop-chat sind die Ränke von der Army da

    Einmal editiert, zuletzt von milanboy38 ()


  • format(string,sizeof string,"Chief %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Captain %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Lieutnant %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Seargent %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Officer %s: %s,over",name,cmdtext[3]);
    format(string,sizeof string,"Cadet %s: %s,over",name,cmdtext[3]);


    format(string2,sizeof string2,"Director %s: %s,over",name,cmdtext[3]);
    format(string2,sizeof string2,"Assistan Director in Charge %s: %s,over",name,cmdtext[3]);
    format(string2,sizeof string2,"Special Agent in Charge %s: %s,over",name,cmdtext[3]);
    format(string2,sizeof string2,"Special Agent %s: %s,over",name,cmdtext[3]);
    format(string2,sizeof string2,"Special Agent Trainee %s: %s,over",name,cmdtext[3]);
    format(string2
    ,sizeof string2,"Professional Staff %s: %s,over",name,cmdtext[3]);


    format(string3,sizeof string3,"General %s: %s,over",name,cmdtext[3]);
    format(string3,sizeof string3,"Oberstleutnant %s: %s,over",name,cmdtext[3]);
    format(string3,sizeof string3,"Hauptmann %s: %s,over",name,cmdtext[3]);
    format(string3,sizeof string3,"Leutnant %s: %s,over",name,cmdtext[3]);
    format(string3,sizeof string3,"Stabsgefreiter %s: %s,over",name,cmdtext[3]);
    format(string3,sizeof string3,"Gefreiter %s: %s,over",name,cmdtext[3]);


  • ich habs mal selber versucht aber es kommen 26 errors hier der code





    if(strcmp(cmdtext,"/f",true,2) == 0)
    {
    new string4[128],new string5[128],new string6[128], name[24];
    GetPlayerName(playerid,name,sizeof name);
    format(string4,sizeof string4,"Godfather %s: %s",name,cmdtext[3]);
    format(string4,sizeof string4,"Underboss %s: %s",name,cmdtext[3]);
    format(string4,sizeof string4,"Capo %s: %s",name,cmdtext[3]);
    format(string4,sizeof string4,"Soldier %s: %s",name,cmdtext[3]);
    format(string4,sizeof string4,"Associate %s: %s",name,cmdtext[3]);
    format(string4,sizeof string4,"Outsider %s: %s",name,cmdtext[3]);


    format(string5,sizeof string5,"Godfather %s: %s",name,cmdtext[3]);
    format(string5,sizeof string5,"Underboss %s: %s",name,cmdtext[3]);
    format(string5,sizeof string5,"Capo %s: %s",name,cmdtext[3]);
    format(string5,sizeof string5,"Soldier %s: %s",name,cmdtext[3]);
    format(string5,sizeof string5,"Associate %s: %s",name,cmdtext[3]);
    format(string5,sizeof string5,"Outsider %s: %s",name,cmdtext[3]);
    format(string6,sizeof string6,"Godfather %s: %s",name,cmdtext[3]);
    format(string6,sizeof string6,"Underboss %s: %s",name,cmdtext[3]);
    format(string6,sizeof string6,"Capo %s: %s",name,cmdtext[3]);
    format(string6,sizeof string6,"Soldier %s: %s",name,cmdtext[3]);
    format(string6,sizeof string6,"Associate %s: %s",name,cmdtext[3]);
    format(string6,sizeof string6,"Outsider %s: %s",name,cmdtext[3]);


    if(!strlen(cmdtext[2]))
    {
    SendClientMessage(playerid,COLOR_GREY,"Benutze: /f [text]");
    return 1;
    }
    if(gTeam[playerid] == TEAM_LCN|| gTeam[playerid] == TEAM_LCN)
    {
    for(new i=0 ; i <GetMaxPlayers() ; i++)
    {
    if(gTeam[i] == TEAM_LCN || gTeam[i] == TEAM_LCN)
    {
    return SendClientMessage(i,COLOR_MAFIACHATFARBE,string4);
    }
    }
    }


    if(gTeam[playerid] == TEAM_YAKUZA|| gTeam[playerid] == TEAM_YAKUZA)
    {
    for(new i=0 ; i <GetMaxPlayers() ; i++)
    {
    if(gTeam[i] == TEAM_YAKUZA || gTeam[i] == TEAM_YAKUZA)
    {
    return SendClientMessage(i,COLOR_MAFIACHATFARBE,string5);
    }
    }
    }
    if(gTeam[playerid] == TEAM_LVR|| gTeam[playerid] == TEAM_LVR)
    {
    for(new i=0 ; i <GetMaxPlayers() ; i++)
    {
    if(gTeam[i] == TEAM_LVR || gTeam[i] == TEAM_LVR)
    {
    return SendClientMessage(i,COLOR_MAFIACHATFARBE,string6);
    }
    }
    }
    return 1;
    }





    kan mir den keiner helfen?!

    Einmal editiert, zuletzt von milanboy38 ()