/ooc

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
  • Hi, ich wollte fragen ob mir jemand meinen /o Befehl umschreiben kann:
    if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gPlayerLogged[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
    return 1;
    }
    if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Der Adminchannel /o wurde ausgeschaltet !");
    return 1;
    }
    if(PlayerInfo[playerid][pMuted] == 1)
    {
    SendClientMessage(playerid, TEAM_CYAN_COLOR, " You can't speak, you have been silenced !");
    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, "USAGE: (/o)oc [ooc chat]");
    return 1;
    }
    format(string, sizeof(string), " %s: %s ", sendername, result);
    OOCOff(COLOR_OOC,string);
    printf("%s", string);
    }
    return 1;
    }


    Es Soll so sein das wenn man Admin Level 1 ist kommt: *Moderator (Name): (Text)
    Wenn man Level 2-4 ist soll kommen: **Admin (Name): (Text)
    Wenn man Admin LEvel 1337 ist: ***Admin (Name): (Text)
    Bei 1338: ****Co Projektleiter (Name): (Text)
    Bei 1339: *****Projektleiter (Name): (Text)


    Ich hoffe es ist nicht zu viel verlangt und ich hoffe es kann sich wer die Arbeit machen :D
    MFG

    Einmal editiert, zuletzt von GDC | Philip ()

  • Danke, aber ich schaffs nicht ohne dass mir wer hilft :D

  • 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 ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Der OOC chat wurde von einem Admin geschlossen");
    return 1;
    }
    if(PlayerInfo[playerid][pMuted] == 1)
    {
    SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst nicht sprechen da du gemutet bist !");
    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, "Benutze: (/o)oc [ooc chat]");
    return 1;
    }
    new drank[20];
    if(PlayerInfo[playerid][pAdmin] == 1){drank = "Moderator";}
    else if(PlayerInfo[playerid][pAdmin] == 2) { drank = "Admin";}
    else if(PlayerInfo[playerid][pAdmin] == 3) { drank = "Admin";}
    else if(PlayerInfo[playerid][pAdmin] == 4) { drank = "Admin";}
    else if(PlayerInfo[playerid][pAdmin] >= 1337) { drank = "1337-Admin,";}
    else if(PlayerInfo[playerid][pAdmin] == 1338) { drank = "Co Projektleiter,";}
    else if(PlayerInfo[playerid][pAdmin] == 1339) { drank = "Projektleiter,";}
    format(string, sizeof(string), "((%s, %s: %s ))",drank, sendername, result);
    if(PlayerInfo[playerid][pAdmin] == 1){OOCOff(COLOR_RED, string);}
    else if(PlayerInfo[playerid][pAdmin] == 2) { OOCOff(COLOR_DBLUE, string);}
    else if(PlayerInfo[playerid][pAdmin] == 3) { OOCOff(COLOR_YELLOW, string);}
    else if(PlayerInfo[playerid][pAdmin] == 4) { OOCOff(COLOR_LYELLOW2, string);}
    else if(PlayerInfo[playerid][pAdmin] == 1337) { OOCOff(COLOR_LIGHTRED, string);
    else if(PlayerInfo[playerid][pAdmin] == 1338) { OOCOff(TEAM_BALLAS_COLOR, string);
    else if(PlayerInfo[playerid][pAdmin] == 1339) { OOCOff(COLOR_GREY, string);
    printf("%s", string);
    }}
    return 1;
    }


    //edit: muss nun gehen ^^

  • Danke :)
    Edit: Da muss Ne Klammer Falsch sein...
    Da kommen die fehler:
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1872) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1876) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1888) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1892) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1896) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1900) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1904) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1908) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1912) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1924) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1928) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1932) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1936) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1940) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1952) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1956) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1960) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1972) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(1976) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(3994) : error 004: function "CrimInRange" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(4212) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(4819) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(4896) : error 004: function "ProxDetector" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(5586) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(5594) : error 004: function "PlayerToPoint" is not implemented
    C:\Users\Philip\Desktop\samp02Xserver.win32\gamemodes\GFF.pwn(5602) : error 004: function "PlayerToPoint" is not implemented


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    26 Errors.

  • 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 ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Der OOC chat wurde von einem Admin geschlossen");
    return 1;
    }
    if(PlayerInfo[playerid][pMuted] == 1)
    {
    SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst nicht sprechen da du gemutet bist !");
    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, "Benutze: (/o)oc [ooc chat]");
    return 1;
    }
    new drank[20];
    if(PlayerInfo[playerid][pAdmin] == 1){drank = "Moderator";}
    else if(PlayerInfo[playerid][pAdmin] == 2) { drank = "Admin";}
    else if(PlayerInfo[playerid][pAdmin] == 3) { drank = "Admin";}
    else if(PlayerInfo[playerid][pAdmin] == 4) { drank = "Admin";}
    else if(PlayerInfo[playerid][pAdmin] >= 1337) { drank = "1337-Admin,";}
    else if(PlayerInfo[playerid][pAdmin] == 1338) { drank = "Co Projektleiter,";}
    else if(PlayerInfo[playerid][pAdmin] == 1339) { drank = "Projektleiter,";}
    format(string, sizeof(string), "((%s, %s: %s ))",drank, sendername, result);
    if(PlayerInfo[playerid][pAdmin] == 1){OOCOff(COLOR_RED, string);}
    else if(PlayerInfo[playerid][pAdmin] == 2) { OOCOff(COLOR_DBLUE, string);}
    else if(PlayerInfo[playerid][pAdmin] == 3) { OOCOff(COLOR_YELLOW, string);}
    else if(PlayerInfo[playerid][pAdmin] == 4) { OOCOff(COLOR_LYELLOW2, string);}
    else if(PlayerInfo[playerid][pAdmin] == 1337) { OOCOff(COLOR_LIGHTRED, string);}
    else if(PlayerInfo[playerid][pAdmin] == 1338) { OOCOff(TEAM_BALLAS_COLOR, string);}
    else if(PlayerInfo[playerid][pAdmin] == 1339) { OOCOff(COLOR_GREY, string);}
    printf("%s", string);
    }}
    return 1;
    }


    Test ma so, so müsste es danneig. klappen...

  • wenns so ist dann geht der compiler nemme^^

  • Das funktioniert bei mir einwandfrei:


    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 ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Der OOC chat wurde von einem Admin geschlossen");
    return 1;
    }
    if(PlayerInfo[playerid][pMuted] == 1)
    {
    SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst nicht sprechen da du gemutet bist !");
    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, "Benutze: (/o)oc [ooc chat]");
    return 1;
    }
    new drank[20];
    if(PlayerInfo[playerid][pAdmin] == 1){drank = "Moderator";}
    else if(PlayerInfo[playerid][pAdmin] == 2) { drank = "Admin";}
    else if(PlayerInfo[playerid][pAdmin] == 3) { drank = "Admin";}
    else if(PlayerInfo[playerid][pAdmin] == 4) { drank = "Admin";}
    else if(PlayerInfo[playerid][pAdmin] >= 1337) { drank = "1337-Admin,";}
    else if(PlayerInfo[playerid][pAdmin] == 1338) { drank = "Co Projektleiter,";}
    else if(PlayerInfo[playerid][pAdmin] == 1339) { drank = "Projektleiter,";}
    format(string, sizeof(string), "((%s, %s: %s ))",drank, sendername, result);
    if(PlayerInfo[playerid][pAdmin] == 1){OOCOff(COLOR_RED, string);}
    else if(PlayerInfo[playerid][pAdmin] == 2) { OOCOff(COLOR_DBLUE, string);}
    else if(PlayerInfo[playerid][pAdmin] == 3) { OOCOff(COLOR_YELLOW, string);}
    else if(PlayerInfo[playerid][pAdmin] == 4) { OOCOff(COLOR_LYELLOW2, string);}
    else if(PlayerInfo[playerid][pAdmin] == 1337) { OOCOff(COLOR_LIGHTRED, string);}
    else if(PlayerInfo[playerid][pAdmin] == 1338) { OOCOff(TEAM_BALLAS_COLOR, string);}
    else if(PlayerInfo[playerid][pAdmin] == 1339) { OOCOff(COLOR_GREY, string);}
    printf("%s", string);
    }
    return 1;
    }

  • Danke, so für die die wollen das Normale Spieler ers auch Können:
    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 ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
    {
    SendClientMessage(playerid, COLOR_GRAD2, " Der OOC chat wurde von einem Admin geschlossen");
    return 1;
    }
    if(PlayerInfo[playerid][pMuted] == 1)
    {
    SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst nicht sprechen da du gemutet bist !");
    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, "Benutze: (/o)oc [ooc chat]");
    return 1;
    }
    new drank[20];
    if(PlayerInfo[playerid][pAdmin] == 0){drank = "Spieler";}
    else if(PlayerInfo[playerid][pAdmin] == 1){drank = "Moderator";}
    else if(PlayerInfo[playerid][pAdmin] == 2) { drank = "Admin";}
    else if(PlayerInfo[playerid][pAdmin] == 3) { drank = "Admin";}
    else if(PlayerInfo[playerid][pAdmin] == 4) { drank = "Admin";}
    else if(PlayerInfo[playerid][pAdmin] == 1337) { drank = "1337-Admin";}
    else if(PlayerInfo[playerid][pAdmin] == 1338) { drank = "Co Projektleiter";}
    else if(PlayerInfo[playerid][pAdmin] == 1339) { drank = "Projektleiter";}
    format(string, sizeof(string), "((%s %s: %s ))",drank, sendername, result);
    if(PlayerInfo[playerid][pAdmin] == 0){OOCOff(COLOR_OOC, string);}
    else if(PlayerInfo[playerid][pAdmin] == 1){OOCOff(COLOR_OOC, string);}
    else if(PlayerInfo[playerid][pAdmin] == 2) { OOCOff(COLOR_OOC, string);}
    else if(PlayerInfo[playerid][pAdmin] == 3) { OOCOff(COLOR_OOC, string);}
    else if(PlayerInfo[playerid][pAdmin] == 4) { OOCOff(COLOR_OOC, string);}
    else if(PlayerInfo[playerid][pAdmin] == 1337) { OOCOff(COLOR_OOC, string);}
    else if(PlayerInfo[playerid][pAdmin] == 1338) { OOCOff(COLOR_OOC, string);}
    else if(PlayerInfo[playerid][pAdmin] == 1339) { OOCOff(COLOR_OOC, string);}
    printf("%s", string);
    }
    return 1;
    }


    Danke surrender
    MFG