Moin,
habe ein auf Mysql basierendes Login & Register System,
alles kein Problem, jedoch hatte ich das Problem das bei einigen kein Login bzw. Register Dialog erschienen ist,
dies passierte meist nach knapp 10 Minuten...
Also, Server an: alles geht.
10 Minuten später: Kein Dialog geht mehr (login,register)
Jemand ne Idee?
Hier die Dialoge
enum
{
DIALOG_LOGIN,
DIALOG_REGISTER,
DIALOG_AFAHRZEUG,
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
if(response)
{
if(strlen(inputtext) == 0)return ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Registration - Der Anfang","Dein Passwort muss mindestens 6 Zeichen enthalten\nBitte wähle ein neues Passwort.","Registration","Abbrechen");
if(strlen(inputtext)>=6)
{
CreateAccount(playerid, inputtext);
Eingeloggt[playerid] = 1;
SpawnPlayer(playerid);
SetCameraBehindPlayer(playerid);
TextDrawHideForPlayer(playerid,LR[playerid][0]);
TextDrawHideForPlayer(playerid,LR[playerid][1]);
TextDrawHideForPlayer(playerid,LR[playerid][2]);
TextDrawHideForPlayer(playerid,LR[playerid][3]);
TextDrawHideForPlayer(playerid,LR[playerid][4]);
TextDrawHideForPlayer(playerid,LR[playerid][5]);
TextDrawHideForPlayer(playerid,LR[playerid][6]);
TextDrawHideForPlayer(playerid,LR[playerid][7]);
TextDrawHideForPlayer(playerid,LR[playerid][8]);
TextDrawHideForPlayer(playerid,LR[playerid][9]);
TextDrawHideForPlayer(playerid,LR[playerid][10]);
TextDrawHideForPlayer(playerid,LR[playerid][11]);
TextDrawShowForPlayer(playerid,SpielerUhr[playerid]);
TextDrawShowForPlayer(playerid,SpielerDatum[playerid]);
SetPlayerVirtualWorld(playerid,0);
StopAudioStreamForPlayer(playerid);
}
else return ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Registration - Der Anfang","Dein Passwort muss mindestens 6 Zeichen enthalten\nBitte wähle ein neues Passwort.","Registration","Abbrechen");
}
else return Kick(playerid);
}
case DIALOG_LOGIN:
{
if(response)
{
if(strlen(inputtext) == 0)return ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Anmeldung - Willkommen zurück","Das angegebene Passwort war nicht korrekt.\nBitte gebe nun dein Passwort ein.","Anmelden","Abbrechen");
if(!strcmp(inputtext, mysql_ReturnPasswort(SpielerName(playerid)), true))
{
Eingeloggt[playerid] = 1;
LoadPlayer(playerid);
SpawnPlayer(playerid);
SetCameraBehindPlayer(playerid);
TextDrawHideForPlayer(playerid,LR[playerid][0]);
TextDrawHideForPlayer(playerid,LR[playerid][1]);
TextDrawHideForPlayer(playerid,LR[playerid][2]);
TextDrawHideForPlayer(playerid,LR[playerid][3]);
TextDrawHideForPlayer(playerid,LR[playerid][4]);
TextDrawHideForPlayer(playerid,LR[playerid][5]);
TextDrawHideForPlayer(playerid,LR[playerid][6]);
TextDrawHideForPlayer(playerid,LR[playerid][7]);
TextDrawHideForPlayer(playerid,LR[playerid][8]);
TextDrawHideForPlayer(playerid,LR[playerid][9]);
TextDrawHideForPlayer(playerid,LR[playerid][10]);
TextDrawHideForPlayer(playerid,LR[playerid][11]);
TextDrawShowForPlayer(playerid,SpielerUhr[playerid]);
TextDrawShowForPlayer(playerid,SpielerDatum[playerid]);
SetPlayerVirtualWorld(playerid,0);
StopAudioStreamForPlayer(playerid);
return 1;
}
else return ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Anmeldung - Willkommen zurück","Das angegebene Passwort war nicht korrekt.\nBitte gebe nun dein Passwort ein.","Anmelden","Abbrechen");
}
else return Kick(playerid);
}
case DIALOG_AFAHRZEUG:
{
switch(listitem)
{
case 0:
{
new Float:x, Float:y, Float:z, supporter[MAX_PLAYER_NAME],string[200];
GetPlayerName(playerid,supporter,MAX_PLAYER_NAME);
GetPlayerPos(playerid,x,y,z);
SetVehicleNumberPlate(car[playerid] = CreateVehicle(560,x,y,z,3,0,0,-1),"Supporter");
PutPlayerInVehicle(playerid,car[playerid],0);
SendClientMessage(playerid,0xFFB400FF,"Du hast ein Supporter Mobil gespawnt.");
format(string,sizeof(string),"Support Fahrzeug von %s",supporter);
supportveh[car[playerid]] = Create3DTextLabel(string,0xFFB400FF,0.0,0.0,0.0,30.0,0,1);
Attach3DTextLabelToVehicle(supportveh[car[playerid]],car[playerid],0.0,0.0,2.0);
SetVehicleVirtualWorld(car[playerid],GetPlayerVirtualWorld(playerid));
SupMobil[playerid] = 1;
return 1;
}
case 1:
{
new Float:x, Float:y, Float:z, supporter[MAX_PLAYER_NAME],string[200];
GetPlayerName(playerid,supporter,MAX_PLAYER_NAME);
GetPlayerPos(playerid,x,y,z);
SetVehicleNumberPlate(car[playerid]=CreateVehicle(520,x,y,z,3,0,0,-1),"Supporter");
PutPlayerInVehicle(playerid,car[playerid],0);
SendClientMessage(playerid,0xFFB400FF,"Du hast ein Supporter Mobil gespawnt.");
format(string,sizeof(string),"Support Fahrzeug von %s",supporter);
supportveh[car[playerid]] = Create3DTextLabel(string,0xFFB400FF,0.0,0.0,0.0,30.0,0,1);
Attach3DTextLabelToVehicle(supportveh[car[playerid]],car[playerid],0.0,0.0,2.0);
SetVehicleVirtualWorld(car[playerid],GetPlayerVirtualWorld(playerid));
SupMobil[playerid] = 1;
return 1;
}
case 2:
{
new Float:x, Float:y, Float:z, supporter[MAX_PLAYER_NAME],string[200];
GetPlayerName(playerid,supporter,MAX_PLAYER_NAME);
GetPlayerPos(playerid,x,y,z);
SetVehicleNumberPlate(car[playerid]=CreateVehicle(411,x,y,z,3,0,0,-1),"Supporter");
PutPlayerInVehicle(playerid,car[playerid],0);
SendClientMessage(playerid,0xFFB400FF,"Du hast ein Supporter Mobil gespawnt.");
format(string,sizeof(string),"Support Fahrzeug von %s",supporter);
supportveh[car[playerid]] = Create3DTextLabel(string,0xFFB400FF,0.0,0.0,0.0,30.0,0,1);
Attach3DTextLabelToVehicle(supportveh[car[playerid]],car[playerid],0.0,0.0,2.0);
SetVehicleVirtualWorld(car[playerid],GetPlayerVirtualWorld(playerid));
SupMobil[playerid] = 1;
return 1;
}
}
}
}
return 1;
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid != INVALID_TEXT_DRAW)
{
if(clickedid == LR[playerid][9])
{
if(Eingeloggt[playerid] == 0)
{
if(mysql_CheckAccount(playerid) == 0)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Registration - Der Anfang","{FFFFFF}Du hast nun die Möglichkeit, ein Passwort einzugeben.\nBedenke das es sicher sein sollte.\nEs muss mindestens 6 Zeichen beinhalten\n","Registrieren","Verlassen");
CancelSelectTextDraw(playerid);
return 1;
}
else if(mysql_CheckAccount(playerid) == 1)
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Anmeldung - Willkommen zurück","Dein Account wurde gefunden.\nBitte gib dein Passwort ein um dich anzumelden.","Anmelden","Verlassen");
CancelSelectTextDraw(playerid);
return 1;
}
}
}
else if(clickedid == LR[playerid][8])
{
if(Eingeloggt[playerid] == 0)
{
if(mysql_CheckAccount(playerid) == 0)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Registration - Der Anfang","{FFFFFF}Du hast nun die Möglichkeit, ein Passwort einzugeben.\nBedenke das es sicher sein sollte.\nEs muss mindestens 6 Zeichen beinhalten\n","Registrieren","Verlassen");
CancelSelectTextDraw(playerid);
return 1;
}
else if(mysql_CheckAccount(playerid) == 1)
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Anmeldung - Willkommen zurück","Dein Account wurde gefunden.\nBitte gib dein Passwort ein um dich anzumelden.","Anmelden","Verlassen");
CancelSelectTextDraw(playerid);
return 1;
}
}
}
}
return 1;
}