Es kann auch an dem Laden liegen ( Datenbank )
Eigentlich
[15.05.2016 - 01:25:28] [15.05.2016 | 01:25:28] [ - LOGIN - ] Der Account von reaL. wurde mit einer Geschwindigkeit von 0 Millisekunden geladen!
Jetze
[15/05/2016 14:39:21] [15.05.2016 | 14:39:21] [ - LOGIN - ] Der Account von reaL. wurde mit einer Geschwindigkeit von 13 Millisekunden geladen!
Auf den Eigentlichen Script ( wo ich es rausgenommen habe aber alte Mysql Version ) geht es also muss es am Code Liegen
Geprinteter Code
else if(clickedid == EinloggMenuPasswortBox)//Password eingeben
{
printf("1");
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
{
printf("13");
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)
{
printf("15");
format(query, sizeof(query), "SELECT Id FROM accounts WHERE Username='%s' LIMIT 1;",EinloggName[playerid]);
printf("16");
mysql_function_query(dbhandle, query, true, "OnPlayerLoginCheck_1", "i", playerid);
printf("17");
return 1;
}
printf("18");
format(query, sizeof(query), "SELECT Id FROM accounts WHERE Username='%s' LIMIT 1;",EinloggName[playerid]);
printf("19");
mysql_function_query(dbhandle, query, true, "OnPlayerLoginCheck_2", "i", playerid);
}
else if(clickedid == SpawnportalButton)
{
printf("68");
if(sInfo[playerid][peingeloggt] == 0)
{
printf("69");
EinloggCamMoveID[playerid] = 0;
printf("70");
sInfo[playerid][peingeloggt] = 1;
printf("71");
OnPlayerLogin(playerid);
printf("72");
}
}
Alles anzeigen
public OnPlayerLoginCheck_1(playerid)
{
printf("20");
new rows, fields, lCount, lResult[128], userID, IP[24], query[200];
cache_get_data(rows, fields);
printf("21");
if(rows)
{
printf("22");
while(lCount < rows)
{
printf("23");
cache_get_field_content(lCount, "Id", lResult), userID = strval(lResult);
printf("24");
lCount++;
}
}
printf("25");
ClearChatbox(playerid, 20);
printf("26");
SendClientMessage(playerid, COLOR_GRAU, "Das Passwort ist nicht korrekt!");
printf("27");
EinloggSicherheit[playerid] ++;
printf("28");
if(EinloggSicherheit[playerid] == 3)
{
printf("29");
GetPlayerIp(playerid, IP, 16);
printf("30");
mysql_real_escape_string(IP, IP, dbhandle, 126);
printf("31");
format(query, sizeof(query), "INSERT INTO `logins` (`userID`, `UNIX`, `IPAdresse`, `Failed`, `Plattform`) VALUES ('%d', '%d', '%s', '1', '1');", userID, gettime(), IP);
printf("32");
mysql_function_query(dbhandle, query, false, "", "");
printf("33");
SendClientMessage(playerid, COLOR_NICERED, "Das Passwort wurde 3 mal falsch eingegeben!");
printf("34");
SetKick(playerid);
printf("35");
EinloggSicherheit[playerid] = 0;
printf("36");
}
return 1;
}
public OnPlayerLoginCheck_2(playerid) {
printf("37");
new rows, fields, lCount, lResult[128], userID, IP[24], query[200];
printf("38");
cache_get_data(rows, fields);
printf("39");
if(rows) {
while(lCount < rows) {
printf("40");
cache_get_field_content(lCount, "Id", lResult), userID = strval(lResult);
printf("41");
lCount++;
printf("42");
}
}
GetPlayerIp(playerid, IP, 16);
printf("43");
mysql_real_escape_string(IP, IP, dbhandle, 126);
printf("44");
format(query, sizeof(query), "INSERT INTO `logins` (`userID`, `UNIX`, `IPAdresse`, `Failed`, `Plattform`) VALUES ('%d', '%d', '%s', '0', '1');", userID, gettime(), IP);
printf("45");
mysql_function_query(dbhandle, query, false, "", "");
printf("46");
SetPlayerName(playerid, EinloggName[playerid]);
printf("47");
GetPlayerName(playerid, sInfo[playerid][pName], MAX_PLAYER_NAME);
printf("48");
for(new idx = 0; idx < sizeof(EinloggMenu); idx++) TextDrawHideForPlayer(playerid, EinloggMenu[idx]);
printf("49");
TextDrawHideForPlayer(playerid, EinloggMenuRegi);
printf("50");
TextDrawHideForPlayer(playerid, EinloggMenuButton);
printf("51");
if(RegistrierungsStatus == 1)
{
printf("52");
TextDrawHideForPlayer(playerid, EinloggMenuRegisDown[0]);
printf("53");
TextDrawHideForPlayer(playerid, EinloggMenuRegisDown[1]);
printf("54");
}
TextDrawHideForPlayer(playerid, EinloggMenuNutzernameBox);
printf("55");
TextDrawHideForPlayer(playerid, EinloggMenuPasswortBox);
printf("56");
PlayerTextDrawHide(playerid, EinloggMenuNutzername[playerid]);
printf("57");
PlayerTextDrawHide(playerid, EinloggMenuPasswort[playerid]);
printf("58");
TextDrawHideForPlayer(playerid, EinloggMenu1Up);
printf("59");
TextDrawHideForPlayer(playerid, EinloggMenu1Down);
printf("60");
TextDrawHideForPlayer(playerid, EinloggMenu2Up);
printf("61");
TextDrawHideForPlayer(playerid, EinloggMenu2Down);
printf("62");
ShowPlayerDialog(playerid, -1, DIALOG_STYLE_MSGBOX, " ", " ", " ", "");
printf("63");
DestroyEinloggMenu(playerid);
printf("64");
sInfo[playerid][db_id] = userID;
printf("65");
format(query, sizeof(query), "SELECT * FROM accounts WHERE Username = '%s'", getPlayerName(playerid));
printf("66");
mysql_function_query(dbhandle, query, true, "SpielerLaden", "ii", playerid,0);
printf("67");
}
Alles anzeigen
case DIALOG_PASWORTE:
{
printf("2");
if(response)
{
printf("3");
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");
printf("4");
strmid(EinloggPass[playerid], inputtext, 0, strlen(inputtext), 128);
printf("5");
TextDrawHideForPlayer(playerid, EinloggMenu2Up);
printf("6");
TextDrawHideForPlayer(playerid, EinloggMenu2Down);
printf("7");
if(mysql_CheckAccountName(EinloggName[playerid]) == 1)
{
printf("8");
if(mysql_CheckPasswort(EinloggName[playerid], EinloggPass[playerid])) TextDrawShowForPlayer(playerid, EinloggMenu2Up);
else TextDrawShowForPlayer(playerid, EinloggMenu2Down);
printf("10");
}
else TextDrawShowForPlayer(playerid, EinloggMenu2Down);
printf("11");
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], "....................");
}
printf("12");
return 1;
}
}
Alles anzeigen
public SpielerLaden(playerid,step)
{
printf("SpielerLaden Ausführen");
new rows, fields, lStart = GetTickCount(), query[2048];
cache_get_data(rows, fields);
switch(step)
{
case 0:
{
if(rows != 0)
{
sInfo[playerid][pRegistriert] = cache_get_field_content_int(0,"Registriert",dbhandle);
cache_get_field_content(0,"RegDatum",sInfo[playerid][pRegDatum],dbhandle,24);
cache_get_field_content(0,"IPAdresse",sInfo[playerid][pIPAdresse],dbhandle,24);
sInfo[playerid][pGeschlecht] = cache_get_field_content_int(0,"Geschlecht",dbhandle);
sInfo[playerid][pLevel] = cache_get_field_content_int(0,"Level",dbhandle);
SetPlayerScore(playerid,sInfo[playerid][pLevel]);
sInfo[playerid][pSkin] = cache_get_field_content_int(0,"Skin",dbhandle);
SetPlayerSkin(playerid,sInfo[playerid][pSkin]);
isInfo[playerid][Money] = cache_get_field_content_int(0,"Money",dbhandle);
GivePlayerMoney(playerid,isInfo[playerid][Money]);
sInfo[playerid][pos][0] = cache_get_field_content_float(0,"PosX",dbhandle);
sInfo[playerid][pos][1] = cache_get_field_content_float(0,"PosY",dbhandle);
sInfo[playerid][pos][2] = cache_get_field_content_float(0,"PosZ",dbhandle);
sInfo[playerid][pos][3] = cache_get_field_content_float(0,"PosR",dbhandle);
sInfo[playerid][pInterior] = cache_get_field_content_int(0,"Interior",dbhandle);
sInfo[playerid][pVirWorld] = cache_get_field_content_int(0,"VWelt",dbhandle);
sInfo[playerid][HasTutorial] = cache_get_field_content_int(0,"HasTutorial",dbhandle);
sInfo[playerid][perso] = cache_get_field_content_int(0,"Perso",dbhandle);
sInfo[playerid][palter] = cache_get_field_content_int(0,"palter",dbhandle);
cache_get_field_content(0,"pGeburtstag",sInfo[playerid][pGeburtstag],dbhandle,24);
sInfo[playerid][pantrag] = cache_get_field_content_int(0,"pantrag",dbhandle);
sInfo[playerid][persot] = cache_get_field_content_int(0,"persot",dbhandle);
sInfo[playerid][pFahrschuleAngemeldet] = cache_get_field_content_int(0,"pFahrschuleAngemeldet",dbhandle);
sInfo[playerid][pTheorieStunden] = cache_get_field_content_int(0,"pTheorieStunden",dbhandle);
sInfo[playerid][pFahrschuleZeit] = cache_get_field_content_int(0,"pFahrschuleZeit",dbhandle);
sInfo[playerid][pTheorieBestanden] = cache_get_field_content_int(0,"pTheorieBestanden",dbhandle);
}
format(query, sizeof(query), "SELECT * FROM accounts_scheine WHERE Username = '%s'", getPlayerName(playerid));
mysql_function_query(dbhandle, query, true, "SpielerLaden", "ii", playerid,3);
}
case 3:
{//Scheine und Lizenzen
if(rows != 0)
{
sInfo[playerid][pAutoLic] = cache_get_field_content_int(0,"AutoLic",dbhandle);
sInfo[playerid][pBikeLic] = cache_get_field_content_int(0,"BikeLic",dbhandle);
sInfo[playerid][pFlugLic] = cache_get_field_content_int(0,"FlugLic",dbhandle);
sInfo[playerid][pBootLic] = cache_get_field_content_int(0,"BootLic",dbhandle);
sInfo[playerid][pLKWLic] = cache_get_field_content_int(0,"LKWLic",dbhandle);
sInfo[playerid][pWaffenLic] = cache_get_field_content_int(0,"WaffenLic",dbhandle);
}
new Jahr, Monat, Tag, Stunde, Minute, Sekunde;
getdate(Jahr, Monat, Tag);
gettime(Stunde, Minute, Sekunde);
printf("[%02d.%02d.%d | %02d:%02d:%02d] [ - LOGIN - ] Der Account von %s wurde mit einer Geschwindigkeit von %d Millisekunden geladen!\n",Tag,Monat,Jahr,Stunde,Minute,Sekunde,sInfo[playerid][pName], (GetTickCount() - lStart));
OnPlayerLogin(playerid);
printf("Ende des Laden");
}
}
return 1;
}
Alles anzeigen
Print's
[15/05/2016 19:40:53] [join] reaL. has joined the server (0:127.0.0.1)
[15/05/2016 19:40:54] [nick] reaL. nick changed to EINLOGGER_0
[15/05/2016 19:41:00] 1
[15/05/2016 19:41:02] 2
[15/05/2016 19:41:02] 3
[15/05/2016 19:41:02] 4
[15/05/2016 19:41:02] 5
[15/05/2016 19:41:02] 6
[15/05/2016 19:41:02] 7
[15/05/2016 19:41:02] 8
[15/05/2016 19:41:03] 10
[15/05/2016 19:41:03] 11
[15/05/2016 19:41:03] 12
[15/05/2016 19:41:03] 13
[15/05/2016 19:41:04] 18
[15/05/2016 19:41:04] 19
[15/05/2016 19:41:04] 37
[15/05/2016 19:41:04] 38
[15/05/2016 19:41:04] 39
[15/05/2016 19:41:04] 40
[15/05/2016 19:41:05] 41
[15/05/2016 19:41:05] 42
[15/05/2016 19:41:05] 43
[15/05/2016 19:41:05] 44
[15/05/2016 19:41:05] 45
[15/05/2016 19:41:05] 46
[15/05/2016 19:41:05] [nick] EINLOGGER_0 nick changed to reaL.
[15/05/2016 19:41:05] 47
[15/05/2016 19:41:05] 48
[15/05/2016 19:41:05] 49
[15/05/2016 19:41:05] 50
[15/05/2016 19:41:05] 51
[15/05/2016 19:41:05] 55
[15/05/2016 19:41:05] 56
[15/05/2016 19:41:05] 57
[15/05/2016 19:41:05] 58
[15/05/2016 19:41:05] 59
[15/05/2016 19:41:05] 60
[15/05/2016 19:41:05] 61
[15/05/2016 19:41:05] 62
[15/05/2016 19:41:05] 63
[15/05/2016 19:41:05] 64
[15/05/2016 19:41:05] 65
[15/05/2016 19:41:05] 66
[15/05/2016 19:41:05] 67
[15/05/2016 19:41:05] SpielerLaden Ausführen
[15/05/2016 19:41:07] SpielerLaden Ausführen
[15/05/2016 19:41:07] [15.05.2016 | 19:41:07] [ - LOGIN - ] Der Account von reaL. wurde mit einer Geschwindigkeit von 15 Millisekunden geladen!
[15/05/2016 19:41:07] Ende des Laden
[15/05/2016 19:41:10] 68
[15/05/2016 19:41:10] 69
[15/05/2016 19:41:10] 70
[15/05/2016 19:41:10] 71
[15/05/2016 19:41:10] 72
Alles anzeigen