Eroberung -System geht nicht richtig

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
  • Moin,


    ich bin grad dabei ein eroberung system zu schreiben, es geht zwar alles , jedoch nicht mit den Textdraws! Also bei mir wird dass alles mit Timer geregelt und sodass immer mehr ein Balken dazu kommt, aber manchmal wird der garnicht angezeigt oder erst beim letzten Timer... (manchmal geht das auch aber dann verschwinden wieder die anderen Balken obwohl die bleiben sollten)


    code von Timer:



    public EroberungAbfrageMap1(playerid)
    {
    if(gTeam[playerid] == TEAM_USARMY)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 0) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw44[playerid]);//1
    SetTimer("EroberungBalken1",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 0) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw44[playerid]);//1
    SetTimer("EroberungBalken1",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 0) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw44[playerid]);//1
    SetTimer("EroberungBalken1",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    else if(gTeam[playerid] == TEAM_RUSSLAND)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 1) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw44[playerid]);//1
    SetTimer("EroberungBalken1",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 1) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw44[playerid]);//1
    SetTimer("EroberungBalken1",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 1) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw44[playerid]);//1
    SetTimer("EroberungBalken1",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    return 1;
    }

    [size=10]


    [size=10]Bitte kein direkten Code sicken, einfach nur sagen , wo ich evlt. was machen könnte.

    Mit freundlichen Grüßen
    [KoSoVa] :klugs:



  • public EroberungBalken1(playerid)
    {
    if(gTeam[playerid] == TEAM_USARMY)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 0) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw45[playerid]);//2
    SetTimer("EroberungBalken2",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 0) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw45[playerid]);//2
    SetTimer("EroberungBalken2",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 0) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw45[playerid]);//2
    SetTimer("EroberungBalken2",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    else if(gTeam[playerid] == TEAM_RUSSLAND)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 1) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw45[playerid]);//2
    SetTimer("EroberungBalken2",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 1) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw45[playerid]);//2
    SetTimer("EroberungBalken2",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 1) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw45[playerid]);//2
    SetTimer("EroberungBalken2",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    return 1;
    }

    Mit freundlichen Grüßen
    [KoSoVa] :klugs:

  • Hey,
    kannst du uns jeden Balken Code zeigen
    Sprich den Public von balken 2-5 oder so
    Dazu sieht es mit diesen Textdraw43, Textdraw44, Textdraw45, Textdraw46, Textdraw47
    Verdammt unübersichtlich aus
    Kannst du mir/uns schnell sagen welcher textdraw was macht?
    Textdraw43 = ...
    Textdraw44 = ...


    Danke

  • Textdraw43 = Zeigt den Hintergrund der Ladebankeln an
    Textdraw44 = Zeigt denn ersten grünen Balken
    Textdraw45 = Zeigt denn zweiten grünen Balken
    Textdraw46 = Zeigt denn dritten grünen Balken
    Textdraw47 = Zeigt denn vierten grünen Balken
    Textdraw48 = Zeigt denn fünften grünen Balken





    //Ganzen Publics:


    public EroberungAbfrageMap1(playerid)
    {
    if(gTeam[playerid] == TEAM_USARMY)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 0) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw44[playerid]);//1
    SetTimer("EroberungBalken1",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 0) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw44[playerid]);//1
    SetTimer("EroberungBalken1",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 0) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw44[playerid]);//1
    SetTimer("EroberungBalken1",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    else if(gTeam[playerid] == TEAM_RUSSLAND)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 1) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw44[playerid]);//1
    SetTimer("EroberungBalken1",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 1) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw44[playerid]);//1
    SetTimer("EroberungBalken1",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 1) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw44[playerid]);//1
    SetTimer("EroberungBalken1",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    return 1;
    }


    public EroberungBalken1(playerid)
    {
    if(gTeam[playerid] == TEAM_USARMY)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 0) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw45[playerid]);//2
    SetTimer("EroberungBalken2",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 0) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw45[playerid]);//2
    SetTimer("EroberungBalken2",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 0) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw45[playerid]);//2
    SetTimer("EroberungBalken2",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    else if(gTeam[playerid] == TEAM_RUSSLAND)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 1) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw45[playerid]);//2
    SetTimer("EroberungBalken2",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 1) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw45[playerid]);//2
    SetTimer("EroberungBalken2",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 1) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw45[playerid]);//2
    SetTimer("EroberungBalken2",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    return 1;
    }
    public EroberungBalken2(playerid)
    {
    if(gTeam[playerid] == TEAM_USARMY)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 0) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw46[playerid]);//3
    SetTimer("EroberungBalken3",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 0) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw46[playerid]);//3
    SetTimer("EroberungBalken3",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 0) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw46[playerid]);//3
    SetTimer("EroberungBalken3",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    else if(gTeam[playerid] == TEAM_RUSSLAND)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 1) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw46[playerid]);//3
    SetTimer("EroberungBalken3",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 1) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw46[playerid]);//3
    SetTimer("EroberungBalken3",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 1) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw46[playerid]);//3
    SetTimer("EroberungBalken3",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    return 1;
    }
    public EroberungBalken3(playerid)
    {
    if(gTeam[playerid] == TEAM_USARMY)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 0) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw47[playerid]);//4
    SetTimer("EroberungBalken4",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 0) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw47[playerid]);//4
    SetTimer("EroberungBalken4",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 0) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw47[playerid]);//4
    SetTimer("EroberungBalken4",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    else if(gTeam[playerid] == TEAM_RUSSLAND)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 1) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw47[playerid]);//4
    SetTimer("EroberungBalken4",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 1) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw47[playerid]);//4
    SetTimer("EroberungBalken4",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 1) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw47[playerid]);//4
    SetTimer("EroberungBalken4",1000,false);
    }
    else
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    return 1;
    }
    public EroberungBalken4(playerid)
    {
    if(gTeam[playerid] == TEAM_USARMY)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 0) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw48[playerid]);//5
    CheckEroberungMap1A = 1;
    SetTimer("EroberungBalken5",1000,false);
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}A{FFFFFF}' erobert!");
    }
    else if(!IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 0) // A
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 0) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw48[playerid]);//5
    CheckEroberungMap1B = 1;
    SetTimer("EroberungBalken5",1000,false);
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}B{FFFFFF}' erobert!");
    }
    else if(!IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 0) // B
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 0) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw48[playerid]);//5
    CheckEroberungMap1C = 1;
    SetTimer("EroberungBalken5",1000,false);
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}C{FFFFFF}' erobert!");
    }
    else if(!IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 0) // C
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    else if(gTeam[playerid] == TEAM_RUSSLAND)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 1) // A
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw48[playerid]);//5
    CheckEroberungMap1A = 0;
    SetTimer("EroberungBalken5",1000,false);
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}A{FFFFFF}' erobert!");
    }
    else if(!IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 1) // A
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 1) // B
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw48[playerid]);//5
    CheckEroberungMap1B = 0;
    SetTimer("EroberungBalken5",1000,false);
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}B{FFFFFF}' erobert!");
    }
    else if(!IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 1) // B
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 1) // C
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw48[playerid]);//5
    CheckEroberungMap1C = 0;
    SetTimer("EroberungBalken5",1000,false);
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}C{FFFFFF}' erobert!");
    }
    else if(!IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 1) // C
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    }
    }
    return 1;
    }
    public EroberungBalken5(playerid)
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    return 1;
    }


    Textdraws:


    Textdraw44[playerid] = CreatePlayerTextDraw(playerid, 41.500000, 288.966796, "1");
    PlayerTextDrawLetterSize(playerid, Textdraw44[playerid], 0.000000, 0.808643);
    PlayerTextDrawTextSize(playerid, Textdraw44[playerid], 1.000000, 0.000000);
    PlayerTextDrawAlignment(playerid, Textdraw44[playerid], 1);
    PlayerTextDrawColor(playerid, Textdraw44[playerid], 0);
    PlayerTextDrawUseBox(playerid, Textdraw44[playerid], true);
    PlayerTextDrawBoxColor(playerid, Textdraw44[playerid], 16711935);
    PlayerTextDrawSetShadow(playerid, Textdraw44[playerid], 0);
    PlayerTextDrawSetOutline(playerid, Textdraw44[playerid], 0);
    PlayerTextDrawBackgroundColor(playerid, Textdraw44[playerid], 8388863);
    PlayerTextDrawFont(playerid, Textdraw44[playerid], 0);


    Textdraw45[playerid] = CreatePlayerTextDraw(playerid, 78.000000, 288.722351, "2");
    PlayerTextDrawLetterSize(playerid, Textdraw45[playerid], 0.000000, 0.858643);
    PlayerTextDrawTextSize(playerid, Textdraw45[playerid], 37.000000, 0.000000);
    PlayerTextDrawAlignment(playerid, Textdraw45[playerid], 1);
    PlayerTextDrawColor(playerid, Textdraw45[playerid], 0);
    PlayerTextDrawUseBox(playerid, Textdraw45[playerid], true);
    PlayerTextDrawBoxColor(playerid, Textdraw45[playerid], 16711935);
    PlayerTextDrawSetShadow(playerid, Textdraw45[playerid], 0);
    PlayerTextDrawSetOutline(playerid, Textdraw45[playerid], 0);
    PlayerTextDrawBackgroundColor(playerid, Textdraw45[playerid], 8388863);
    PlayerTextDrawFont(playerid, Textdraw45[playerid], 0);


    Textdraw46[playerid] = CreatePlayerTextDraw(playerid, 120.000000, 289.100128, "3");
    PlayerTextDrawLetterSize(playerid, Textdraw46[playerid], 0.000000, 0.808643);
    PlayerTextDrawTextSize(playerid, Textdraw46[playerid], 74.000000, 0.000000);
    PlayerTextDrawAlignment(playerid, Textdraw46[playerid], 1);
    PlayerTextDrawColor(playerid, Textdraw46[playerid], 0);
    PlayerTextDrawUseBox(playerid, Textdraw46[playerid], true);
    PlayerTextDrawBoxColor(playerid, Textdraw46[playerid], 16711935);
    PlayerTextDrawSetShadow(playerid, Textdraw46[playerid], 0);
    PlayerTextDrawSetOutline(playerid, Textdraw46[playerid], 0);
    PlayerTextDrawBackgroundColor(playerid, Textdraw46[playerid], 8388863);
    PlayerTextDrawFont(playerid, Textdraw46[playerid], 0);


    Textdraw47[playerid] = CreatePlayerTextDraw(playerid, 155.500000, 288.855682, "4");
    PlayerTextDrawLetterSize(playerid, Textdraw47[playerid], 0.000000, 0.858643);
    PlayerTextDrawTextSize(playerid, Textdraw47[playerid], 112.000000, 0.000000);
    PlayerTextDrawAlignment(playerid, Textdraw47[playerid], 1);
    PlayerTextDrawColor(playerid, Textdraw47[playerid], 0);
    PlayerTextDrawUseBox(playerid, Textdraw47[playerid], true);
    PlayerTextDrawBoxColor(playerid, Textdraw47[playerid], 16711935);
    PlayerTextDrawSetShadow(playerid, Textdraw47[playerid], 0);
    PlayerTextDrawSetOutline(playerid, Textdraw47[playerid], 0);
    PlayerTextDrawBackgroundColor(playerid, Textdraw47[playerid], 8388863);
    PlayerTextDrawFont(playerid, Textdraw47[playerid], 0);


    Textdraw48[playerid] = CreatePlayerTextDraw(playerid, 167.500000, 289.233459, "5");
    PlayerTextDrawLetterSize(playerid, Textdraw48[playerid], 0.000000, 0.808643);
    PlayerTextDrawTextSize(playerid, Textdraw48[playerid], 151.000000, 0.000000);
    PlayerTextDrawAlignment(playerid, Textdraw48[playerid], 1);
    PlayerTextDrawColor(playerid, Textdraw48[playerid], 0);
    PlayerTextDrawUseBox(playerid, Textdraw48[playerid], true);
    PlayerTextDrawBoxColor(playerid, Textdraw48[playerid], 16711935);
    PlayerTextDrawSetShadow(playerid, Textdraw48[playerid], 0);
    PlayerTextDrawSetOutline(playerid, Textdraw48[playerid], 0);
    PlayerTextDrawBackgroundColor(playerid, Textdraw48[playerid], 8388863);
    PlayerTextDrawFont(playerid, Textdraw48[playerid], 0);


    PermanenT
    Jeffrey


    //EDIT:


    ich hab es mal print, und da kommt immer raus dass die Textdraws ganezeit gelöscht werden , warum?

    Mit freundlichen Grüßen
    [KoSoVa] :klugs:

    3 Mal editiert, zuletzt von [GeD]Max ()

  • Auf Anfrage in PN:


    @[GeD]Max:
    Willst du, wenn du zum Beispiel Balken 4 dem Spieler anzeigst, dass dann auch Balken 1, 2 und 3 geladen sind?
    Der ganze Code ist so verwirrend, weil du immer wieder alle Textdraws versteckst, danach dann wieder zeigst und so weiter.


    Also wenn ich es richtig verstehe, soll es ein Status sein, oder? Sprich wenn der 4. Balken angezeigt wird, dann sollen zwangsweise auch die anderen 3 davor angezeigt werden, oder?


  • Auf Anfrage in PN:


    @[GeD]Max:
    Willst du, wenn du zum Beispiel Balken 4 dem Spieler anzeigst, dass dann auch Balken 1, 2 und 3 geladen sind?
    Der ganze Code ist so verwirrend, weil du immer wieder alle Textdraws versteckst, danach dann wieder zeigst und so weiter.


    Also wenn ich es richtig verstehe, soll es ein Status sein, oder? Sprich wenn der 4. Balken angezeigt wird, dann sollen zwangsweise auch die anderen 3 davor angezeigt werden, oder?

    Ja genau, also wenn der Spieler auf die Stelle reinläuft , dann soll der erste Balken angezeigt werden nach nach 1 Sekunder der 2 und der erste soll dann trz bleiben und so weiter, und dann ab den letzten balken sollen alle gelöscht werden(sehe letzten Balken5 oder Balken 4)


    Das mit den Hide, soll halt abgefragt werden , wenn der Spieler z.b. geötet wurde während des Erobern sollen auch die Textdraws dann verschwinden, mir ist das nur mit dem Else eingefallen, anders weiß ich sonst nicht wie ich es machen soll...

    Mit freundlichen Grüßen
    [KoSoVa] :klugs:

  • anders weiß ich sonst nicht wie ich es machen soll...


    Ich denke, so sieht es um einiges besser aus, teste das mal:

    Spoiler anzeigen
    public EroberungAbfrageMap1(playerid)
    {
    new bool:show;
    if(gTeam[playerid] == TEAM_USARMY)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 0) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 0) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 0) show = true;
    }
    else if(gTeam[playerid] == TEAM_RUSSLAND)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 1) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 1) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 1) show = true;
    }
    if(show)
    {
    PlayerTextDrawShow(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawShow(playerid, Textdraw44[playerid]);//1
    SetTimerEx("EroberungBalken1",1000,false, "d", playerid);
    }
    else EroberungBalken5(playerid);
    return 1;
    }

    Spoiler anzeigen
    public EroberungBalken1(playerid)
    {
    new bool:show;
    if(gTeam[playerid] == TEAM_USARMY)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 0) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 0) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 0) show = true;
    }
    else if(gTeam[playerid] == TEAM_RUSSLAND)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 1) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 1) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 1) show = true;
    }
    if(show)
    {
    PlayerTextDrawShow(playerid, Textdraw45[playerid]);//2
    SetTimerEx("EroberungBalken2",1000,false, "d", playerid);
    }
    else EroberungBalken5(playerid);
    return 1;
    }

    Spoiler anzeigen
    public EroberungBalken2(playerid)
    {
    new bool:show;
    if(gTeam[playerid] == TEAM_USARMY)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 0) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 0) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 0) show = true;
    }
    else if(gTeam[playerid] == TEAM_RUSSLAND)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 1) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 1) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 1) show = true;
    }
    if(show)
    {
    PlayerTextDrawShow(playerid, Textdraw46[playerid]);//3
    SetTimerEx("EroberungBalken3",1000,false, "d", playerid);
    }
    else EroberungBalken5(playerid);
    return 1;
    }

    Spoiler anzeigen
    public EroberungBalken3(playerid)
    {
    new bool:show;
    if(gTeam[playerid] == TEAM_USARMY)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 0) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 0) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 0) show = true;
    }
    else if(gTeam[playerid] == TEAM_RUSSLAND)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 1) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 1) show = true;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 1) show = true;
    }
    if(show)
    {
    PlayerTextDrawShow(playerid, Textdraw47[playerid]);//4
    SetTimerEx("EroberungBalken4",1000,false, "d", playerid);
    }
    else EroberungBalken5(playerid);
    return 1;
    }

    Spoiler anzeigen
    public EroberungBalken4(playerid)
    {
    new show = 0;
    if(gTeam[playerid] == TEAM_USARMY)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 0) show = 1;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 0) show = 2;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 0) show = 3;
    }
    else if(gTeam[playerid] == TEAM_RUSSLAND)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A == 1) show = 1;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B == 1) show = 2;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C == 1) show = 3;
    }
    if(show != 0)
    {
    if(show == 1)
    {
    CheckEroberungMap1A = 0;
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}A{FFFFFF}' erobert!");
    }
    else if(show == 2)
    {
    CheckEroberungMap1B = 0;
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}B{FFFFFF}' erobert!");
    }
    else
    {
    CheckEroberungMap1C = 0;
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}C{FFFFFF}' erobert!");
    }
    PlayerTextDrawShow(playerid, Textdraw48[playerid]);//5
    SetTimerEx("EroberungBalken5",1000,false, "d", playerid);
    }
    else EroberungBalken5(playerid);
    return 1;
    }

    Spoiler anzeigen
    public EroberungBalken5(playerid)
    {
    PlayerTextDrawHide(playerid, Textdraw43[playerid]);//Hintergrund
    PlayerTextDrawHide(playerid, Textdraw44[playerid]);//1
    PlayerTextDrawHide(playerid, Textdraw45[playerid]);//2
    PlayerTextDrawHide(playerid, Textdraw46[playerid]);//3
    PlayerTextDrawHide(playerid, Textdraw47[playerid]);//4
    PlayerTextDrawHide(playerid, Textdraw48[playerid]);//5
    return 1;
    }

    3HZXdYd.png

    Einmal editiert, zuletzt von Jeffry ()

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Am Anfang klappt alles perfekt! Jedoch am ende nicht, wenn die Nachricht kommt mit "Sie haben erfolgreich..." ab da wird die Nachricht mehrmals zugesickt , und der Balken spackt rum, also es flackert und so weiter.


    (oben ist der Code :) )

    Mit freundlichen Grüßen
    [KoSoVa] :klugs:

  • Kann ich jetzt nicht ausprobieren... (siehe [SAMMELTHREAD] Kleine Scripting Fragen)


    soweit ich es wieder kann , werde ich dir sofort bescheid sagen bzw. edieren!



    //EDIT:


    Okay, also ich habs endlich hinbekommen , der Code musste so sein, danke Jeffrey! :)





    public EroberungBalken4(playerid)
    {
    new show[MAX_PLAYERS] = 0,show1[MAX_PLAYERS] = 0;
    if(gTeam[playerid] == TEAM_USARMY)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A[playerid] == 1) show[playerid] = 1;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B[playerid] == 1) show[playerid] = 2;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C[playerid] == 1) show[playerid] = 3;
    }
    else if(gTeam[playerid] == TEAM_RUSSLAND)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, -226.1881,1167.8138,19.7422) && CheckEroberungMap1A[playerid] == 0) show1[playerid] = 1;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -111.0474,1133.0267,19.7422) && CheckEroberungMap1B[playerid] == 0) show1[playerid] = 2;
    else if(IsPlayerInRangeOfPoint(playerid, 7.0, -11.3303,1219.5079,19.3527) && CheckEroberungMap1C[playerid] == 0) show1[playerid] = 3;
    }
    if(show[playerid] != 0 || show1[playerid] != 0)
    {
    if(show[playerid] == 3)
    {
    CheckEroberungMap1C[playerid] = 0;
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}C{FFFFFF}' erobert!");
    print("C-Wurde erobert(Show 3)");
    }
    else if(show1[playerid] == 3)
    {
    CheckEroberungMap1C[playerid] = 1;
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}C{FFFFFF}' erobert!");
    print("C-Wurde erobert(Show1 3)");
    }
    else if(show[playerid] == 2)
    {
    CheckEroberungMap1B[playerid] = 0;
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}B{FFFFFF}' erobert!");
    print("B-Wurde erobert(Show 2)");
    }
    else if(show1[playerid] == 2)
    {
    CheckEroberungMap1B[playerid] = 1;
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}B{FFFFFF}' erobert!");
    print("B-Wurde erobert(Show1 2)");
    }
    else if(show[playerid] == 1)
    {
    CheckEroberungMap1A[playerid] = 0;
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}A{FFFFFF}' erobert!");
    print("A-Wurde erobert(Show 1)");
    }
    else if(show1[playerid] == 1)
    {
    CheckEroberungMap1A[playerid] = 1;
    SendClientMessage(playerid, 0xFF0000FF,"[INFO] {FFFFFF}Sie haben erfolgreich '{FF0000}A{FFFFFF}' erobert!");
    print("A-Wurde erobert(Show1 1)");
    }
    PlayerTextDrawShow(playerid, Textdraw48[playerid]);//5
    SetTimerEx("EroberungBalken5",1000,false, "d", playerid);
    }
    else EroberungBalken5(playerid);
    return 1;
    }



    //EDIT


    und warum kann ich denn Befehl "/update" nicht ausführen? Dann kommt immer "Dieser Befehl wurde nicht gefunden."




    ocmd:update(playerid,params[])
    {
    new GetBestKillstreakTextdraw[144],GetABCTextdraw[144],GetRankTextdraw[144],BesterSpielerTextdraw[144],KDTextdraw[144],EroberungTextdraw[144],KillstreakTextdraw[144],
    KillsTextdraw[144],TodeTextdraw[144],GetEXPTextdraw[144];
    format(BesterSpielerTextdraw, sizeof(BesterSpielerTextdraw), "Bester Spieler: ~y~%s", BesterSpieler());
    PlayerTextDrawSetString(playerid,Textdraw29[playerid],BesterSpielerTextdraw);
    format(KillsTextdraw, sizeof(KillsTextdraw), "Kills: ~y~%i", SpielerInfo[playerid][pRundenKills]);
    PlayerTextDrawSetString(playerid,Textdraw31[playerid],KillsTextdraw);
    format(TodeTextdraw, sizeof(TodeTextdraw), "Tode: ~y~%i", SpielerInfo[playerid][pRundenTode]);
    PlayerTextDrawSetString(playerid,Textdraw32[playerid],TodeTextdraw);
    format(KillstreakTextdraw, sizeof(KillstreakTextdraw), "Killstreak: ~y~%i", SpielerInfo[playerid][pKillStreak]);
    PlayerTextDrawSetString(playerid,Textdraw33[playerid],KillstreakTextdraw);
    format(EroberungTextdraw, sizeof(EroberungTextdraw), "Eroberung: ~y~%i", SpielerInfo[playerid][pEroberung]);
    PlayerTextDrawSetString(playerid,Textdraw34[playerid],EroberungTextdraw);
    format(KDTextdraw, sizeof(KDTextdraw), "Aktuelle K/D: ~y~%i", SpielerInfo[playerid][pRundenKills]/SpielerInfo[playerid][pRundenTode]);
    PlayerTextDrawSetString(playerid,Textdraw35[playerid],KDTextdraw);
    format(GetEXPTextdraw, sizeof(GetEXPTextdraw), "EXP: ~y~%i/%s", SpielerInfo[playerid][pEXP],GetEXP(playerid));
    PlayerTextDrawSetString(playerid,Textdraw36[playerid],GetEXPTextdraw);
    format(GetABCTextdraw, sizeof(GetABCTextdraw), "A: ~y~%s B: ~y~%s C: ~y~%s", GetATextdraw(playerid),GetBTextdraw(playerid),GetCTextdraw(playerid));
    PlayerTextDrawSetString(playerid,Textdraw38[playerid],GetABCTextdraw);
    /*format(GetUSArmyextdraw, sizeof(GetUSArmyextdraw), "US Army Tickets: ~y~%i", GetUSArmyTickets(playerid));
    PlayerTextDrawSetString(playerid,Textdraw39[playerid],GetUSArmyextdraw);*/
    /*format(GetTerroristenTextdraw, sizeof(GetTerroristenTextdraw), "TerroristenTickets: ~y~%i", GetTerroristenTickets(playerid));
    PlayerTextDrawSetString(playerid,Textdraw40[playerid],GetTerroristenTextdraw);*/
    format(GetBestKillstreakTextdraw, sizeof(GetBestKillstreakTextdraw), "Hoechster Killstreak: ~y~%s", BesterKillstreak());
    PlayerTextDrawSetString(playerid,Textdraw41[playerid],GetBestKillstreakTextdraw);
    format(GetRankTextdraw, sizeof(GetRankTextdraw), "Rank: ~y~%s", GetRank(playerid));
    PlayerTextDrawSetString(playerid,Textdraw42[playerid],GetRankTextdraw);
    StatusBoxTextdrawsLoad(playerid);
    return 1;
    }


    Mit freundlichen Grüßen
    [KoSoVa] :klugs:

    6 Mal editiert, zuletzt von [GeD]Max ()

  • Problem 1:
    Setze es zu 1?
    CheckEroberungMap1A[playerid] = 1;
    Ich verstehe nicht wirklich was du machen willst, bzw. wo das Problem ist.


    Problem 2:
    Setze mal zwischen jede Zeile einen print, bis zu welcher Zeile printet er? Also, welche Zeile ist die erste, die nicht mehr ausgeführt wird?

  • Habe es schon erledigt,


    Okay es wird ungefähr ab hier nicht mehr geprintet:




    ocmd:update(playerid,params[])
    {
    new GetBestKillstreakTextdraw[144],GetABCTextdraw[144],GetRankTextdraw[144],BesterSpielerTextdraw[144],KDTextdraw[144],EroberungTextdraw[144],KillstreakTextdraw[144],
    KillsTextdraw[144],TodeTextdraw[144],GetEXPTextdraw[144];
    print("1");
    format(BesterSpielerTextdraw, sizeof(BesterSpielerTextdraw), "Bester Spieler: ~y~%s", BesterSpieler());
    PlayerTextDrawSetString(playerid,Textdraw29[playerid],BesterSpielerTextdraw);
    print("2");
    format(KillsTextdraw, sizeof(KillsTextdraw), "Kills: ~y~%i", SpielerInfo[playerid][pRundenKills]);
    PlayerTextDrawSetString(playerid,Textdraw31[playerid],KillsTextdraw);
    print("3");
    format(TodeTextdraw, sizeof(TodeTextdraw), "Tode: ~y~%i", SpielerInfo[playerid][pRundenTode]);
    PlayerTextDrawSetString(playerid,Textdraw32[playerid],TodeTextdraw);
    print("4");
    format(KillstreakTextdraw, sizeof(KillstreakTextdraw), "Killstreak: ~y~%i", SpielerInfo[playerid][pKillStreak]);
    PlayerTextDrawSetString(playerid,Textdraw33[playerid],KillstreakTextdraw);
    print("5");
    format(EroberungTextdraw, sizeof(EroberungTextdraw), "Eroberung: ~y~%i", SpielerInfo[playerid][pEroberung]);
    PlayerTextDrawSetString(playerid,Textdraw34[playerid],EroberungTextdraw);
    print("6");
    //Ab hier gehts nicht mehr weiter
    format(KDTextdraw, sizeof(KDTextdraw), "Aktuelle K/D: ~y~%i", SpielerInfo[playerid][pRundenKills]/SpielerInfo[playerid][pRundenTode]);
    PlayerTextDrawSetString(playerid,Textdraw35[playerid],KDTextdraw);
    print("7");
    format(GetEXPTextdraw, sizeof(GetEXPTextdraw), "EXP: ~y~%i/%s", SpielerInfo[playerid][pEXP],GetEXP(playerid));
    PlayerTextDrawSetString(playerid,Textdraw36[playerid],GetEXPTextdraw);
    print("8");
    format(GetABCTextdraw, sizeof(GetABCTextdraw), "A: ~y~%s B: ~y~%s C: ~y~%s", GetATextdraw(playerid),GetBTextdraw(playerid),GetCTextdraw(playerid));
    PlayerTextDrawSetString(playerid,Textdraw38[playerid],GetABCTextdraw);
    print("9");
    /*format(GetUSArmyextdraw, sizeof(GetUSArmyextdraw), "US Army Tickets: ~y~%i", GetUSArmyTickets(playerid));
    PlayerTextDrawSetString(playerid,Textdraw39[playerid],GetUSArmyextdraw);*/
    print("10");
    /*format(GetTerroristenTextdraw, sizeof(GetTerroristenTextdraw), "TerroristenTickets: ~y~%i", GetTerroristenTickets(playerid));
    PlayerTextDrawSetString(playerid,Textdraw40[playerid],GetTerroristenTextdraw);*/
    print("11");
    format(GetBestKillstreakTextdraw, sizeof(GetBestKillstreakTextdraw), "Hoechster Killstreak: ~y~%s", BesterKillstreak());
    PlayerTextDrawSetString(playerid,Textdraw41[playerid],GetBestKillstreakTextdraw);
    print("12");
    format(GetRankTextdraw, sizeof(GetRankTextdraw), "Rank: ~y~%s", GetRank(playerid));
    PlayerTextDrawSetString(playerid,Textdraw42[playerid],GetRankTextdraw);
    print("13");
    StatusBoxTextdrawsLoad(playerid);
    print("[size=10]14");[/size]
    return 1;
    }



    Muss ich jetzt einen Zweiten Befehl erstellen? Oder geht das auch anders?

    Mit freundlichen Grüßen
    [KoSoVa] :klugs:

  • Funktioniert es, wenn du es so schreibst?
    format(KDTextdraw, sizeof(KDTextdraw), "Aktuelle K/D: ~y~%i", SpielerInfo[playerid][pRundenKills]/SpielerInfo[playerid][pRundenTode]);
    zu:
    new tmp = SpielerInfo[playerid][pRundenTode];
    if(tmp == 0) tmp = 1;
    format(KDTextdraw, sizeof(KDTextdraw), "Aktuelle K/D: ~y~%i", SpielerInfo[playerid][pRundenKills]/tmp);

  • Funktioniert es, wenn du es so schreibst?
    format(KDTextdraw, sizeof(KDTextdraw), "Aktuelle K/D: ~y~%i", SpielerInfo[playerid][pRundenKills]/SpielerInfo[playerid][pRundenTode]);
    zu:
    new tmp = SpielerInfo[playerid][pRundenTode];
    if(tmp == 0) tmp = 1;
    format(KDTextdraw, sizeof(KDTextdraw), "Aktuelle K/D: ~y~%i", SpielerInfo[playerid][pRundenKills]/tmp);

    Jap, jetzt geht es , alles klar danke! Das wärs dann :)

    Mit freundlichen Grüßen
    [KoSoVa] :klugs: