Login & Register Textdraw Proplem

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 und guten Tag =)
    Ich habe ein Problem mit meinem Register und Login, und zwar kann ich das Textdraw [ Login oder Register ] nicht anklicken ???




    PAWN Quelltext






    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18





    #include <a_samp>
    #include <sscanf2>
    #include <dini>


    #define DIA_LOG 1
    #define DIA_REG 1



    new Text:RegisterBackground;
    new Text:Textdraw1;
    new Text:Textdraw2;
    new Text:Textdraw3;
    new Text:Textdraw4;
    new Text:Textdraw5;
    new Text:Textdraw6;
    new Text:Textdraw7;
    new Text:Textdraw8;
    new PlayerText:RegsiterLogin[MAX_PLAYERS];


















    PAWN Quelltext






    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103





    public OnGameModeInit()
    {
    // Don't use these lines if it's a filterscript
    SetGameModeText("test");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);


    RegisterBackground = TextDrawCreate(517.111145, 123.455535, "usebox");
    TextDrawLetterSize(RegisterBackground, 0.000000, 22.415184);
    TextDrawTextSize(RegisterBackground, 133.555541, 0.000000);
    TextDrawAlignment(RegisterBackground, 1);
    TextDrawColor(RegisterBackground, 0);
    TextDrawUseBox(RegisterBackground, true);
    TextDrawBoxColor(RegisterBackground, -1);
    TextDrawSetShadow(RegisterBackground, 0);
    TextDrawSetOutline(RegisterBackground, 0);
    TextDrawFont(RegisterBackground, 0);


    Textdraw1 = TextDrawCreate(508.666687, 131.419998, "usebox");
    TextDrawLetterSize(Textdraw1, 0.000000, 20.534690);
    TextDrawTextSize(Textdraw1, 142.888885, 0.000000);
    TextDrawAlignment(Textdraw1, 1);
    TextDrawColor(Textdraw1, 0);
    TextDrawUseBox(Textdraw1, true);
    TextDrawBoxColor(Textdraw1, -2147483393);
    TextDrawSetShadow(Textdraw1, 0);
    TextDrawSetOutline(Textdraw1, 0);
    TextDrawFont(Textdraw1, 0);


    Textdraw2 = TextDrawCreate(263.111083, 145.351089, "Willkommen");
    TextDrawLetterSize(Textdraw2, 0.449999, 1.600000);
    TextDrawAlignment(Textdraw2, 1);
    TextDrawColor(Textdraw2, -1);
    TextDrawSetShadow(Textdraw2, 0);
    TextDrawSetOutline(Textdraw2, 1);
    TextDrawBackgroundColor(Textdraw2, 51);
    TextDrawFont(Textdraw2, 2);
    TextDrawSetProportional(Textdraw2, 1);


    Textdraw3 = TextDrawCreate(302.222290, 176.213287, "Auf");
    TextDrawLetterSize(Textdraw3, 0.449999, 1.600000);
    TextDrawAlignment(Textdraw3, 1);
    TextDrawColor(Textdraw3, -1);
    TextDrawSetShadow(Textdraw3, 0);
    TextDrawSetOutline(Textdraw3, 1);
    TextDrawBackgroundColor(Textdraw3, 51);
    TextDrawFont(Textdraw3, 2);
    TextDrawSetProportional(Textdraw3, 1);


    Textdraw4 = TextDrawCreate(231.999801, 217.031112, "test");
    TextDrawLetterSize(Textdraw4, 0.449999, 1.600000);
    TextDrawAlignment(Textdraw4, 1);
    TextDrawColor(Textdraw4, -1);
    TextDrawSetShadow(Textdraw4, 0);
    TextDrawSetOutline(Textdraw4, 1);
    TextDrawBackgroundColor(Textdraw4, 51);
    TextDrawFont(Textdraw4, 2);
    TextDrawSetProportional(Textdraw4, 1);


    Textdraw5 = TextDrawCreate(641.555541, 1.500000, "usebox");
    TextDrawLetterSize(Textdraw5, 0.000000, 4.273950);
    TextDrawTextSize(Textdraw5, -2.000000, 0.000000);
    TextDrawAlignment(Textdraw5, 1);
    TextDrawColor(Textdraw5, 0);
    TextDrawUseBox(Textdraw5, true);
    TextDrawBoxColor(Textdraw5, 102);
    TextDrawSetShadow(Textdraw5, 0);
    TextDrawSetOutline(Textdraw5, 0);
    TextDrawFont(Textdraw5, 0);


    Textdraw6 = TextDrawCreate(41.111110, 43.811111, "usebox");
    TextDrawLetterSize(Textdraw6, 0.000000, 44.704566);
    TextDrawTextSize(Textdraw6, -2.000000, 0.000000);
    TextDrawAlignment(Textdraw6, 1);
    TextDrawColor(Textdraw6, 0);
    TextDrawUseBox(Textdraw6, true);
    TextDrawBoxColor(Textdraw6, 102);
    TextDrawSetShadow(Textdraw6, 0);
    TextDrawSetOutline(Textdraw6, 0);
    TextDrawFont(Textdraw6, 0);


    Textdraw7 = TextDrawCreate(641.555541, 407.686676, "usebox");
    TextDrawLetterSize(Textdraw7, 0.000000, 4.273950);
    TextDrawTextSize(Textdraw7, 37.555553, 0.000000);
    TextDrawAlignment(Textdraw7, 1);
    TextDrawColor(Textdraw7, 0);
    TextDrawUseBox(Textdraw7, true);
    TextDrawBoxColor(Textdraw7, 102);
    TextDrawSetShadow(Textdraw7, 0);
    TextDrawSetOutline(Textdraw7, 0);
    TextDrawFont(Textdraw7, 0);


    Textdraw8 = TextDrawCreate(641.555541, 407.686676, "usebox");
    TextDrawLetterSize(Textdraw8, 0.000000, -40.857902);
    TextDrawTextSize(Textdraw8, 594.888916, 0.000000);
    TextDrawAlignment(Textdraw8, 1);
    TextDrawColor(Textdraw8, 0);
    TextDrawUseBox(Textdraw8, true);
    TextDrawBoxColor(Textdraw8, 102);
    TextDrawSetShadow(Textdraw8, 0);
    TextDrawSetOutline(Textdraw8, 0);
    TextDrawFont(Textdraw8, 0);
    return 1;
    }


















    PAWN Quelltext






    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27





    public OnPlayerConnect(playerid)
    {
    RegsiterLogin[playerid] = CreatePlayerTextDraw(playerid, 185.778076, 280.248840, "Login oder Register");
    PlayerTextDrawLetterSize(playerid, RegsiterLogin[playerid], 0.616666, 1.575111);
    PlayerTextDrawAlignment(playerid, RegsiterLogin[playerid], 1);
    PlayerTextDrawColor(playerid, RegsiterLogin[playerid], -1);
    PlayerTextDrawSetShadow(playerid, RegsiterLogin[playerid], 0);
    PlayerTextDrawSetOutline(playerid, RegsiterLogin[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, RegsiterLogin[playerid], 51);
    PlayerTextDrawFont(playerid, RegsiterLogin[playerid], 2);
    PlayerTextDrawSetProportional(playerid, RegsiterLogin[playerid], 1);



    TextDrawShowForPlayer(playerid,RegisterBackground);
    TextDrawShowForPlayer(playerid,Textdraw1);
    TextDrawShowForPlayer(playerid,Textdraw2);
    TextDrawShowForPlayer(playerid,Textdraw3);
    TextDrawShowForPlayer(playerid,Textdraw4);
    TextDrawShowForPlayer(playerid,Textdraw5);
    TextDrawShowForPlayer(playerid,Textdraw6);
    TextDrawShowForPlayer(playerid,Textdraw7);
    TextDrawShowForPlayer(playerid,Textdraw8);
    PlayerTextDrawShow(playerid,RegsiterLogin[playerid]);
    TogglePlayerSpectating(playerid, 1);
    SelectTextDraw(playerid, 0x00FF00FF);
    return 1;
    }
















    PAWN Quelltext






    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26





    public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
    {
    if(playertextid==RegsiterLogin[playerid])// Also wenn playertextid TextDraw0 ist dann ....
    {
    //Hier wird dann der Dialog zum Register und Login gezeigt ich mach das jetzt auf dini...
    new Datei[64];
    format(Datei,sizeof(Datei),"/Acc/%s.txt",SpielerName(playerid));
    if(dini_Exists(Datei))
    {
    ShowPlayerDialog(playerid,DIA_LOG,DIALOG_STYLE_PASSWORD,"Login","Gebe dein passwort zum login ein","Login","Abbruch");
    }
    else
    {
    ShowPlayerDialog(playerid,DIA_REG,DIALOG_STYLE_PASSWORD,"Register","Gebe ein passwort zum register ein","Register","Abbruch");
    }
    return 1;
    }
    return 1;
    }


    stock SpielerName(playerid)
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    return name;
    }

  • Ich weiß nicht ob das funktioniert, aber:
    #include <a_samp>
    #include <sscanf2>
    #include <dini>


    #define DIA_LOG 1
    #define DIA_REG 1



    new Text:RegisterBackground;
    new Text:Textdraw1;
    new Text:Textdraw2;
    new Text:Textdraw3;
    new Text:Textdraw4;
    new Text:Textdraw5;
    new Text:Textdraw6;
    new Text:Textdraw7;
    new Text:Textdraw8;
    new PlayerText:RegsiterLogin[MAX_PLAYERS];


    public OnGameModeInit()
    {
    // Don't use these lines if it's a filterscript
    SetGameModeText("test");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);


    RegisterBackground = TextDrawCreate(517.111145, 123.455535, "usebox");
    TextDrawLetterSize(RegisterBackground, 0.000000, 22.415184);
    TextDrawTextSize(RegisterBackground, 133.555541, 0.000000);
    TextDrawAlignment(RegisterBackground, 1);
    TextDrawColor(RegisterBackground, 0);
    TextDrawUseBox(RegisterBackground, true);
    TextDrawBoxColor(RegisterBackground, -1);
    TextDrawSetShadow(RegisterBackground, 0);
    TextDrawSetOutline(RegisterBackground, 0);
    TextDrawFont(RegisterBackground, 0);


    Textdraw1 = TextDrawCreate(508.666687, 131.419998, "usebox");
    TextDrawLetterSize(Textdraw1, 0.000000, 20.534690);
    TextDrawTextSize(Textdraw1, 142.888885, 0.000000);
    TextDrawAlignment(Textdraw1, 1);
    TextDrawColor(Textdraw1, 0);
    TextDrawUseBox(Textdraw1, true);
    TextDrawBoxColor(Textdraw1, -2147483393);
    TextDrawSetShadow(Textdraw1, 0);
    TextDrawSetOutline(Textdraw1, 0);
    TextDrawFont(Textdraw1, 0);


    Textdraw2 = TextDrawCreate(263.111083, 145.351089, "Willkommen");
    TextDrawLetterSize(Textdraw2, 0.449999, 1.600000);
    TextDrawAlignment(Textdraw2, 1);
    TextDrawColor(Textdraw2, -1);
    TextDrawSetShadow(Textdraw2, 0);
    TextDrawSetOutline(Textdraw2, 1);
    TextDrawBackgroundColor(Textdraw2, 51);
    TextDrawFont(Textdraw2, 2);
    TextDrawSetProportional(Textdraw2, 1);


    Textdraw3 = TextDrawCreate(302.222290, 176.213287, "Auf");
    TextDrawLetterSize(Textdraw3, 0.449999, 1.600000);
    TextDrawAlignment(Textdraw3, 1);
    TextDrawColor(Textdraw3, -1);
    TextDrawSetShadow(Textdraw3, 0);
    TextDrawSetOutline(Textdraw3, 1);
    TextDrawBackgroundColor(Textdraw3, 51);
    TextDrawFont(Textdraw3, 2);
    TextDrawSetProportional(Textdraw3, 1);


    Textdraw4 = TextDrawCreate(231.999801, 217.031112, "test");
    TextDrawLetterSize(Textdraw4, 0.449999, 1.600000);
    TextDrawAlignment(Textdraw4, 1);
    TextDrawColor(Textdraw4, -1);
    TextDrawSetShadow(Textdraw4, 0);
    TextDrawSetOutline(Textdraw4, 1);
    TextDrawBackgroundColor(Textdraw4, 51);
    TextDrawFont(Textdraw4, 2);
    TextDrawSetProportional(Textdraw4, 1);


    Textdraw5 = TextDrawCreate(641.555541, 1.500000, "usebox");
    TextDrawLetterSize(Textdraw5, 0.000000, 4.273950);
    TextDrawTextSize(Textdraw5, -2.000000, 0.000000);
    TextDrawAlignment(Textdraw5, 1);
    TextDrawColor(Textdraw5, 0);
    TextDrawUseBox(Textdraw5, true);
    TextDrawBoxColor(Textdraw5, 102);
    TextDrawSetShadow(Textdraw5, 0);
    TextDrawSetOutline(Textdraw5, 0);
    TextDrawFont(Textdraw5, 0);


    Textdraw6 = TextDrawCreate(41.111110, 43.811111, "usebox");
    TextDrawLetterSize(Textdraw6, 0.000000, 44.704566);
    TextDrawTextSize(Textdraw6, -2.000000, 0.000000);
    TextDrawAlignment(Textdraw6, 1);
    TextDrawColor(Textdraw6, 0);
    TextDrawUseBox(Textdraw6, true);
    TextDrawBoxColor(Textdraw6, 102);
    TextDrawSetShadow(Textdraw6, 0);
    TextDrawSetOutline(Textdraw6, 0);
    TextDrawFont(Textdraw6, 0);


    Textdraw7 = TextDrawCreate(641.555541, 407.686676, "usebox");
    TextDrawLetterSize(Textdraw7, 0.000000, 4.273950);
    TextDrawTextSize(Textdraw7, 37.555553, 0.000000);
    TextDrawAlignment(Textdraw7, 1);
    TextDrawColor(Textdraw7, 0);
    TextDrawUseBox(Textdraw7, true);
    TextDrawBoxColor(Textdraw7, 102);
    TextDrawSetShadow(Textdraw7, 0);
    TextDrawSetOutline(Textdraw7, 0);
    TextDrawFont(Textdraw7, 0);


    Textdraw8 = TextDrawCreate(641.555541, 407.686676, "usebox");
    TextDrawLetterSize(Textdraw8, 0.000000, -40.857902);
    TextDrawTextSize(Textdraw8, 594.888916, 0.000000);
    TextDrawAlignment(Textdraw8, 1);
    TextDrawColor(Textdraw8, 0);
    TextDrawUseBox(Textdraw8, true);
    TextDrawBoxColor(Textdraw8, 102);
    TextDrawSetShadow(Textdraw8, 0);
    TextDrawSetOutline(Textdraw8, 0);
    TextDrawFont(Textdraw8, 0);
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    RegsiterLogin[playerid] = CreatePlayerTextDraw(playerid, 185.778076, 280.248840, "Login oder Register");
    PlayerTextDrawLetterSize(playerid, RegsiterLogin[playerid], 0.616666, 1.575111);
    PlayerTextDrawAlignment(playerid, RegsiterLogin[playerid], 1);
    PlayerTextDrawColor(playerid, RegsiterLogin[playerid], -1);
    PlayerTextDrawSetShadow(playerid, RegsiterLogin[playerid], 0);
    PlayerTextDrawSetOutline(playerid, RegsiterLogin[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, RegsiterLogin[playerid], 51);
    PlayerTextDrawFont(playerid, RegsiterLogin[playerid], 2);
    PlayerTextDrawSetProportional(playerid, RegsiterLogin[playerid], 1);
    PlayerTextDrawSetSelectable(playerid,RegsiterLogin[playerid],1);
    PlayerTextDrawUseBox(playerid,RegsiterLogin[playerid],1);
    PlayerTextDrawBoxColor(playerid,RegsiterLogin[playerid],0x00000000);
    PlayerTextDrawTextSize(playerid,RegsiterLogin[playerid],185.0000,30.00000);



    TextDrawShowForPlayer(playerid,RegisterBackground);
    TextDrawShowForPlayer(playerid,Textdraw1);
    TextDrawShowForPlayer(playerid,Textdraw2);
    TextDrawShowForPlayer(playerid,Textdraw3);
    TextDrawShowForPlayer(playerid,Textdraw4);
    TextDrawShowForPlayer(playerid,Textdraw5);
    TextDrawShowForPlayer(playerid,Textdraw6);
    TextDrawShowForPlayer(playerid,Textdraw7);
    TextDrawShowForPlayer(playerid,Textdraw8);
    PlayerTextDrawShow(playerid,RegsiterLogin[playerid]);
    TogglePlayerSpectating(playerid, 1);
    SelectTextDraw(playerid, 0x00FF00FF);
    return 1;
    }


    public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
    {
    if(playertextid==RegsiterLogin[playerid])// Also wenn playertextid TextDraw0 ist dann ....
    {
    //Hier wird dann der Dialog zum Register und Login gezeigt ich mach das jetzt auf dini...
    new Datei[64];
    format(Datei,sizeof(Datei),"/Acc/%s.txt",SpielerName(playerid));
    if(dini_Exists(Datei))
    {
    ShowPlayerDialog(playerid,DIA_LOG,DIALOG_STYLE_PASSWORD,"Login","Gebe dein passwort zum login ein","Login","Abbruch");
    }
    else
    {
    ShowPlayerDialog(playerid,DIA_REG,DIALOG_STYLE_PASSWORD,"Register","Gebe ein passwort zum register ein","Register","Abbruch");
    }
    return 1;
    }
    return 1;
    }


    stock SpielerName(playerid)
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    return name;
    }