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.