/ainvite Errors

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
  • Error:
    error 047: array sizes do not match, or destination array is too small


    Zeilen:



    if(strcmp(cmd, "/ainvite", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /ainvite [playerid/Name] [FraktionsNummer]");
    return 1;
    }
    new para1, fraktion, ftext[20];
    para1 = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /ainvite [playerid/Name] [FraktionsNummer]");
    return 1;
    }
    fraktion = strval(tmp);
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
    if(IsPlayerConnected(para1))
    {
    if(para1 != INVALID_PLAYER_ID)
    {
    if (gTeam[para1] == TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
    {
    if(fraktion == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "San Andreas Police Department"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }
    //else if(fraktion == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Polizei SF"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }
    else if(fraktion == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "National Guard"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
    //else if(fraktion == 3) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Firemen/Ambulance"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
    else if(fraktion == 3) { PlayerInfo[para1][pTeam] = 3; gTeam[para1] = 3; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 120); }
    else if(fraktion == 4) { PlayerInfo[para1][pTeam] = 4; gTeam[para1] = 4; ftext = "Yakuza"; ChosenSkin[para1] = 294; SetPlayerSkin(para1, 294); }
    else if(fraktion == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Bodyguards"; ChosenSkin[para1] = 164; SetPlayerSkin(para1, 164); }
    else if(fraktion == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "Hitman Agency"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(fraktion == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "CNN Studio"; ChosenSkin[para1] = 187; SetPlayerSkin(para1, 187); }
    else if(fraktion == 8) { PlayerInfo[para1][pTeam] = 8; gTeam[para1] = 8; ftext = "School Instructors"; ChosenSkin[para1] = 240; SetPlayerSkin(para1, 240); }
    //else if(fraktion == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Hells Angels"; ChosenSkin[para1] = 247; SetPlayerSkin(para1, 247); }//Hells Angels
    else if(fraktion == 9) { PlayerInfo[para1][pTeam] = 9; gTeam[para1] = 9; ftext = "Grove Street Family"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }//Grove Street
    else if(fraktion == 10) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 10; ftext = "Ballas"; ChosenSkin[para1] = 102; SetPlayerSkin(para1, 102); }//Ballas
    //else if(fraktion == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "2Fast2Furios"; ChosenSkin[para1] = 185; SetPlayerSkin(para1, 185); }//2Fast2Furios
    else if(fraktion == 11) { PlayerInfo[para1][pTeam] = 11; gTeam[para1] = 11; ftext = "L.S.Vagos"; ChosenSkin[para1] = 108; SetPlayerSkin(para1, 108); }//Los Santos Vagos
    else if(fraktion == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "V.L.Aztecas"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 114); }//Varios Los Aztecas
    //else if(fraktion == 18) { PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 18; ftext = "S.F.Rifa"; ChosenSkin[para1] = 173; SetPlayerSkin(para1, 173); }//San Fiero Rifa
    //else if(fraktion == 19) { PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 19; ftext = "Red Soldier"; ChosenSkin[para1] = 234; SetPlayerSkin(para1, 234); }//West Coust Customs
    //else if(fraktion == 20) { PlayerInfo[para1][pTeam] = 20; gTeam[para1] = 20; ftext = "Terror"; ChosenSkin[para1] = 220; SetPlayerSkin(para1, 220); }
    else if(fraktion == 13) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
    //else if(fraktion == 22) { PlayerInfo[para1][pTeam] = 22; gTeam[para1] = 22; ftext = "Wheelman"; ChosenSkin[para1] = 124; SetPlayerSkin(para1, 124); }
    else if(fraktion == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "MS13"; ChosenSkin[para1] = 133; SetPlayerSkin(para1, 133); }
    else if(fraktion == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Ordnungsamt"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " FraktionsNummer ungültig! 1-15");
    return 1;
    }
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    PlayerInfo[para1][pMember] = fraktion;
    PlayerInfo[para1][pRank] = 1;
    printf("AdmCmd: %s hat %s in die Fraktion %s eingeladen.", sendername, giveplayer, ftext);
    format(string, sizeof(string), " Du wurdest in die Fraktion %s von Admin %s eingeladen.", ftext, sendername);
    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    SendClientMessage(para1, COLOR_GRAD5, " Du kannst mit /help deine neuen Fraktionsbefehle betrachten");
    format(string, sizeof(string), " Du hast %s in die Fraktion %s eingeladen.", giveplayer,ftext);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    SetPlayerInterior(para1,0);
    new rand = random(sizeof(gInviteSpawns));
    SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
    SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    FreezePlayer(para1);
    SelectChar[para1] = 255;
    SelectCharID[para1] = PlayerInfo[para1][pMember];
    SelectCharPlace[para1] = 1;
    PlayerInfo[para1][pModel] = ChosenSkin[para1];
    PlayerInfo[para1][pChar] = ChosenSkin[para1];
    SendClientMessage(para1, COLOR_LIGHTRED, "* Benutze 'weiter' um dir den Charakter auszusuchen den du gerne benutzen möchtest.");
    SendClientMessage(para1, COLOR_LIGHTRED, "* Wenn du den richtigen gefunden hast gib 'fertig' ein.");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler hat zur Zeit ein Wanted / ist in einer anderen Fraktion / oder bereits ein Fraktionsmitglied.");
    return 1;
    }
    }
    }//not connected
    }//not admin
    }
    return 1;
    }

    Mapper Aufträge


    Alle Maps nur 1€



  • SoL Script? :D Versuch mal so:
    if(strcmp(cmd, "/ainvite", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "Benutzung: /ainvite [Spieler ID / Name] [FraktionsNummer]");
    SendClientMessage(playerid, COLOR_GRAD2, "Fraktionen: 1 LSPD, 2 FBI, 3 Army, 4 Medic, 5 LCN, 6 Yakuza, 7 Präsi, 8 Hitman");
    SendClientMessage(playerid, COLOR_GRAD2, "Fraktionen: 9 CNN, 10 Taxi, 11 Fahrlehrer, 12 Triaden, 13 Gs, 14 Ballas, 15 Ls Biker Club, 16 Vagos");
    SendClientMessage(playerid, COLOR_GRAD2, "Fraktionen: 17 Aztecas, 18 Rifas, 19 Wcc, 20 Terror, 22 Feuer, 23 Russkaja Bratwa, 24 O-Amt");
    return 1;
    }
    new para1, fraktion, ftext[50];
    para1 = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "BENUTZUNG: /ainvite [Spieler ID / Name] [FraktionsNummer]");
    SendClientMessage(playerid, COLOR_GRAD2, "Fraktionen: 1 LSPD, 2 FBI, 3 Army, 4 Medic, 5 LCN, 6 Yakuza, 7 Präsi, 8 Hitman");
    SendClientMessage(playerid, COLOR_GRAD2, "Fraktionen: 9 CNN, 10 Taxi, 11 Fahrlehrer, 12 Triaden, 13 Gs, 14 Ballas, 15 Ls Biker Club, 16 Vagos");
    SendClientMessage(playerid, COLOR_GRAD2, "Fraktionen: 17 Aztecas, 18 Rifas, 19 Wcc, 20 Terror, 22 Feuer, 23 Russkaja Bratwa, 24 O-Amt");
    return 1;
    }
    fraktion = strval(tmp);
    if (PlayerInfo[playerid][pAdmin] >= 1)
    {
    if(IsPlayerConnected(para1))
    {
    if(para1 != INVALID_PLAYER_ID)
    {
    if (gTeam[para1] == TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
    {
    if(fraktion == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Polizei LS"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }
    else if(fraktion == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Polizei SF"; ChosenSkin[para1] = 280; SetPlayerSkin(para1, 280); }
    else if(fraktion == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "National Guard"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
    else if(fraktion == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Firemen/Ambulance"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
    else if(fraktion == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 258; SetPlayerSkin(para1, 120); }
    else if(fraktion == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 294; SetPlayerSkin(para1, 294); }
    else if(fraktion == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Bodyguards"; ChosenSkin[para1] = 164; SetPlayerSkin(para1, 164); }
    else if(fraktion == 8) { PlayerInfo[para1][pTeam] = 8; gTeam[para1] = 8; ftext = "Hitman Agency"; ChosenSkin[para1] = 250; SetPlayerSkin(para1, 250); }
    else if(fraktion == 9) { PlayerInfo[para1][pTeam] = 9; gTeam[para1] = 9; ftext = "CNN Studio"; ChosenSkin[para1] = 187; SetPlayerSkin(para1, 187); }
    else if(fraktion == 10) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 10; ftext = "Taxi Cab Company"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
    else if(fraktion == 11) { PlayerInfo[para1][pTeam] = 11; gTeam[para1] = 11; ftext = "School Instructors"; ChosenSkin[para1] = 240; SetPlayerSkin(para1, 240); }
    else if(fraktion == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Triaden"; ChosenSkin[para1] = 118; SetPlayerSkin(para1, 118); }//Triaden
    else if(fraktion == 13) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 13; ftext = "Grove Street Family"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }//Grove Street
    else if(fraktion == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "Ballas"; ChosenSkin[para1] = 102; SetPlayerSkin(para1, 102); }//Ballas
    else if(fraktion == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Sf Biker Club"; ChosenSkin[para1] = 185; SetPlayerSkin(para1, 185); }//Sf Biker Club
    else if(fraktion == 16) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 16; ftext = "L.S.Vagos"; ChosenSkin[para1] = 108; SetPlayerSkin(para1, 108); }//Los Santos Vagos
    else if(fraktion == 17) { PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 17; ftext = "V.L.Aztecas"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 114); }//Varios Los Aztecas
    else if(fraktion == 18) { PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 18; ftext = "L.S.Rifa"; ChosenSkin[para1] = 173; SetPlayerSkin(para1, 173); }//Los Santos Rifa
    else if(fraktion == 19) { PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 19; ftext = "W.C.Customs"; ChosenSkin[para1] = 234; SetPlayerSkin(para1, 234); }//West Coust Customs
    else if(fraktion == 20) { PlayerInfo[para1][pTeam] = 20; gTeam[para1] = 20; ftext = "Terror"; ChosenSkin[para1] = 220; SetPlayerSkin(para1, 220); }
    else if(fraktion == 21) { PlayerInfo[para1][pTeam] = 21; gTeam[para1] = 21; ftext = "Wheelmen Agency"; ChosenSkin[para1] = 28; SetPlayerSkin(para1, 28); }
    else if(fraktion == 22) { PlayerInfo[para1][pTeam] = 22; gTeam[para1] = 22; ftext = "Feuerwehr"; ChosenSkin[para1] = 277; SetPlayerSkin(para1, 277); } // Feuerwehr
    else if(fraktion == 23) { PlayerInfo[para1][pTeam] = 23; gTeam[para1] = 23; ftext = "Russkaja Bratwa"; ChosenSkin[para1] = 133; SetPlayerSkin(para1, 133); }
    else if(fraktion == 24) { PlayerInfo[para1][pTeam] = 24; gTeam[para1] = 24; ftext = "Ordnungsamt"; ChosenSkin[para1] = 255; SetPlayerSkin(para1, 255); }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD2, " FraktionsNummer ungültig! 1-24");
    return 1;
    }
    GetPlayerName(para1, giveplayer, sizeof(giveplayer));
    GetPlayerName(playerid, sendername, sizeof(sendername));
    PlayerInfo[para1][pMember] = fraktion;
    PlayerInfo[para1][pRank] = 1;
    printf("AdminSystem: %s hat %s in die Fraktion %s eingeladen.", sendername, giveplayer, ftext);
    format(string, sizeof(string), " Du wurdest in die Fraktion %s von Admin %s eingeladen.", ftext, sendername);
    SendClientMessage(para1, COLOR_LIGHTBLUE, string);
    SendClientMessage(para1, COLOR_GRAD5, " Du kannst mit /help deine neuen Fraktionsbefehle betrachten");
    format(string, sizeof(string), " Du hast %s in die Fraktion %s eingeladen.", giveplayer,ftext);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    SetPlayerInterior(para1,0);
    new rand = random(sizeof(gInviteSpawns));
    SetPlayerPos(para1, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]); // Warp the player
    SetPlayerFacingAngle(para1, gInviteSpawns[rand][3]);
    SetPlayerCameraPos(para1,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    SetPlayerCameraLookAt(para1,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
    FreezePlayer(para1);
    SelectChar[para1] = 255;
    SelectCharID[para1] = PlayerInfo[para1][pMember];
    SelectCharPlace[para1] = 1;
    PlayerInfo[para1][pModel] = ChosenSkin[para1];
    PlayerInfo[para1][pChar] = ChosenSkin[para1];
    SendClientMessage(para1, COLOR_LIGHTRED, "* Benutze 'weiter' um dir den Charakter auszusuchen den du gerne benutzen möchtest.");
    SendClientMessage(para1, COLOR_LIGHTRED, "* Wenn du den richtigen gefunden hast gib 'fertig' ein.");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler hat zur Zeit ein Wanted / ist in einer anderen Fraktion / oder bereits ein Fraktionsmitglied.");
    return 1;
    }
    }
    }//not connected
    }//not admin
    }
    return 1;
    }
    Gruß,
    Copy