großes problem mit /o

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
  • wenn jeder admin schreibt im o chat steht da "Super Administrator"


    können sie mir bitte helfen


    if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gPlayerLogged[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist noch nicht Eingeloggt !");
    return 1;
    }
    if(PlayerInfo[playerid][pMuted] == 1)
    {
    SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst nicht sprechen, du bist 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, "NUTZUNG: (/o)oc [ooc chat]");
    return 1;
    }
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
    format(string, sizeof(string), "***%d Sponsors %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
    format(string, sizeof(string), "***%d Probe Admin %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
    format(string, sizeof(string), "***%d Moderator 3 %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
    format(string, sizeof(string), "***%d Moderator 4 %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    if(PlayerInfo[playerid][pAdmin] >= 5)
    {
    format(string, sizeof(string), "***%d Super Moderator %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    if(PlayerInfo[playerid][pAdmin] >= 6)
    {
    format(string, sizeof(string), "***%d Administrator %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    if(PlayerInfo[playerid][pAdmin] >= 1337)
    {
    format(string, sizeof(string), "***%d Super Administrator %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] >= 1338)
    {
    format(string, sizeof(string), "***%d Stelv.Projektleiter %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 2000)
    {
    format(string, sizeof(string), "***%d Stev.Server Leitung %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 3000)
    {
    format(string, sizeof(string), "***%d Owner %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 0 && (noooc))
    {
    format(string, sizeof(string), "***Spieler %s: %s***", sendername, result);
    }
    else return 1;
    OOCOff(0xFFFF00FF,string);
    Log("OA-Chat.txt",string);
    }
    return 1;
    }

  • if(PlayerInfo[playerid][pAdmin] == 1)
    {
    format(string, sizeof(string), "***%d Sponsors %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 2)
    {
    format(string, sizeof(string), "***%d Probe Admin %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 3)
    {
    format(string, sizeof(string), "***%d Moderator 3 %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 4)
    {
    format(string, sizeof(string), "***%d Moderator 4 %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 5)
    {
    format(string, sizeof(string), "***%d Super Moderator %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 6)
    {
    format(string, sizeof(string), "***%d Administrator %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1337)
    {
    format(string, sizeof(string), "***%d Super Administrator %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1338)
    {
    format(string, sizeof(string), "***%d Stelv.Projektleiter %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 2000)
    {
    format(string, sizeof(string), "***%d Stev.Server Leitung %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 3000)
    {
    format(string, sizeof(string), "***%d Owner %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 0 && (noooc))
    {
    format(string, sizeof(string), "***Spieler %s: %s***", sendername, result);
    }


    Mach es mal so.


  • if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
    {
    if(!IsPlayerConnected(playerid)) return 0;
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_GREY, " Du bist noch nicht Eingeloggt !");
    if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst nicht sprechen, du bist gemutet !");
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext), offset = idx, result[64];
    while ((idx < length) && (cmdtext[idx] <= ' ')) {idx++;}
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {result[idx - offset] = cmdtext[idx]; idx++;}
    result[idx - offset] = EOS;
    if(!strlen(result)) return SendClientMessage(playerid, COLOR_GRAD2, "NUTZUNG: (/o)oc [ooc chat]");
    if(PlayerInfo[playerid][pAdmin] >= 1) format(string, sizeof(string), "***%d Sponsors %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    else if(PlayerInfo[playerid][pAdmin] >= 2) format(string, sizeof(string), "***%d Probe Admin %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    else if(PlayerInfo[playerid][pAdmin] >= 3) format(string, sizeof(string), "***%d Moderator 3 %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    else if(PlayerInfo[playerid][pAdmin] >= 4) format(string, sizeof(string), "***%d Moderator 4 %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    else if(PlayerInfo[playerid][pAdmin] >= 5) format(string, sizeof(string), "***%d Super Moderator %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    else if(PlayerInfo[playerid][pAdmin] >= 6) format(string, sizeof(string), "***%d Administrator %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    else if(PlayerInfo[playerid][pAdmin] >= 1337) format(string, sizeof(string), "***%d Super Administrator %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    else if(PlayerInfo[playerid][pAdmin] >= 1338) format(string, sizeof(string), "***%d Stelv.Projektleiter %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    else if(PlayerInfo[playerid][pAdmin] == 2000) format(string, sizeof(string), "***%d Stev.Server Leitung %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    else if(PlayerInfo[playerid][pAdmin] == 3000) format(string, sizeof(string), "***%d Owner %s: %s***", PlayerInfo[playerid][pAdmin], sendername, result);
    else if(PlayerInfo[playerid][pAdmin] == 0 && (noooc)) format(string, sizeof(string), "***Spieler %s: %s***", sendername, result);
    else return 1;
    OOCOff(0xFFFF00FF,string);
    Log("OA-Chat.txt",string);
    return 1;
    }