PlayerTextDraw ist nicht anklickbar

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
  • Hey ich will ein TextDraw Login/Register machen und stehe jetzt vor ein paar Problemen.


    Hier die Textdraws bei OnConnect:


    Das Problem: Passwort und Login lassen sich nicht anklicken...
    Und ich weiß nicht wie ich das mit meinem jetzigen Login/Register verbinde (das aber später)
    Und der Background (SB_BG) wird nicht angezeigt.


    //######### Startbildschirm #############

    SB_BG[playerid] = CreatePlayerTextDraw(playerid,320.000000, 0.000000, "Hintergrund ");
    PlayerTextDrawAlignment(playerid,SB_BG[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,SB_BG[playerid], 255);
    PlayerTextDrawFont(playerid,SB_BG[playerid], 1);
    PlayerTextDrawLetterSize(playerid,SB_BG[playerid], 0.500000, 50.000000);
    PlayerTextDrawColor(playerid,SB_BG[playerid], -1);
    PlayerTextDrawSetOutline(playerid,SB_BG[playerid], 0);
    PlayerTextDrawSetProportional(playerid,SB_BG[playerid], 1);
    PlayerTextDrawSetShadow(playerid,SB_BG[playerid], 1);
    PlayerTextDrawUseBox(playerid,SB_BG[playerid], 1);
    PlayerTextDrawBoxColor(playerid,SB_BG[playerid], 255);
    PlayerTextDrawTextSize(playerid,SB_BG[playerid], 0.000000, -650.000000);

    SB_NICK[playerid] = CreatePlayerTextDraw(playerid,230.000000, 220.000000, "Nickname:");
    PlayerTextDrawAlignment(playerid,SB_NICK[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,SB_NICK[playerid], 255);
    PlayerTextDrawFont(playerid,SB_NICK[playerid], 1);
    PlayerTextDrawLetterSize(playerid,SB_NICK[playerid], 0.300000, 1.399999);
    PlayerTextDrawColor(playerid,SB_NICK[playerid], -65281);
    PlayerTextDrawSetOutline(playerid,SB_NICK[playerid], 0);
    PlayerTextDrawSetProportional(playerid,SB_NICK[playerid], 1);
    PlayerTextDrawSetShadow(playerid,SB_NICK[playerid], 1);

    SB_PASS[playerid] = CreatePlayerTextDraw(playerid,230.000000, 250.000000, "Passwort:");
    PlayerTextDrawAlignment(playerid,SB_PASS[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,SB_PASS[playerid], 255);
    PlayerTextDrawFont(playerid,SB_PASS[playerid], 1);
    PlayerTextDrawLetterSize(playerid,SB_PASS[playerid], 0.300000, 1.399999);
    PlayerTextDrawColor(playerid,SB_PASS[playerid], -65281);
    PlayerTextDrawSetOutline(playerid,SB_PASS[playerid], 0);
    PlayerTextDrawSetProportional(playerid,SB_PASS[playerid], 1);
    PlayerTextDrawSetShadow(playerid,SB_PASS[playerid], 1);

    SB_NICKFELD[playerid] = CreatePlayerTextDraw(playerid,325.000000, 220.000000, "NickFeld ");
    PlayerTextDrawAlignment(playerid,SB_NICKFELD[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,SB_NICKFELD[playerid], 255);
    PlayerTextDrawFont(playerid,SB_NICKFELD[playerid], 1);
    PlayerTextDrawLetterSize(playerid,SB_NICKFELD[playerid], 0.300000, 1.399999);
    PlayerTextDrawColor(playerid,SB_NICKFELD[playerid], -1);
    PlayerTextDrawSetOutline(playerid,SB_NICKFELD[playerid], 0);
    PlayerTextDrawSetProportional(playerid,SB_NICKFELD[playerid], 1);
    PlayerTextDrawSetShadow(playerid,SB_NICKFELD[playerid], 1);
    PlayerTextDrawUseBox(playerid,SB_NICKFELD[playerid], 1);
    PlayerTextDrawBoxColor(playerid,SB_NICKFELD[playerid], 673322751);
    PlayerTextDrawTextSize(playerid,SB_NICKFELD[playerid], 0.000000, -130.000000);

    SB_PASSFELD[playerid] = CreatePlayerTextDraw(playerid,325.000000, 250.000000, "#########");
    PlayerTextDrawAlignment(playerid,SB_PASSFELD[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,SB_PASSFELD[playerid], 255);
    PlayerTextDrawFont(playerid,SB_PASSFELD[playerid], 1);
    PlayerTextDrawLetterSize(playerid,SB_PASSFELD[playerid], 0.300000, 1.399999);
    PlayerTextDrawColor(playerid,SB_PASSFELD[playerid], -1);
    PlayerTextDrawSetOutline(playerid,SB_PASSFELD[playerid], 0);
    PlayerTextDrawSetProportional(playerid,SB_PASSFELD[playerid], 1);
    PlayerTextDrawSetShadow(playerid,SB_PASSFELD[playerid], 1);
    PlayerTextDrawUseBox(playerid,SB_PASSFELD[playerid], 1);
    PlayerTextDrawBoxColor(playerid,SB_PASSFELD[playerid], 673322751);
    PlayerTextDrawTextSize(playerid,SB_PASSFELD[playerid], 0.000000, -130.000000);

    SB_LOGIN[playerid] = CreatePlayerTextDraw(playerid,420.000000, 300.000000, "Login");
    PlayerTextDrawAlignment(playerid,SB_LOGIN[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,SB_LOGIN[playerid], 255);
    PlayerTextDrawFont(playerid,SB_LOGIN[playerid], 1);
    PlayerTextDrawLetterSize(playerid,SB_LOGIN[playerid], 0.300000, 1.000000);
    PlayerTextDrawColor(playerid,SB_LOGIN[playerid], -1);
    PlayerTextDrawSetOutline(playerid,SB_LOGIN[playerid], 0);
    PlayerTextDrawSetProportional(playerid,SB_LOGIN[playerid], 1);
    PlayerTextDrawSetShadow(playerid,SB_LOGIN[playerid], 1);
    PlayerTextDrawUseBox(playerid,SB_LOGIN[playerid], 1);
    PlayerTextDrawBoxColor(playerid,SB_LOGIN[playerid], 673322751);
    PlayerTextDrawTextSize(playerid,SB_LOGIN[playerid], 0.000000, -34.000000);

    SB_SN[playerid] = CreatePlayerTextDraw(playerid,294.000000, 156.000000, "ServerName");
    PlayerTextDrawAlignment(playerid,SB_SN[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,SB_SN[playerid], 255);
    PlayerTextDrawFont(playerid,SB_SN[playerid], 0);
    PlayerTextDrawLetterSize(playerid,SB_SN[playerid], 0.700000, 3.000000);
    PlayerTextDrawColor(playerid,SB_SN[playerid], -65281);
    PlayerTextDrawSetOutline(playerid,SB_SN[playerid], 0);
    PlayerTextDrawSetProportional(playerid,SB_SN[playerid], 1);
    PlayerTextDrawSetShadow(playerid,SB_SN[playerid], 1);

    new NickFeld[128];
    format(NickFeld,sizeof(NickFeld),"%s",SpielerName(playerid));
    PlayerTextDrawSetString(playerid,SB_NICKFELD[playerid],NickFeld);
    PlayerTextDrawSetString(playerid,SB_SN[playerid],SERVERNAME);
    PlayerTextDrawSetString(playerid,SB_PASSFELD[playerid],"Passwort");

    PlayerTextDrawSetSelectable(playerid, SB_PASSFELD[playerid], 1);
    PlayerTextDrawSetSelectable(playerid, SB_LOGIN[playerid], 1);

    SelectTextDraw(playerid, 0x00FF00FF);

    PlayerTextDrawShow(playerid, SB_BG[playerid]);
    PlayerTextDrawShow(playerid, SB_NICK[playerid]);
    PlayerTextDrawShow(playerid, SB_PASS[playerid]);
    PlayerTextDrawShow(playerid, SB_NICKFELD[playerid]);
    PlayerTextDrawShow(playerid, SB_PASSFELD[playerid]);
    PlayerTextDrawShow(playerid, SB_LOGIN[playerid]);
    PlayerTextDrawShow(playerid, SB_SN[playerid]);


    public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
    {
    if(playertextid == SB_PASSFELD[playerid]) {
    CancelSelectTextDraw(playerid);
    PlayerTextDrawHide(playerid, SB_PASSFELD[playerid]);
    }
    return 1;
    }

    Mit freundlichen Grüßen,
    Derakar

  • SB_PASS[playerid] = CreatePlayerTextDraw(playerid,230.000000, 250.000000, "Passwort:");
    PlayerTextDrawAlignment(playerid,SB_PASS[playerid], 2);
    PlayerTextDrawBackgroundColor(playerid,SB_PASS[playerid], 255);
    PlayerTextDrawFont(playerid,SB_PASS[playerid], 1);
    PlayerTextDrawLetterSize(playerid,SB_PASS[playerid], 0.300000, 1.399999);
    PlayerTextDrawColor(playerid,SB_PASS[playerid], -65281);
    PlayerTextDrawSetOutline(playerid,SB_PASS[playerid], 0);
    PlayerTextDrawSetProportional(playerid,SB_PASS[playerid], 1);
    PlayerTextDrawSetShadow(playerid,SB_PASS[playerid], 1);
    Kannst du mir bitte zeigen, wo du hier selectable aktivierst?

  • Achso ja das hab ich nicht ich will ja nur die Box rechts daneben ankickbar machen. Das hab ich gemacht:


    PlayerTextDrawSetSelectable(playerid, SB_PASSFELD[playerid], 1);
    PlayerTextDrawSetSelectable(playerid, SB_LOGIN[playerid], 1);


    Sieht so aus:


    Mit freundlichen Grüßen,
    Derakar

  • PlayerTextDrawTextSize(playerid,SB_PASSFELD[playerid], 0.000000, -130.000000);
    X-Achse ist 0, soll wohl nicht so sein, oder? ^^

  • @K3Ksii:
    wie machst du die Durchgehende linie im Chat ?



    btw Thread


    so habe ich das versuch das so zu machen einfach durch dein Texwdraw zu ersetzen :DD

    //oben im Script
    new Text:connect6;



    //OnGameModeInit
    connect6 = TextDrawCreate(-40.000000, 296.000000, ".");
    TextDrawBackgroundColor(connect6, 255);
    TextDrawFont(connect6, 1);
    TextDrawLetterSize(connect6, 0.500000, -0.299999);
    TextDrawColor(connect6, -1);
    TextDrawSetOutline(connect6, 0);
    TextDrawSetProportional(connect6, 1);
    TextDrawSetShadow(connect6, 1);
    TextDrawUseBox(connect6, 1);
    TextDrawBoxColor(connect6, -16776961);
    TextDrawTextSize(connect6, 670.000000, 0.000000);
    TextDrawSetSelectable(connect6, 0);


    //OnPlayerConnect
    TextDrawShowForPlayer(playerid,connect6);

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen


  • Ja aber ich würde das gerne mit PlayerTextDraws machen um Bugs zu vermeiden.

    Mit freundlichen Grüßen,
    Derakar