Uninvite bug

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,
    Ich kann kein uninviten mehr früher hats gegangen bitte um hilfe


    Befehl:


    if(strcmp(cmd, "/uninvite", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /uninvite [playerid/PartOfName]");
    return 1;
    }
    new para1;
    para1 = ReturnUser(tmp);
    if (PlayerInfo[playerid][pLeader] > 0 || PlayerInfo[playerid][pAdmin] >= 6)
    {
    if(IsPlayerConnected(para1))
    {
    if(para1 != INVALID_PLAYER_ID)
    {
    if (PlayerInfo[para1][pMember] > 0)
    {
    if((PlayerInfo[playerid][pLeader] != PlayerInfo[para1][pMember]) && PlayerInfo[playerid][pAdmin] < 1337)
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Dieser Spieler ist nicht in deiner Fraktion.");
    return 1;
    }
    if(PlayerInfo[para1][pJobHours] <= MEMBER_TIME)
    {
    getdate(year, month, day);
    PlayerInfo[para1][pJobLock] = 1;
    PlayerInfo[para1][pJobLockDate] = day;
    PlayerInfo[para1][pJobLockMonth] = month;
    PlayerInfo[para1][pJobLockHours] = MEMBER_TIME - PlayerInfo[para1][pJobHours];
    }
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    printf("AdmCmd: %s has uninvited %s.", sendername, giveplayer);
    format(string, sizeof(string), "* Du wurdest aus deiner Fraktion gekickt von Leader %s.", sendername);
    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    SendClientMessage(para1, COLOR_LIGHTBLUE, "* Du bist nun wieder ein Zivilist.");
    gTeam[para1] = 3;
    PlayerInfo[para1][pTeam] = 3;
    PlayerInfo[para1][pMember] = 0;
    PlayerInfo[para1][pRank] = 0;
    PlayerInfo[para1][pChar] = 0;


    new rand = random(sizeof(CIV));
    SetSpawnInfo(para1, gTeam[para1], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    PlayerInfo[para1][pModel] = CIV[rand];
    MedicBill[para1] = 0;
    SpawnPlayer(para1);
    PlayerInfo[para1][pJobInvite] = 0;
    PlayerInfo[para1][pJobInviteDate] = 0;
    PlayerInfo[para1][pJobInviteMonth] = 0;
    PlayerInfo[para1][pJobHours] = 0;
    PlayerInfo[para1][pJob] = 0;
    format(string, sizeof(string), "Du hast %s aus deiner Fraktion entlassen.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    if(PlayerInfo[para1][pMember] == 14)
    {
    PlayerInfo[para1][pJob] = 0;
    }
    if(PlayerInfo[para1][pMember] == 18)
    {
    PlayerInfo[para1][pJob] = 0;
    }
    return 1;
    }
    }
    }//not connected
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Du bist kein Leader einer Fraktion.");
    return 1;
    }
    }
    return 1;
    }

  • if(strcmp(cmd, "/uninvite", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /uninvite [playerid/Name]");
    return 1;
    }
    new para1;
    para1 = ReturnUser(tmp);
    if (PlayerInfo[playerid][pLeader] >= 1)
    {
    if(IsPlayerConnected(para1))
    {
    if(para1 != INVALID_PLAYER_ID)
    {
    if (PlayerInfo[para1][pMember] > 0 && PlayerInfo[para1][pMember] == PlayerInfo[playerid][pLeader])
    {
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    printf("AdmCmd: %s hat %s rausgeschmissen.", sendername, giveplayer);
    format(string, sizeof(string), "* Du wurdest aus deiner Fraktion %s vom Leader %s gekickt.",Fracs[PlayerInfo[para1][pMember]-1],sendername);
    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    SendClientMessage(para1, COLOR_LIGHTBLUE, "* Du bist nun wieder ein Zivilist.");
    gTeam[para1] = 3;
    PlayerInfo[para1][pTeam] = 3;
    PlayerInfo[para1][pMember] = 0;
    PlayerInfo[para1][pRank] = 0;
    PlayerInfo[para1][pChar] = 0;
    new rand = random(sizeof(CIV));
    SetSpawnInfo(para1, gTeam[para1], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    PlayerInfo[para1][pModel] = CIV[rand];
    MedicBill[para1] = 0;
    SpawnPlayer(para1);
    format(string, sizeof(string), " Du hast %s aus der Fraktion gekickt.", giveplayer);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Du kannst nur die Member deiner Fraktion uninviten!");
    }
    }
    }//not connected
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, " Nur der Leader kann diesen Befehl nutzen!");
    }
    }
    return 1;
    }

  • Ehm ich bekomme 4 Errors



    C:\Users\Tommy\Desktop\Reallife-Truble 0.3d\gamemodes\Reallife-truble.pwn(31405) : error 017: undefined symbol "Fracs"
    C:\Users\Tommy\Desktop\Reallife-Truble 0.3d\gamemodes\Reallife-truble.pwn(31405) : warning 215: expression has no effect
    C:\Users\Tommy\Desktop\Reallife-Truble 0.3d\gamemodes\Reallife-truble.pwn(31405) : error 001: expected token: ";", but found "]"
    C:\Users\Tommy\Desktop\Reallife-Truble 0.3d\gamemodes\Reallife-truble.pwn(31405) : error 029: invalid expression, assumed zero
    C:\Users\Tommy\Desktop\Reallife-Truble 0.3d\gamemodes\Reallife-truble.pwn(31405) : fatal error 107: too many error messages on one line


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



    4 Errors.
    Bitte um Hilfe danke

  • #define MAX_FRACS 26
    new Fracs[MAX_FRACS][20] = {
    "LSPD",
    "SFPD",
    "Army",
    "Arzt",
    "LCN",
    "Yakuza",
    "Präsident",
    "Hitman",
    "CNN",
    "Taxi",
    "Fahrlehrer",
    "Hells Angels",
    "Grove Street",
    "Ballas",
    "Autobahnpolizei",
    "Vagos",
    "Varrios Aztecas",
    "Rifas",
    "W.C.Customs",
    "Terroristen",
    "FBI",
    "Feuerwehr",
    "Russen Mafia",
    "Ordnungsamt",
    "Bundes Polizei",
    "LVPD"
    };


    ka was du für fraks hast willse das in selfmade rein machen ?