Abend, mein Login Register system geht wider nur halb, ich weiß nicht warum, voher ging alles. Wen ich mich jetzt neu registrieren will, zeigt er zwar zuert den register dialog an, wen ich aber dan enter drücke müsste normal "Das Passwort ist zur kurtz" kommen doch dan springt er auf den normal "login" Dialog um. Er legt auch keine Datei an. Wen ich schon einen account habe (bevor das problem kam) Geht alles wie immer. An Was liegt das?
public OnPlayerConnect(playerid)
{
new pname[MAX_PLAYERS],accFormat[128];
GetPlayerName(playerid,pname,sizeof pname);
format(accFormat,sizeof accFormat,"acc/%s.sav",pname);
if(fexist(accFormat))
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FF0000}Login","Willkommen zurück, Bitte gebe Dein Passwort ein: {FFFFFF} || {FF0000}Welcome back, request gives your password:","Enter","Close");
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FF0000}Registrieren","Du bist neu, Bitte gebe dein Passwort ein: {FFFFFF} || {FF0000}You are new, request gives your password:","Enter","Close");
}
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new pname[MAX_PLAYERS],accFormat[128];
GetPlayerName(playerid,pname,sizeof pname);
format(accFormat,sizeof accFormat,"acc/%s.sav",pname);
if(response)
{
switch(dialogid)
{
case DIALOG_LOGIN:
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FF0000}Login","Willkommen zurück, Bitte gebe Dein Passwort ein: {FFFFFF} || {FF0000}Welcome back, request gives your password:","Enter","Close");
return SendClientMessage(playerid,COLOR_LIGHTBLUE,"Kein Passwort angegeben!{FFFFFF} || {FF0000}No password specified");
}
if(strcmp(inputtext,dini_Get(accFormat,"Passwort")) == 0)
{
Player[playerid][admin] = dini_Int(accFormat,"AdminLvl");
Player[playerid][Kills] = dini_Int(accFormat,"Kills");
Player[playerid][Deaths] = dini_Int(accFormat,"Deaths");
SetPlayerLevel(playerid,dini_Int(accFormat,"lvl"));
GivePlayerMoney(playerid,dini_Int(accFormat,"Geld"));
SetPlayerScore(playerid,dini_Int(accFormat,"Score"));
Player[playerid][eingeloggt] = 1;
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Sie haben sich erfolgreich angemeldet{FFFFFF} || {FF0000}They have announced themselves successfully");
InterpolateCameraPos(playerid, 1532.795776, -1774.432128, 33.512901, 1529.263916, -1686.004516, 14.459429, 4500,CAMERA_MOVE );
InterpolateCameraLookAt(playerid, 1528.934692, -1777.396484, 32.370731, 1533.586914, -1683.492187, 14.482867, 3000,CAMERA_MOVE );
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FF0000}Login","Willkommen zurück, Bitte gebe Dein Passwort ein: {FFFFFF} || {FF0000}Welcome back, request gives your password:","Enter","Close");
return SendClientMessage(playerid,COLOR_LIGHTBLUE,"Das Passwort ist falsch!{FFFFFF} || {FF0000}The password is wrong!");
}
}
case DIALOG_REG:
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,DIALOG_REG,DIALOG_STYLE_PASSWORD,"{FF0000}Registrieren","Du bist neu, Bitte gebe dein Passwort ein: {FFFFFF} || {FF0000}You are new, request gives your password:","Enter","Close");
return SendClientMessage(playerid,COLOR_LIGHTBLUE,"Das Passwort ist zu kurtz! {FFFFFF} || {FF0000}The password is too short!");
}
dini_Create(accFormat);
dini_Set(accFormat,"Passwort",inputtext);
Player[playerid][admin] = 0 ;
Player[playerid][Kills] = 0 ;
Player[playerid][Deaths] = 0 ;
Player[playerid][eingeloggt] = 1;
InterpolateCameraPos(playerid, 1532.795776, -1774.432128, 33.512901, 1529.263916, -1686.004516, 14.459429, 4500,CAMERA_MOVE );
InterpolateCameraLookAt(playerid, 1528.934692, -1777.396484, 32.370731, 1533.586914, -1683.492187, 14.482867, 3000,CAMERA_MOVE );
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Ihr Konto wurde erfolgreich registriert!{FFFFFF} || {FF0000}Their(Her) account was registered successfully!");
}
}
}
else
{
switch(dialogid)
{
case DIALOG_LOGIN:ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"{FF0000}Login","Willkommen zurück, Bitte gebe Dein Passwort ein: {FFFFFF} || {FF0000}Welcome back, request gives your password:","Enter","Close");
case DIALOG_REG:ShowPlayerDialog(playerid,DIALOG_REG,DIALOG_STYLE_PASSWORD,"{FF0000}Registrieren","Du bist neu, Bitte gebe dein Passwort ein: {FFFFFF} || {FF0000}You are new, request gives your password:","Enter","Close");
}
}
return 1;
}
Ich bitte um Hilfe