Mysql Login Register

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 Liebe Breasfish Community,
    ich wollte euch nachfragen ob es ein Login\Register Script gibt was auf den neusten Stand von Mysql und server allgemein ist? Also so das man perfekt einsteigen kann als Anfänger.
    Mit freundlichen Grüßen
    Smiley

  • Wäre das ganze auch möglich mit einem Textdraw zu gestalten,wenn ja,wie muss ich da was ändern?



    [list=1][*]enum tData
    [*]{
    [*] Text:BlockDown,
    [*] Text:BlockUP,
    [*] Text:BlockLeft,
    [*] Text:BlockNews,
    [*] Text:BlockRegBG,
    [*] Text:BlockLogBG,
    [*] Text:BlockReg,
    [*] Text:BlockLog,
    [*] Text:BlockNewsHead,
    [*] Text:TextRegShadow,
    [*] Text:TextReg,
    [*] Text:TextLogShadow,
    [*] Text:TextLog,
    [*] Text:TextNewsShadow,
    [*] Text:TextNews,
    [*] Text:TextNewsBox,
    [*] Text:LogoWelcome,
    [*] Text:LogoWord,
    [*] Text:LogoServerName,
    [*] Text:LogoUnderline,
    [*] Text:SideTextForum,
    [*] Text:SideTextTs3,
    [*]};
    [*]new Login[tData];
    [*]ShowPlayerLoginScreen(playerid)
    [*]{
    [*] TogglePlayerSpectating(playerid,true);
    [*] InterpolateCameraPos(playerid, 78.906448, -1761.630859, 102.392425, 2955.264160, -1504.608032, 116.085548, 50000);
    [*] InterpolateCameraLookAt(playerid, 82.136688, -1764.697875, 100.121154, 2951.325439, -1507.052978, 114.212219, 50000);
    [*] for(new i; i != _:tData; ++i)TextDrawShowForPlayer(playerid,Login[tData:i]);
    [*] return SelectTextDraw(playerid, 0xE18C30FF);
    [*]}
    [*]public OnPlayerClickTextDraw(playerid, Text:clickedid)
    [*]{
    [*] SendClientMessage(playerid, 0xFFFFFFAA, "Textdraw angeklickt");
    [*] return 1;
    [*]}
    [*]public OnGameModeInit()
    [*]{
    [*] Login[BlockDown] = TextDrawCreate(645.999816, 383.295501, "usebox");
    [*] TextDrawLetterSize(Login[BlockDown], 0.000000, 6.847775);
    [*] TextDrawTextSize(Login[BlockDown], -2.000000, 0.000000);
    [*] TextDrawAlignment(Login[BlockDown], 1);
    [*] TextDrawColor(Login[BlockDown], 0);
    [*] TextDrawUseBox(Login[BlockDown], true);
    [*] TextDrawBoxColor(Login[BlockDown], 140);
    [*] TextDrawSetShadow(Login[BlockDown], 0);
    [*] TextDrawSetOutline(Login[BlockDown], 0);
    [*] TextDrawFont(Login[BlockDown], 0);
    [*] Login[BlockUP] = TextDrawCreate(641.555541, 1.002182, "usebox");
    [*] TextDrawLetterSize(Login[BlockUP], 0.000000, 6.303583);
    [*] TextDrawTextSize(Login[BlockUP], -2.000000, 0.000000);
    [*] TextDrawAlignment(Login[BlockUP], 1);
    [*] TextDrawColor(Login[BlockUP], 0);
    [*] TextDrawUseBox(Login[BlockUP], true);
    [*] TextDrawBoxColor(Login[BlockUP], 140);
    [*] TextDrawSetShadow(Login[BlockUP], 0);
    [*] TextDrawSetOutline(Login[BlockUP], 0);
    [*] TextDrawFont(Login[BlockUP], 0);
    [*] Login[BlockLeft] = TextDrawCreate(65.999961, 383.295532, "usebox");
    [*] TextDrawLetterSize(Login[BlockLeft], 0.000000, -36.176437);
    [*] TextDrawTextSize(Login[BlockLeft], 150.000000, 0.000000);
    [*] TextDrawAlignment(Login[BlockLeft], 1);
    [*] TextDrawColor(Login[BlockLeft], 0);
    [*] TextDrawUseBox(Login[BlockLeft], true);
    [*] TextDrawBoxColor(Login[BlockLeft], 140);
    [*] TextDrawSetShadow(Login[BlockLeft], 0);
    [*] TextDrawSetOutline(Login[BlockLeft], 0);
    [*] TextDrawBackgroundColor(Login[BlockLeft], -1);
    [*] TextDrawFont(Login[BlockLeft], 0);
    [*] Login[BlockNews] = TextDrawCreate(510.444702, 128.931091, "usebox");
    [*] TextDrawLetterSize(Login[BlockNews], 0.000000, 19.707035);
    [*] TextDrawTextSize(Login[BlockNews], 261.555358, 0.000000);
    [*] TextDrawAlignment(Login[BlockNews], 1);
    [*] TextDrawColor(Login[BlockNews], 0);
    [*] TextDrawUseBox(Login[BlockNews], true);
    [*] TextDrawBoxColor(Login[BlockNews], 140);
    [*] TextDrawSetShadow(Login[BlockNews], 0);
    [*] TextDrawSetOutline(Login[BlockNews], 0);
    [*] TextDrawFont(Login[BlockNews], 0);
    [*] Login[BlockRegBG] = TextDrawCreate(65.999992, 216.540054, "usebox");
    [*] TextDrawLetterSize(Login[BlockRegBG], 0.000000, 2.480370);
    [*] TextDrawTextSize(Login[BlockRegBG], 149.999938, 0.000000);
    [*] TextDrawAlignment(Login[BlockRegBG], 1);
    [*] TextDrawColor(Login[BlockRegBG], 0);
    [*] TextDrawUseBox(Login[BlockRegBG], true);
    [*] TextDrawBoxColor(Login[BlockRegBG], 255);
    [*] TextDrawSetShadow(Login[BlockRegBG], 0);
    [*] TextDrawSetOutline(Login[BlockRegBG], 0);
    [*] TextDrawBackgroundColor(Login[BlockRegBG], 255);
    [*] TextDrawFont(Login[BlockRegBG], 1);
    [*] Login[BlockLogBG] = TextDrawCreate(66.999969, 179.708908, "usebox");
    [*] TextDrawLetterSize(Login[BlockLogBG], 0.000000, 2.480370);
    [*] TextDrawTextSize(Login[BlockLogBG], 149.555511, 0.000000);
    [*] TextDrawAlignment(Login[BlockLogBG], 1);
    [*] TextDrawColor(Login[BlockLogBG], 0);
    [*] TextDrawUseBox(Login[BlockLogBG], true);
    [*] TextDrawBoxColor(Login[BlockLogBG], 255);
    [*] TextDrawSetShadow(Login[BlockLogBG], 0);
    [*] TextDrawSetOutline(Login[BlockLogBG], 0);
    [*] TextDrawBackgroundColor(Login[BlockLogBG], 255);
    [*] TextDrawFont(Login[BlockLogBG], 0);
    [*] Login[BlockReg] = TextDrawCreate(66.222213, 216.051071, "usebox");
    [*] TextDrawLetterSize(Login[BlockReg], 0.000000, 2.391479);
    [*] TextDrawTextSize(Login[BlockReg], 149.999938, 0.000000);
    [*] TextDrawAlignment(Login[BlockReg], 1);
    [*] TextDrawColor(Login[BlockReg], 0);
    [*] TextDrawUseBox(Login[BlockReg], true);
    [*] TextDrawBoxColor(Login[BlockReg], -5615873);
    [*] TextDrawSetShadow(Login[BlockReg], 0);
    [*] TextDrawSetOutline(Login[BlockReg], 0);
    [*] TextDrawBackgroundColor(Login[BlockReg], 255);
    [*] TextDrawFont(Login[BlockReg], 0);
    [*] Login[BlockLog] = TextDrawCreate(65.888854, 179.717788, "usebox");
    [*] TextDrawLetterSize(Login[BlockLog], 0.000000, 2.347033);
    [*] TextDrawTextSize(Login[BlockLog], 149.999954, 0.000000);
    [*] TextDrawAlignment(Login[BlockLog], 1);
    [*] TextDrawColor(Login[BlockLog], 0);
    [*] TextDrawUseBox(Login[BlockLog], true);
    [*] TextDrawBoxColor(Login[BlockLog], -5615873);
    [*] TextDrawSetShadow(Login[BlockLog], 0);
    [*] TextDrawSetOutline(Login[BlockLog], 0);
    [*] TextDrawBackgroundColor(Login[BlockLog], 255);
    [*] TextDrawFont(Login[BlockLog], 0);
    [*] Login[BlockNewsHead] = TextDrawCreate(510.444458, 126.940002, "usebox");
    [*] TextDrawLetterSize(Login[BlockNewsHead], 0.000000, 2.326292);
    [*] TextDrawTextSize(Login[BlockNewsHead], 261.555664, 0.000000);
    [*] TextDrawAlignment(Login[BlockNewsHead], 1);
    [*] TextDrawColor(Login[BlockNewsHead], 0);
    [*] TextDrawUseBox(Login[BlockNewsHead], true);
    [*] TextDrawBoxColor(Login[BlockNewsHead], -5615873);
    [*] TextDrawSetShadow(Login[BlockNewsHead], 0);
    [*] TextDrawSetOutline(Login[BlockNewsHead], 0);
    [*] TextDrawFont(Login[BlockNewsHead], 0);
    [*] Login[TextRegShadow] = TextDrawCreate(77.777725, 220.017791, "Register");
    [*] TextDrawLetterSize(Login[TextRegShadow], 0.289555, 1.430755);
    [*] TextDrawAlignment(Login[TextRegShadow], 1);
    [*] TextDrawColor(Login[TextRegShadow], -3633665);
    [*] TextDrawSetShadow(Login[TextRegShadow], 0);
    [*] TextDrawSetOutline(Login[TextRegShadow], 0);
    [*] TextDrawBackgroundColor(Login[TextRegShadow], 51);
    [*] TextDrawFont(Login[TextRegShadow], 2);
    [*] TextDrawSetProportional(Login[TextRegShadow], 1);
    [*] Login[TextReg] = TextDrawCreate(77.888839, 219.026611, "Register");
    [*] TextDrawLetterSize(Login[TextReg], 0.289555, 1.430755);
    [*] TextDrawAlignment(Login[TextReg], 1);
    [*] TextDrawColor(Login[TextReg], -1537206273);
    [*] TextDrawSetShadow(Login[TextReg], 0);
    [*] TextDrawSetOutline(Login[TextReg], 0);
    [*] TextDrawBackgroundColor(Login[TextReg], 51);
    [*] TextDrawFont(Login[TextReg], 2);
    [*] TextDrawSetProportional(Login[TextReg], 1);
    [*] TextDrawSetSelectable(Login[TextReg], true);
    [*] TextDrawTextSize(Login[TextReg], 136.666656, 15.6);
    [*] Login[TextLogShadow] = TextDrawCreate(90.777740, 183.186721, "Login");
    [*] TextDrawLetterSize(Login[TextLogShadow], 0.289555, 1.430755);
    [*] TextDrawAlignment(Login[TextLogShadow], 1);
    [*] TextDrawColor(Login[TextLogShadow], -3633665);
    [*] TextDrawSetShadow(Login[TextLogShadow], 0);
    [*] TextDrawSetOutline(Login[TextLogShadow], 0);
    [*] TextDrawBackgroundColor(Login[TextLogShadow], 51);
    [*] TextDrawFont(Login[TextLogShadow], 2);
    [*] TextDrawSetProportional(Login[TextLogShadow], 1);
    [*] Login[TextLog] = TextDrawCreate(90.666656, 182.186676, "Login");
    [*] TextDrawLetterSize(Login[TextLog], 0.289555, 1.430755);
    [*] TextDrawAlignment(Login[TextLog], 1);
    [*] TextDrawColor(Login[TextLog], -1537206273);
    [*] TextDrawSetShadow(Login[TextLog], 0);
    [*] TextDrawSetOutline(Login[TextLog], 0);
    [*] TextDrawBackgroundColor(Login[TextLog], 51);
    [*] TextDrawFont(Login[TextLog], 2);
    [*] TextDrawSetProportional(Login[TextLog], 1);
    [*] TextDrawSetSelectable(Login[TextLog], true);
    [*] TextDrawTextSize(Login[TextLog], 126.666656, 15.6);
    [*] Login[TextNewsShadow] = TextDrawCreate(367.333404, 129.431121, "News");
    [*] TextDrawLetterSize(Login[TextNewsShadow], 0.289555, 1.430755);
    [*] TextDrawAlignment(Login[TextNewsShadow], 1);
    [*] TextDrawColor(Login[TextNewsShadow], -3633665);
    [*] TextDrawSetShadow(Login[TextNewsShadow], 0);
    [*] TextDrawSetOutline(Login[TextNewsShadow], 0);
    [*] TextDrawBackgroundColor(Login[TextNewsShadow], 51);
    [*] TextDrawFont(Login[TextNewsShadow], 2);
    [*] TextDrawSetProportional(Login[TextNewsShadow], 1);
    [*] Login[TextNews] = TextDrawCreate(367.444641, 128.440063, "News");
    [*] TextDrawLetterSize(Login[TextNews], 0.289555, 1.430755);
    [*] TextDrawAlignment(Login[TextNews], 1);
    [*] TextDrawColor(Login[TextNews], -1537206273);
    [*] TextDrawSetShadow(Login[TextNews], 0);
    [*] TextDrawSetOutline(Login[TextNews], 0);
    [*] TextDrawBackgroundColor(Login[TextNews], 51);
    [*] TextDrawFont(Login[TextNews], 2);
    [*] TextDrawSetProportional(Login[TextNews], 1);
    [*] Login[TextNewsBox] = TextDrawCreate(278.222412, 155.804428, "- Beispiel~n~- Beispiel~n~- Beispiel");
    [*] TextDrawLetterSize(Login[TextNewsBox], 0.226888, 1.097244);
    [*] TextDrawAlignment(Login[TextNewsBox], 1);
    [*] TextDrawColor(Login[TextNewsBox], -1);
    [*] TextDrawSetShadow(Login[TextNewsBox], 0);
    [*] TextDrawSetOutline(Login[TextNewsBox], 0);
    [*] TextDrawBackgroundColor(Login[TextNewsBox], 51);
    [*] TextDrawFont(Login[TextNewsBox], 2);
    [*] TextDrawSetProportional(Login[TextNewsBox], 1);
    [*] Login[LogoWelcome] = TextDrawCreate(225.777694, 20.906679, "Willkommen");
    [*] TextDrawLetterSize(Login[LogoWelcome], 0.605552, 2.759819);
    [*] TextDrawAlignment(Login[LogoWelcome], 1);
    [*] TextDrawColor(Login[LogoWelcome], -5615873);
    [*] TextDrawSetShadow(Login[LogoWelcome], 0);
    [*] TextDrawSetOutline(Login[LogoWelcome], 1);
    [*] TextDrawBackgroundColor(Login[LogoWelcome], 51);
    [*] TextDrawFont(Login[LogoWelcome], 0);
    [*] TextDrawSetProportional(Login[LogoWelcome], 1);
    [*] Login[LogoWord] = TextDrawCreate(316.888763, 24.888891, "auf");
    [*] TextDrawLetterSize(Login[LogoWord], 0.607333, 2.286931);
    [*] TextDrawAlignment(Login[LogoWord], 1);
    [*] TextDrawColor(Login[LogoWord], -1);
    [*] TextDrawSetShadow(Login[LogoWord], 0);
    [*] TextDrawSetOutline(Login[LogoWord], 1);
    [*] TextDrawBackgroundColor(Login[LogoWord], 51);
    [*] TextDrawFont(Login[LogoWord], 0);
    [*] TextDrawSetProportional(Login[LogoWord], 1);
    [*] Login[LogoServerName] = TextDrawCreate(341.777862, 20.906656, "Unknown Roleplay");
    [*] TextDrawLetterSize(Login[LogoServerName], 0.589999, 2.734930);
    [*] TextDrawAlignment(Login[LogoServerName], 1);
    [*] TextDrawColor(Login[LogoServerName], -5615873);
    [*] TextDrawSetShadow(Login[LogoServerName], 0);
    [*] TextDrawSetOutline(Login[LogoServerName], 1);
    [*] TextDrawBackgroundColor(Login[LogoServerName], 51);
    [*] TextDrawFont(Login[LogoServerName], 0);
    [*] TextDrawSetProportional(Login[LogoServerName], 1);
    [*] Login[LogoUnderline] = TextDrawCreate(162.222122, 45.297752, ".");
    [*] TextDrawLetterSize(Login[LogoUnderline], 36.818195, 0.818575);
    [*] TextDrawAlignment(Login[LogoUnderline], 1);
    [*] TextDrawColor(Login[LogoUnderline], -5615973);
    [*] TextDrawSetShadow(Login[LogoUnderline], 0);
    [*] TextDrawSetOutline(Login[LogoUnderline], 0);
    [*] TextDrawBackgroundColor(Login[LogoUnderline], 51);
    [*] TextDrawFont(Login[LogoUnderline], 1);
    [*] TextDrawSetProportional(Login[LogoUnderline], 1);
    [*] Login[SideTextForum] = TextDrawCreate(65.333366, 393.244445, "Forum : www.google.de");
    [*] TextDrawLetterSize(Login[SideTextForum], 0.301999, 1.082311);
    [*] TextDrawAlignment(Login[SideTextForum], 1);
    [*] TextDrawColor(Login[SideTextForum], -5615873);
    [*] TextDrawSetShadow(Login[SideTextForum], 0);
    [*] TextDrawSetOutline(Login[SideTextForum], 1);
    [*] TextDrawBackgroundColor(Login[SideTextForum], 51);
    [*] TextDrawFont(Login[SideTextForum], 2);
    [*] TextDrawSetProportional(Login[SideTextForum], 1);
    [*] Login[SideTextTs3] = TextDrawCreate(65.000038, 404.697753, "Ts3: 120.01.1:7777");
    [*] TextDrawLetterSize(Login[SideTextTs3], 0.301999, 1.082311);
    [*] TextDrawAlignment(Login[SideTextTs3], 1);
    [*] TextDrawColor(Login[SideTextTs3], -5615873);
    [*] TextDrawSetShadow(Login[SideTextTs3], 0);
    [*] TextDrawSetOutline(Login[SideTextTs3], 1);
    [*] TextDrawBackgroundColor(Login[SideTextTs3], 51);
    [*] TextDrawFont(Login[SideTextTs3], 2);
    [*] TextDrawSetProportional(Login[SideTextTs3], 1);
    [*] return 1;
    [*]}
    [/list]

  • Prinzipiell nicht viel, du musst nur den Dialog bzw. die Dialoge dort anzeigen, wenn du auf das Textdraw klickst, anstatt dort, wo es im Tutorial beschrieben ist. Das wäre die einzige Abänderung am Tutorial.


    Sprich:
    Bei OnPlayerClickTextDraw den Dialog zum Login/Register anzeigen lassen, über die SELECT Abfrage, wie es im Tutorial bei OnPlayerRequestClass gemacht wurde.

  • C:\Users\kevin\Desktop\server\gamemodes\reallife.pwn(661) : warning 213: tag mismatch
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Warning.



    for(new i; i != _:tData; ++i)TextDrawShowForPlayer(playerid,Login[tData:i]);