Danke, nun hab ich das problem das er nicht bis 100% kommt sondern nur bis 93% aber die Textdraws verschwinden. Und der Balken überdeckt die % Anzahl kann man das irgendwie ändern?
Kann man vllt. das erstellen der Textdraws kürzen?
public Ladebalken(playerid)
{
ladebalken[playerid]++;
if(ladebalken[playerid] == 1)
{
ladebalken[playerid]++;
Textdraw67 = TextDrawCreate(231.714447, 371.846679, "usebox");
TextDrawLetterSize(Textdraw67, 0.000000, 1.075927);
TextDrawTextSize(Textdraw67, 227.714355, 0.000000);
TextDrawAlignment(Textdraw67, 1);
TextDrawColor(Textdraw67, 0);
TextDrawUseBox(Textdraw67, true);
TextDrawBoxColor(Textdraw67, 65535);
TextDrawSetShadow(Textdraw67, 0);
TextDrawSetOutline(Textdraw67, 0);
TextDrawFont(Textdraw67, 0);
TextDrawShowForPlayer(playerid, Textdraw67);
TextDrawSetString(Textdraw68, "3%");
TextDrawShowForPlayer(playerid, Textdraw68);
}
else if(ladebalken[playerid] == 2)
{
ladebalken[playerid]++;
Textdraw67 = TextDrawCreate(245.714447, 371.846679, "usebox");
TextDrawLetterSize(Textdraw67, 0.000000, 1.075927);
TextDrawTextSize(Textdraw67, 227.714355, 0.000000);
TextDrawAlignment(Textdraw67, 1);
TextDrawColor(Textdraw67, 0);
TextDrawUseBox(Textdraw67, true);
TextDrawBoxColor(Textdraw67, 65535);
TextDrawSetShadow(Textdraw67, 0);
TextDrawSetOutline(Textdraw67, 0);
TextDrawFont(Textdraw67, 0);
TextDrawShowForPlayer(playerid, Textdraw67);
TextDrawSetString(Textdraw68, "11%");
TextDrawShowForPlayer(playerid, Textdraw68);
}
else if(ladebalken[playerid] == 3)
{
ladebalken[playerid]++;
Textdraw67 = TextDrawCreate(270.714447, 371.846679, "usebox");
TextDrawLetterSize(Textdraw67, 0.000000, 1.075927);
TextDrawTextSize(Textdraw67, 227.714355, 0.000000);
TextDrawAlignment(Textdraw67, 1);
TextDrawColor(Textdraw67, 0);
TextDrawUseBox(Textdraw67, true);
TextDrawBoxColor(Textdraw67, 65535);
TextDrawSetShadow(Textdraw67, 0);
TextDrawSetOutline(Textdraw67, 0);
TextDrawFont(Textdraw67, 0);
TextDrawShowForPlayer(playerid, Textdraw67);
TextDrawSetString(Textdraw68, "18%");
TextDrawShowForPlayer(playerid, Textdraw68);
}
else if(ladebalken[playerid] == 4)
{
ladebalken[playerid]++;
Textdraw67 = TextDrawCreate(290.714447, 371.846679, "usebox");
TextDrawLetterSize(Textdraw67, 0.000000, 1.075927);
TextDrawTextSize(Textdraw67, 227.714355, 0.000000);
TextDrawAlignment(Textdraw67, 1);
TextDrawColor(Textdraw67, 0);
TextDrawUseBox(Textdraw67, true);
TextDrawBoxColor(Textdraw67, 65535);
TextDrawSetShadow(Textdraw67, 0);
TextDrawSetOutline(Textdraw67, 0);
TextDrawFont(Textdraw67, 0);
TextDrawShowForPlayer(playerid, Textdraw67);
TextDrawSetString(Textdraw68, "32%");
TextDrawShowForPlayer(playerid, Textdraw68);
}
else if(ladebalken[playerid] == 5)
{
ladebalken[playerid]++;
Textdraw67 = TextDrawCreate(310.714447, 371.846679, "usebox");
TextDrawLetterSize(Textdraw67, 0.000000, 1.075927);
TextDrawTextSize(Textdraw67, 227.714355, 0.000000);
TextDrawAlignment(Textdraw67, 1);
TextDrawColor(Textdraw67, 0);
TextDrawUseBox(Textdraw67, true);
TextDrawBoxColor(Textdraw67, 65535);
TextDrawSetShadow(Textdraw67, 0);
TextDrawSetOutline(Textdraw67, 0);
TextDrawFont(Textdraw67, 0);
TextDrawShowForPlayer(playerid, Textdraw67);
TextDrawSetString(Textdraw68, "54%");
TextDrawShowForPlayer(playerid, Textdraw68);
}
else if(ladebalken[playerid] == 6)
{
ladebalken[playerid]++;
Textdraw67 = TextDrawCreate(340.714447, 371.846679, "usebox");
TextDrawLetterSize(Textdraw67, 0.000000, 1.075927);
TextDrawTextSize(Textdraw67, 227.714355, 0.000000);
TextDrawAlignment(Textdraw67, 1);
TextDrawColor(Textdraw67, 0);
TextDrawUseBox(Textdraw67, true);
TextDrawBoxColor(Textdraw67, 65535);
TextDrawSetShadow(Textdraw67, 0);
TextDrawSetOutline(Textdraw67, 0);
TextDrawFont(Textdraw67, 0);
TextDrawShowForPlayer(playerid, Textdraw67);
TextDrawSetString(Textdraw68, "62%");
TextDrawShowForPlayer(playerid, Textdraw68);
}
else if(ladebalken[playerid] == 7)
{
ladebalken[playerid]++;
Textdraw67 = TextDrawCreate(360.714447, 371.846679, "usebox");
TextDrawLetterSize(Textdraw67, 0.000000, 1.075927);
TextDrawTextSize(Textdraw67, 227.714355, 0.000000);
TextDrawAlignment(Textdraw67, 1);
TextDrawColor(Textdraw67, 0);
TextDrawUseBox(Textdraw67, true);
TextDrawBoxColor(Textdraw67, 65535);
TextDrawSetShadow(Textdraw67, 0);
TextDrawSetOutline(Textdraw67, 0);
TextDrawFont(Textdraw67, 0);
TextDrawShowForPlayer(playerid, Textdraw67);
TextDrawSetString(Textdraw68, "79%");
TextDrawShowForPlayer(playerid, Textdraw68);
}
else if(ladebalken[playerid] == 8)
{
ladebalken[playerid]++;
TextDrawDestroy(Textdraw67);
Textdraw67 = TextDrawCreate(380.714447, 371.846679, "usebox");
TextDrawLetterSize(Textdraw67, 0.000000, 1.075927);
TextDrawTextSize(Textdraw67, 227.714355, 0.000000);
TextDrawAlignment(Textdraw67, 1);
TextDrawColor(Textdraw67, 0);
TextDrawUseBox(Textdraw67, true);
TextDrawBoxColor(Textdraw67, 65535);
TextDrawSetShadow(Textdraw67, 0);
TextDrawSetOutline(Textdraw67, 0);
TextDrawFont(Textdraw67, 0);
TextDrawShowForPlayer(playerid, Textdraw67);
TextDrawSetString(Textdraw68, "86%");
TextDrawShowForPlayer(playerid, Textdraw68);
}
else if(ladebalken[playerid] == 9)
{
ladebalken[playerid]++;
TextDrawDestroy(Textdraw67);
Textdraw67 = TextDrawCreate(400.714447, 371.846679, "usebox");
TextDrawLetterSize(Textdraw67, 0.000000, 1.075927);
TextDrawTextSize(Textdraw67, 227.714355, 0.000000);
TextDrawAlignment(Textdraw67, 1);
TextDrawColor(Textdraw67, 0);
TextDrawUseBox(Textdraw67, true);
TextDrawBoxColor(Textdraw67, 65535);
TextDrawSetShadow(Textdraw67, 0);
TextDrawSetOutline(Textdraw67, 0);
TextDrawFont(Textdraw67, 0);
TextDrawShowForPlayer(playerid, Textdraw67);
TextDrawSetString(Textdraw68, "93%");
TextDrawShowForPlayer(playerid, Textdraw68);
}
else if(ladebalken[playerid] == 10)
{
ladebalken[playerid]++;
TextDrawDestroy(Textdraw67);
Textdraw67 = TextDrawCreate(414.571472, 371.846679, "usebox");
TextDrawLetterSize(Textdraw67, 0.000000, 1.075927);
TextDrawTextSize(Textdraw67, 227.714355, 0.000000);
TextDrawAlignment(Textdraw67, 1);
TextDrawColor(Textdraw67, 0);
TextDrawUseBox(Textdraw67, true);
TextDrawBoxColor(Textdraw67, 65535);
TextDrawSetShadow(Textdraw67, 0);
TextDrawSetOutline(Textdraw67, 0);
TextDrawFont(Textdraw67, 0);
TextDrawShowForPlayer(playerid, Textdraw67);
TextDrawSetString(Textdraw68, "100%");
TextDrawShowForPlayer(playerid, Textdraw68);
}
else if(ladebalken[playerid] == 11)
{
TextDrawHideForPlayer(playerid, Textdraw47), TextDrawHideForPlayer(playerid, Textdraw48), TextDrawHideForPlayer(playerid, Textdraw49),
TextDrawHideForPlayer(playerid, Textdraw50), TextDrawHideForPlayer(playerid, Textdraw0), TextDrawShowForPlayer(playerid, Textdraw68),
TextDrawShowForPlayer(playerid, Textdraw67), TextDrawShowForPlayer(playerid, Textdraw66), TextDrawShowForPlayer(playerid, Textdraw65);
}
return 1;
}