Leaderrespawn

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 Leute ich habe ein Neues Problem..


    Ich habe den Befehl /lrespawn mit 24 Fraktionen, aber wenn ich Compile dann stürtz pawno ab..


    if(strcmp(cmd,"/lrespawn",true) == 0)
    {
    if(PlayerInfo[playerid][pLeader] == 1)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(PoliceCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != PoliceCars[v])
    {
    SetVehicleToRespawn(PoliceCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 2)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(PoliceCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != PoliceCars[v])
    {
    SetVehicleToRespawn(PoliceCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 3)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(BundeswehrCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != BundeswehrCars[v])
    {
    SetVehicleToRespawn(BundeswehrCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 4)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(Krankenwagen); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != Krankenwagen[v])
    {
    SetVehicleToRespawn(Krankenwagen[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 5)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(LCNCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != LCNCars[v])
    {
    SetVehicleToRespawn(LCNCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 6)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(YakuzaCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != YakuzaCars[v])
    {
    SetVehicleToRespawn(YakuzaCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 7)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(PraesiCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != PraesiCars[v])
    {
    SetVehicleToRespawn(PraesiCars[v]);
    }
    }
    }
    }


    }
    else if(PlayerInfo[playerid][pLeader] == 8)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(HitmanCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != HitmanCars[v])
    {
    SetVehicleToRespawn(HitmanCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 9)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(CNNCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != CNNCars[v])
    {
    SetVehicleToRespawn(CNNCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 10)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(TaxiCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != TaxiCars[v])
    {
    SetVehicleToRespawn(TaxiCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 11)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(FahrschulCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != FahrschulCars[v])
    {
    SetVehicleToRespawn(FahrschulCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 12)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(BikerCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != BikerCars[v])
    {
    SetVehicleToRespawn(BikerCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 13)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(GrooveCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != GrooveCars[v])
    {
    SetVehicleToRespawn(GrooveCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 14)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(BallasCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != BallasCars[v])
    {
    SetVehicleToRespawn(BallasCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 15)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(NFSCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != NFSCars[v])
    {
    SetVehicleToRespawn(NFSCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 16)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(VagosCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != VagosCars[v])
    {
    SetVehicleToRespawn(VagosCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 17)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(AztecasCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != AztecasCars[v])
    {
    SetVehicleToRespawn(AztecasCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 18)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(RussenCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != RussenCars[v])
    {
    SetVehicleToRespawn(RussenCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 19)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(WheelCar); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != WheelCar[v])
    {
    SetVehicleToRespawn(WheelCar[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 20)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(TerrorCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != TerrorCars[v])
    {
    SetVehicleToRespawn(TerrorCars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 21)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(FBICars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != FBICars[v])
    {
    SetVehicleToRespawn(FBICars[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 22)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(FeuerwehrVehs); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != FeuerwehrVehs[v])
    {
    SetVehicleToRespawn(FeuerwehrVehs[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 23)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(RMVehs); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != RMVehs[v])
    {
    SetVehicleToRespawn(RMVehs[v]);
    }
    }
    }
    }
    }
    else if(PlayerInfo[playerid][pLeader] == 24)
    {
    GivePlayerMoney(playerid,-2500);
    for(new v=0; v<sizeof(oAmtCars); v++)
    {
    for(new i=0;i< MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(GetPlayerVehicleID(i) != oAmtCars[v])
    {
    SetVehicleToRespawn(oAmtCars[v]);
    }
    }
    }
    }
    }
    }
    else { SendClientMessage(playerid,COLOR_RED," Du bist kein Leader! "); }
    return 1;
    }


    Wisst ihr weiter??


    Mit freundlichen Grüßen


    Freaki


    €: Verschrieben :wacko:

  • das heisst dan öfftes das eine klammer nicht zugemacht wurde musst mal gucken ich guck auch mal eben



    Edit:


    }
    }
    else { SendClientMessage(playerid,COLOR_RED," Du bist kein Leader! "); }
    return 1;
    }


    da bitte die letzten beiden klammern sind zu viel 1 muss weg mach die über else da weg die klammer


    >______________________________________________________________________________________<

    Du suchst einen League of Legends Clan dann los und Registriere dich ein Admin schaltete dich frei.

    >______________________________________________________________________________________<