Textdraws werden nicht angezeigt

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
  • Ja hier mal der Tacho der ja angezeigt wird:


    for(new CPTacho=0; CPTacho<MAX_PLAYERS; CPTacho++)


    {
    TachoBox[CPTacho] = TextDrawCreate(625.000000, 373.000000, " ");
    TextDrawAlignment(TachoBox[CPTacho], 2);
    TextDrawBackgroundColor(TachoBox[CPTacho], 16711935);
    TextDrawFont(TachoBox[CPTacho], 1);
    TextDrawLetterSize(TachoBox[CPTacho], 0.800000, 14.100000);
    TextDrawColor(TachoBox[CPTacho], 255);
    TextDrawSetOutline(TachoBox[CPTacho], 1);
    TextDrawSetProportional(TachoBox[CPTacho], 0);
    TextDrawUseBox(TachoBox[CPTacho], 1);
    TextDrawBoxColor(TachoBox[CPTacho], -240);
    TextDrawTextSize(TachoBox[CPTacho], 79.000000, 134.000000);




    TachoAusenLinie1[CPTacho] = TextDrawCreate(529.000000, 372.000000, " ");
    TextDrawAlignment(TachoAusenLinie1[CPTacho], 2);
    TextDrawBackgroundColor(TachoAusenLinie1[CPTacho], 255);
    TextDrawFont(TachoAusenLinie1[CPTacho], 1);
    TextDrawLetterSize(TachoAusenLinie1[CPTacho], 0.500000, 1.000000);
    TextDrawColor(TachoAusenLinie1[CPTacho], -1);
    TextDrawSetOutline(TachoAusenLinie1[CPTacho], 0);
    TextDrawSetProportional(TachoAusenLinie1[CPTacho], 1);
    TextDrawSetShadow(TachoAusenLinie1[CPTacho], 1);
    TextDrawUseBox(TachoAusenLinie1[CPTacho], 1);
    TextDrawBoxColor(TachoAusenLinie1[CPTacho], 1465275903);
    TextDrawTextSize(TachoAusenLinie1[CPTacho], 0.000000, 218.000000);



    TachoAusenLinie2[CPTacho] = TextDrawCreate(420.000000, 375.000000, " ");
    TextDrawAlignment(TachoAusenLinie2[CPTacho], 2);
    TextDrawBackgroundColor(TachoAusenLinie2[CPTacho], 255);
    TextDrawFont(TachoAusenLinie2[CPTacho], 1);
    TextDrawLetterSize(TachoAusenLinie2[CPTacho], 0.500000, 1.000000);
    TextDrawColor(TachoAusenLinie2[CPTacho], -1);
    TextDrawSetOutline(TachoAusenLinie2[CPTacho], 0);
    TextDrawSetProportional(TachoAusenLinie2[CPTacho], 1);
    TextDrawSetShadow(TachoAusenLinie2[CPTacho], 1);
    TextDrawUseBox(TachoAusenLinie2[CPTacho], 1);
    TextDrawBoxColor(TachoAusenLinie2[CPTacho], 1465275903);
    TextDrawTextSize(TachoAusenLinie2[CPTacho], 0.000000, 0.000000);




    TachoKMH[CPTacho] = TextDrawCreate(429.000000, 377.000000, "km/h: %d");
    TextDrawBackgroundColor(TachoKMH[CPTacho], 255);
    TextDrawFont(TachoKMH[CPTacho], 1);
    TextDrawLetterSize(TachoKMH[CPTacho], 0.500000, 1.000000);
    TextDrawColor(TachoKMH[CPTacho], -1);
    TextDrawSetOutline(TachoKMH[CPTacho], 0);
    TextDrawSetProportional(TachoKMH[CPTacho], 1);
    TextDrawSetShadow(TachoKMH[CPTacho], 1);




    TachoBenzin[CPTacho] = TextDrawCreate(429.000000, 388.000000, "Benzin: %d/30");
    TextDrawBackgroundColor(TachoBenzin[CPTacho], 255);
    TextDrawFont(TachoBenzin[CPTacho], 1);
    TextDrawLetterSize(TachoBenzin[CPTacho], 0.500000, 1.000000);
    TextDrawColor(TachoBenzin[CPTacho], -1);
    TextDrawSetOutline(TachoBenzin[CPTacho], 0);
    TextDrawSetProportional(TachoBenzin[CPTacho], 1);
    TextDrawSetShadow(TachoBenzin[CPTacho], 1);




    TachoZustand[CPTacho] = TextDrawCreate(429.000000, 400.000000, "Zustand: %d%%");
    TextDrawBackgroundColor(TachoZustand[CPTacho], 255);
    TextDrawFont(TachoZustand[CPTacho], 1);
    TextDrawLetterSize(TachoZustand[CPTacho], 0.500000, 1.000000);
    TextDrawColor(TachoZustand[CPTacho], -1);
    TextDrawSetOutline(TachoZustand[CPTacho], 0);
    TextDrawSetProportional(TachoZustand[CPTacho], 1);
    TextDrawSetShadow(TachoZustand[CPTacho], 1);




    TachoLock[CPTacho] = TextDrawCreate(429.000000, 421.000000, "Abgeschlossen: ~g~Ja ~w~/ ~r~Nein");
    TextDrawBackgroundColor(TachoLock[CPTacho], 255);
    TextDrawFont(TachoLock[CPTacho], 1);
    TextDrawLetterSize(TachoLock[CPTacho], 0.500000, 1.000000);
    TextDrawColor(TachoLock[CPTacho], -1);
    TextDrawSetOutline(TachoLock[CPTacho], 0);
    TextDrawSetProportional(TachoLock[CPTacho], 1);
    TextDrawSetShadow(TachoLock[CPTacho], 1);




    TachoVeh[CPTacho] = TextDrawCreate(428.000000, 433.000000, "Fahrzeug: %s");
    TextDrawBackgroundColor(TachoVeh[CPTacho], 255);
    TextDrawFont(TachoVeh[CPTacho], 1);
    TextDrawLetterSize(TachoVeh[CPTacho], 0.500000, 1.000000);
    TextDrawColor(TachoVeh[CPTacho], -1);
    TextDrawSetOutline(TachoVeh[CPTacho], 0);
    TextDrawSetProportional(TachoVeh[CPTacho], 1);
    TextDrawSetShadow(TachoVeh[CPTacho], 1);




    TachoMotor[CPTacho] = TextDrawCreate(428.000000, 410.000000, "Motor: ~g~An ~w~/~r~ Aus");
    TextDrawBackgroundColor(TachoMotor[CPTacho], 255);
    TextDrawFont(TachoMotor[CPTacho], 1);
    TextDrawLetterSize(TachoMotor[CPTacho], 0.500000, 1.000000);
    TextDrawColor(TachoMotor[CPTacho], -1);
    TextDrawSetOutline(TachoMotor[CPTacho], 0);
    TextDrawSetProportional(TachoMotor[CPTacho], 1);
    TextDrawSetShadow(TachoMotor[CPTacho], 1);




    TachoAusenLinie3[CPTacho] = TextDrawCreate(487.000000, 373.000000, " ");
    TextDrawAlignment(TachoAusenLinie3[CPTacho], 2);
    TextDrawBackgroundColor(TachoAusenLinie3[CPTacho], 16711935);
    TextDrawFont(TachoAusenLinie3[CPTacho], 1);
    TextDrawLetterSize(TachoAusenLinie3[CPTacho], 0.800000, 14.100000);
    TextDrawColor(TachoAusenLinie3[CPTacho], 255);
    TextDrawSetOutline(TachoAusenLinie3[CPTacho], 1);
    TextDrawSetProportional(TachoAusenLinie3[CPTacho], 0);
    TextDrawUseBox(TachoAusenLinie3[CPTacho], 1);
    TextDrawBoxColor(TachoAusenLinie3[CPTacho], -240);
    TextDrawTextSize(TachoAusenLinie3[CPTacho], 79.000000, 134.000000);


    }


    Und dann hier noch der 2 andere Textdraws sie nicht angezeigt werden



    ForumAdresse = TextDrawCreate(89.000000, 427.000000, "Web: Entfernt");
    TextDrawAlignment(ForumAdresse, 2);
    TextDrawBackgroundColor(ForumAdresse, 255);
    TextDrawFont(ForumAdresse, 1);
    TextDrawLetterSize(ForumAdresse, 0.519999, 1.100000);
    TextDrawColor(ForumAdresse, -1);
    TextDrawSetOutline(ForumAdresse, 0);
    TextDrawSetProportional(ForumAdresse, 1);
    TextDrawSetShadow(ForumAdresse, 1);




    TSIP = TextDrawCreate(111.000000, 437.000000, "TS3: Entfernt");
    TextDrawAlignment(TSIP, 2);
    TextDrawBackgroundColor(TSIP, 255);
    TextDrawFont(TSIP, 1);
    TextDrawLetterSize(TSIP, 0.519999, 1.100000);
    TextDrawColor(TSIP, -1);
    TextDrawSetOutline(TSIP, 0);
    TextDrawSetProportional(TSIP, 1);
    TextDrawSetShadow(TSIP, 1);

  • Also den tacho lass ich bei OnPlayerStateChange anzeigen:


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    TextDrawShowForPlayer(playerid,TachoBox[playerid]);
    TextDrawShowForPlayer(playerid,TachoAusenLinie1[playerid]);
    TextDrawShowForPlayer(playerid,TachoAusenLinie2[playerid]);
    TextDrawShowForPlayer(playerid,TachoKMH[playerid]);
    TextDrawShowForPlayer(playerid,TachoBenzin[playerid]);
    TextDrawShowForPlayer(playerid,TachoZustand[playerid]);
    TextDrawShowForPlayer(playerid,TachoLock[playerid]);
    TextDrawShowForPlayer(playerid,TachoVeh[playerid]);
    TextDrawShowForPlayer(playerid,TachoMotor[playerid]);
    TextDrawShowForPlayer(playerid,TachoAusenLinie3[playerid]);
    SeheTacho[playerid] = true;
    }
    if(newstate == PLAYER_STATE_ONFOOT)
    {
    TextDrawHideForPlayer(playerid,TachoBox[playerid]);
    TextDrawHideForPlayer(playerid,TachoAusenLinie1[playerid]);
    TextDrawHideForPlayer(playerid,TachoAusenLinie2[playerid]);
    TextDrawHideForPlayer(playerid,TachoKMH[playerid]);
    TextDrawHideForPlayer(playerid,TachoBenzin[playerid]);
    TextDrawHideForPlayer(playerid,TachoZustand[playerid]);
    TextDrawHideForPlayer(playerid,TachoLock[playerid]);
    TextDrawHideForPlayer(playerid,TachoVeh[playerid]);
    TextDrawHideForPlayer(playerid,TachoMotor[playerid]);
    TextDrawHideForPlayer(playerid,TachoAusenLinie3[playerid]);
    SeheTacho[playerid] = false;
    }
    }


    und die Forums adresse und die TS IP bei OnlayerSpawn:


    public OnPlayerSpawn(playerid)
    {
    TextDrawShowForPlayer(playerid,ForumAdresse);
    TextDrawShowForPlayer(playerid,TSIP);
    }