Hey ich habe mein Pc neu aufgesetzt und seit dem habe ich das Problem das mein Login immer voll lange Dauert.
Ich Logge mich ein dann wenn ich auf mein Passwort Klicke dann dauert es lange bis der Hacken kommt und wenn ich auf Login Klicke dauert es richtig lange bis das Spawnportal gezeigt wird.
Code
case DIALOG_PASWORTE:
{
if(response)
{
if(strlen(inputtext) < 4 || strlen(inputtext) > 20) return ShowPlayerDialog(playerid, DIALOG_PASWORTE, DIALOG_STYLE_PASSWORD, "{FFBF00}Voltage Reallife: {FFFFFF}Passwort","{FF0000}[FEHLER] Das Passwort ist zu lang oder zu kurz!{FFFFFF}\n\nGib dein Passwort ein:", "Bestätigen", "Abbrechen");
strmid(EinloggPass[playerid], inputtext, 0, strlen(inputtext), 128);
TextDrawHideForPlayer(playerid, EinloggMenu2Up);
TextDrawHideForPlayer(playerid, EinloggMenu2Down);
if(mysql_CheckAccountName(EinloggName[playerid]) == 1)
{
if(mysql_CheckPasswort(EinloggName[playerid], EinloggPass[playerid])) TextDrawShowForPlayer(playerid, EinloggMenu2Up);
else TextDrawShowForPlayer(playerid, EinloggMenu2Down);
}
else TextDrawShowForPlayer(playerid, EinloggMenu2Down);
switch (strlen(inputtext))
{
case 4: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], "....");
case 5: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], ".....");
case 6: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], "......");
case 7: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], ".......");
case 8: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], "........");
case 9: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], ".........");
case 10: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], "..........");
case 11: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], "...........");
case 12: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], "............");
case 13: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], ".............");
case 14: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], "..............");
case 15: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], "...............");
case 16: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], "................");
case 17: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], ".................");
case 18: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], "..................");
case 19: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], "...................");
case 20: PlayerTextDrawSetString(playerid, EinloggMenuPasswort[playerid], "....................");
}
return 1;
}
}
Alles anzeigen
Code
public OnPlayerLoginCheck_1(playerid)
{
new rows, fields, lCount, lResult[128], userID, IP[24], query[200];
cache_get_data(rows, fields);
if(rows)
{
while(lCount < rows)
{
cache_get_field_content(lCount, "Id", lResult), userID = strval(lResult);
lCount++;
}
}
ClearChatbox(playerid, 20);
SendClientMessage(playerid, COLOR_GRAU, "Das Passwort ist nicht korrekt!");
EinloggSicherheit[playerid] ++;
if(EinloggSicherheit[playerid] == 3)
{
GetPlayerIp(playerid, IP, 16);
mysql_real_escape_string(IP, IP, dbhandle, 126);
format(query, sizeof(query), "INSERT INTO `logins` (`userID`, `UNIX`, `IPAdresse`, `Failed`, `Plattform`) VALUES ('%d', '%d', '%s', '1', '1');", userID, gettime(), IP);
mysql_function_query(dbhandle, query, false, "", "");
SendClientMessage(playerid, COLOR_NICERED, "Das Passwort wurde 3 mal falsch eingegeben!");
SetKick(playerid);
EinloggSicherheit[playerid] = 0;
}
return 1;
}
public OnPlayerLoginCheck_2(playerid) {
new rows, fields, lCount, lResult[128], userID, IP[24], query[200];
cache_get_data(rows, fields);
if(rows) {
while(lCount < rows) {
cache_get_field_content(lCount, "Id", lResult), userID = strval(lResult);
lCount++;
}
}
GetPlayerIp(playerid, IP, 16);
mysql_real_escape_string(IP, IP, dbhandle, 126);
format(query, sizeof(query), "INSERT INTO `logins` (`userID`, `UNIX`, `IPAdresse`, `Failed`, `Plattform`) VALUES ('%d', '%d', '%s', '0', '1');", userID, gettime(), IP);
mysql_function_query(dbhandle, query, false, "", "");
SetPlayerName(playerid, EinloggName[playerid]);
GetPlayerName(playerid, sInfo[playerid][pName], MAX_PLAYER_NAME);
for(new idx = 0; idx < sizeof(EinloggMenu); idx++) TextDrawHideForPlayer(playerid, EinloggMenu[idx]);
TextDrawHideForPlayer(playerid, EinloggMenuRegi);
TextDrawHideForPlayer(playerid, EinloggMenuButton);
if(RegistrierungsStatus == 1)
{
TextDrawHideForPlayer(playerid, EinloggMenuRegisDown[0]);
TextDrawHideForPlayer(playerid, EinloggMenuRegisDown[1]);
}
TextDrawHideForPlayer(playerid, EinloggMenuNutzernameBox);
TextDrawHideForPlayer(playerid, EinloggMenuPasswortBox);
PlayerTextDrawHide(playerid, EinloggMenuNutzername[playerid]);
PlayerTextDrawHide(playerid, EinloggMenuPasswort[playerid]);
TextDrawHideForPlayer(playerid, EinloggMenu1Up);
TextDrawHideForPlayer(playerid, EinloggMenu1Down);
TextDrawHideForPlayer(playerid, EinloggMenu2Up);
TextDrawHideForPlayer(playerid, EinloggMenu2Down);
ShowPlayerDialog(playerid, -1, DIALOG_STYLE_MSGBOX, " ", " ", " ", "");
DestroyEinloggMenu(playerid);
sInfo[playerid][db_id] = userID;
format(query, sizeof(query), "SELECT * FROM accounts WHERE Username = '%s'", getPlayerName(playerid));
mysql_function_query(dbhandle, query, true, "SpielerLaden", "ii", playerid,0);
}
Alles anzeigen
Code
else if(clickedid == EinloggMenuPasswortBox)//Password eingeben
{
ShowPlayerDialog(playerid, DIALOG_PASWORTE, DIALOG_STYLE_PASSWORD,"{FFBF00}Voltage Reallife: {FFFFFF}Passwort", "{FFFFFF}Gib das Passwort ein:", "Bestätigen", "Abbrechen");
}
else if(clickedid == EinloggMenuButton)//Einloggen
{
new query[256];
if(mysql_CheckAccountName(EinloggName[playerid]) == 0) return ClearChatbox(playerid, 20), SendClientMessage(playerid, COLOR_GRAU, "Dieser Account existiert nicht!");
else if(mysql_CheckPasswort(EinloggName[playerid], EinloggPass[playerid]) == 0)
{
format(query, sizeof(query), "SELECT Id FROM accounts WHERE Username='%s' LIMIT 1;",EinloggName[playerid]);
mysql_function_query(dbhandle, query, true, "OnPlayerLoginCheck_1", "i", playerid);
return 1;
}
format(query, sizeof(query), "SELECT Id FROM accounts WHERE Username='%s' LIMIT 1;",EinloggName[playerid]);
mysql_function_query(dbhandle, query, true, "OnPlayerLoginCheck_2", "i", playerid);
}
else if(clickedid == SpawnportalButton)
{
if(sInfo[playerid][peingeloggt] == 0)
{
EinloggCamMoveID[playerid] = 0;
sInfo[playerid][peingeloggt] = 1;
OnPlayerLogin(playerid);
}
}
Alles anzeigen