Wenn ich mich einlogge kommt kein Login oder Registrier Fenster??
Weiß einer woran das Liegt
public OnPlayerConnect(playerid)
{
new Query[200];
SendClientMessage(playerid,-1,"Willkommen auf dem Server");
mysql_format(m_connect,Query,"SELECT * FROM `accounts` WHERE `Name` = '%s'",PlayerName(playerid));
mysql_function_query(m_connect,Query,true,"OnPlayerCheckAccount","i", playerid);
if(PlayerInfo[playerid][pBan] == 1)return Kick(playerid);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(GetPVarInt(playerid,"Login") == 1){
SavePlayerData(playerid);
SetPVarInt(playerid, "Login", 0);
SetPVarInt(playerid, "WPW", 0);
for(new x; pStats:x < pStats; x++) PlayerInfo[playerid][pStats:x] = 0;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(GetPVarInt(playerid,"Login") == 0)return Kick(playerid);
printf("spawn");
return 1;
}
forward OnPlayerCheckAccount(playerid);
public OnPlayerCheckAccount(playerid)
{
new row, field;
cache_get_data(row,field);
if(!row){
SendClientMessage(playerid,-1,"Dein Account wurde nicht bei uns gefunden. Bitte registriere dich bei uns.");
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Registrierung","Bitte gebe dein gewünschtes Passwort hier ein","Registrieren","Abbrechen");
}else{
new Query[200];
SendClientMessage(playerid,-1,"Dein Account wurde gefunden. Bitte logge dich ein.");
mysql_format(m_connect,Query,"SELECT * FROM `accounts` WHERE `Name` = '%s'",PlayerName(playerid));
mysql_function_query(m_connect,Query,true,"OnPlayerLoadPlayerData","i",playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login","Gebe nun dein Passwort ein","Anmelden","Abbrechen");
printf("Checkaccounts");
}
return 1;
}
Mit freundlichen Grüßen