Textdraw soll am Tacho kleiner werden

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
  • Hallo,
    Ich wollte an meinem Tacho so ein Grünen Balken Kleiner werden Lassen alle 10%
    Könnte mir pls da einer Helfen
    ich Glaub euch könnte das weiter helfen:
    Tacho[i][4] = TextDrawCreate(520,430,"_");//virtuale tank anzeige 100% tank
    TextDrawUseBox(Tacho[i][4],1);
    TextDrawBoxColor(Tacho[i][4],0x05B200FF);
    TextDrawTextSize(Tacho[i][4],625,440);
    TextDrawLetterSize(Tacho[i][4],0.500000,0.800000);
    TextDrawAlignment(Tacho[i][4],1);


    Tacho[i][5] = TextDrawCreate(525,430,"_");//virtuale tank anzeige 90% tank
    TextDrawUseBox(Tacho[i][5],1);
    TextDrawBoxColor(Tacho[i][5],0x05B200FF);
    TextDrawTextSize(Tacho[i][5],620,440);
    TextDrawLetterSize(Tacho[i][5],0.500000,0.800000);
    TextDrawAlignment(Tacho[i][5],1);


    Tacho[i][6] = TextDrawCreate(530,430,"_");//virtuale tank anzeige 80% tank
    TextDrawUseBox(Tacho[i][6],1);
    TextDrawBoxColor(Tacho[i][6],0x05B200FF);
    TextDrawTextSize(Tacho[i][6],615,440);
    TextDrawLetterSize(Tacho[i][6],0.500000,0.800000);
    TextDrawAlignment(Tacho[i][6],1);


    Tacho[i][7] = TextDrawCreate(535,430,"_");//virtuale tank anzeige 65% tank
    TextDrawUseBox(Tacho[i][7],1);
    TextDrawBoxColor(Tacho[i][7],0x05E400FF);
    TextDrawTextSize(Tacho[i][7],610,440);
    TextDrawLetterSize(Tacho[i][7],0.500000,0.800000);
    TextDrawAlignment(Tacho[i][7],1);


    Tacho[i][8] = TextDrawCreate(540,430,"_");//virtuale tank anzeige 50% tank
    TextDrawUseBox(Tacho[i][8],1);
    TextDrawBoxColor(Tacho[i][8],0xFFFF00FF);
    TextDrawTextSize(Tacho[i][8],605,440);
    TextDrawLetterSize(Tacho[i][8],0.500000,0.800000);
    TextDrawAlignment(Tacho[i][8],1);


    Tacho[i][9] = TextDrawCreate(545,430,"_");//virtuale tank anzeige 40% tank
    TextDrawUseBox(Tacho[i][9],1);
    TextDrawBoxColor(Tacho[i][9],0xFFFF00FF);
    TextDrawTextSize(Tacho[i][9],600,440);
    TextDrawLetterSize(Tacho[i][9],0.500000,0.800000);
    TextDrawAlignment(Tacho[i][9],1);


    Tacho[i][10] = TextDrawCreate(550,430,"_");//virtuale tank anzeige 30% tank
    TextDrawUseBox(Tacho[i][10],1);
    TextDrawBoxColor(Tacho[i][10],0xFFB200FF);
    TextDrawTextSize(Tacho[i][10],595,440);
    TextDrawLetterSize(Tacho[i][10],0.500000,0.800000);
    TextDrawAlignment(Tacho[i][10],1);


    Tacho[i][11] = TextDrawCreate(555,430,"_");//virtuale tank anzeige 20% tank
    TextDrawUseBox(Tacho[i][11],1);
    TextDrawBoxColor(Tacho[i][11],0xFFB200FF);
    TextDrawTextSize(Tacho[i][11],590,440);
    TextDrawLetterSize(Tacho[i][11],0.500000,0.800000);
    TextDrawAlignment(Tacho[i][11],1);


    Tacho[i][12] = TextDrawCreate(560,430,"_");//virtuale tank anzeige 10% tank
    TextDrawUseBox(Tacho[i][12],1);
    TextDrawBoxColor(Tacho[i][12],0xFF0100FF);
    TextDrawTextSize(Tacho[i][12],585,440);
    TextDrawLetterSize(Tacho[i][12],0.500000,0.800000);
    TextDrawAlignment(Tacho[i][12],1);


    Tacho[i][13] = TextDrawCreate(565,430,"_");//virtuale tank anzeige 5% tank
    TextDrawUseBox(Tacho[i][13],1);
    TextDrawBoxColor(Tacho[i][13],0xFF0100FF);
    TextDrawTextSize(Tacho[i][13],575,440);
    TextDrawLetterSize(Tacho[i][13],0.500000,0.800000);
    TextDrawAlignment(Tacho[i][13],1);


    Tacho[i][14] = TextDrawCreate(570,430,"_");//virtuale tank anzeige 0% tank
    TextDrawUseBox(Tacho[i][14],1);
    TextDrawBoxColor(Tacho[i][14],0xFF0100FF);
    TextDrawTextSize(Tacho[i][14],570,440);
    TextDrawLetterSize(Tacho[i][14],0.500000,0.800000);
    TextDrawAlignment(Tacho[i][14],1);


    aber des soll ingame im auto angezeigt werden is ja nicht schwer aber man muss rst eins dan bei 90% das andere und so kann mir pls jmd helfen?



    ?(

  • Hier mal ein Beispeil wie es leichter geht ^^


    Textdraw23[playerid] = CreatePlayerTextDraw(playerid,506.345520, 402.250000, "usebox");
    PlayerTextDrawLetterSize(playerid,Textdraw23[playerid], 0.000000, 1.627776);
    PlayerTextDrawTextSize(playerid,Textdraw23[playerid], 630.755493, 0.000000);
    PlayerTextDrawAlignment(playerid,Textdraw23[playerid], 1);
    PlayerTextDrawColor(playerid,Textdraw23[playerid], 0);
    PlayerTextDrawUseBox(playerid,Textdraw23[playerid], true);
    PlayerTextDrawBoxColor(playerid,Textdraw23[playerid], 8388863);
    PlayerTextDrawSetShadow(playerid,Textdraw23[playerid], 0);
    PlayerTextDrawSetOutline(playerid,Textdraw23[playerid], 0);
    PlayerTextDrawFont(playerid,Textdraw23[playerid], 0);


    PlayerTextDrawTextSize(i,Textdraw23[i],506.345520+(((629.333312-506.345520)/100)*tank[vID]),0.0);
    switch(tank[vID])
    {
    case 0..9:{PlayerTextDrawBoxColor(i,Textdraw23[i],Rot);}
    case 10..24:{PlayerTextDrawBoxColor(i,Textdraw23[i],Orange);}
    case 25..49:{PlayerTextDrawBoxColor(i,Textdraw23[i],Gelb);}
    case 50..74:{PlayerTextDrawBoxColor(i,Textdraw23[i],DGruen);}
    case 75..100:{PlayerTextDrawBoxColor(i,Textdraw23[i],Gruen);}
    }
    PlayerTextDrawShow(i,Textdraw23[i]);


    So wird die Box kleiner ^^ Vielleicht kannst du anhand des Codes ja einen Zusammenhang finden ^^