Hallo,
ersteinmal danke an Lambo, er hat vergeblich versucht mir zu helfen..
Es wird irgendwie nichts abgespeichert oder nichts abgerufen..
Zum Beispiel fängt das Tutorial immer wieder an, wenn ich mich einlogge...
public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYERS],accFormat[128],unconnecttext[20];
GetPlayerName(playerid,pname,sizeof pname);
format(accFormat,sizeof accFormat,"/Spieler/%s.ini",pname);
format(unconnecttext,128,"Der %s hat den Server verlassen!", pname);
if(dini_Exists(accFormat)) //&& pInfo[playerid][pEingeloggt] == 1) Versuchs erstmal so ok
{
dini_IntSet(accFormat,"Geld",GetPlayerMoney(playerid));
dini_IntSet(accFormat,"Skin",GetPlayerSkin(playerid));
dini_IntSet(accFormat,"Wanteds",GetPlayerWantedLevel(playerid));
dini_IntSet(accFormat,"Tutorial",pInfo[playerid][pTut]);
dini_IntSet(accFormat,"Fraktion",gTeam[playerid]);
dini_IntSet(accFormat,"Geschlecht",pInfo[playerid][pSex]);
dini_IntSet(accFormat,"Herkunft",pInfo[playerid][pOrigin]);
dini_IntSet(accFormat,"Führerschein", pInfo[playerid][pCarLic]);
dini_IntSet(accFormat,"Rank", pInfo[playerid][pRank]);
dini_IntSet(accFormat,"Leader", pInfo[playerid][pLeader]);
}
pInfo[playerid][pEingeloggt] = 0;
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new pname[MAX_PLAYERS],accFormat[128];
GetPlayerName(playerid,pname,sizeof pname);
format(logintext,126,"Herzlich Willkommen : [%s]\n\nBitte Logge dich nun ein:", pname);
format(registertext,126,"Herzlich Willkommen : [%s]\n\nBitte Registriere dich nun:", pname);
format(accFormat,sizeof accFormat,"Spieler/%s.ini",pname);
if(response)
{
switch(dialogid)
{
case DIALOG_LOGIN:
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login System",logintext,"Weiter","Abbrechen");
GameTextForPlayer(playerid,"~r~Keine gültige Eingabe!",5000,1);
return SendClientMessage(playerid,0xFFFFFFFF,"Du hast kein Passwort angegeben!");
}
if(strcmp(inputtext,dini_Get(accFormat,"Passwort")) == 0)
{
GivePlayerMoney(playerid,(dini_Int(accFormat,"Geld")));
SetPlayerWantedLevel(playerid,(dini_Int(accFormat,"Wanted")));
pInfo[playerid][pCarLic]= (dini_Int(accFormat,"Führerschein"));
pInfo[playerid][pTut]= (dini_Int(accFormat,"Tutorial"));
pInfo[playerid][pRank]= (dini_Int(accFormat,"Rank"));
pInfo[playerid][pLeader]= (dini_Int(accFormat,"Leader"));
pInfo[playerid][pOrigin]= (dini_Int(accFormat,"Herkunft"));
pInfo[playerid][pSex]= (dini_Int(accFormat,"Geschlecht"));
pInfo[playerid][pEingeloggt] = 1;
GameTextForPlayer(playerid,"~g~Erfolgreich Eingeloggt!",5000,1);
SendClientMessage(playerid,0xFFFFFFFF,"Du hast dich erfolgreich eingeloggt!");
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login System",logintext,"Weiter","Abbrechen");
GameTextForPlayer(playerid,"~r~Passwort stimmt nicht!",5000,1);
SendClientMessage(playerid,0xFFFFFFFF,"Das Passwort stimmt mit der in der Datenbank nicht überein!");
}
}
case DIALOG_REGISTER:
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,1,"Register System",registertext,"Weiter","Abbrechen");
GameTextForPlayer(playerid,"~r~Passwort zu kurz!",5000,1);
return SendClientMessage(playerid,0xFFFFFFFF,"Das Passwort ist leider zu kurz!");
}
dini_Create(accFormat);
dini_Set(accFormat,"Passwort",inputtext);
dini_IntSet(accFormat,"Geld",GetPlayerMoney(playerid));
dini_IntSet(accFormat,"Skin",GetPlayerSkin(playerid));
dini_IntSet(accFormat,"Tutorial",pInfo[playerid][pTut]);
dini_IntSet(accFormat,"Rank",pInfo[playerid][pRank]);
dini_IntSet(accFormat,"Leader",pInfo[playerid][pLeader]);
dini_IntSet(accFormat,"Land",pInfo[playerid][pOrigin]);
dini_IntSet(accFormat,"Geschlecht",pInfo[playerid][pSex]);
dini_IntSet(accFormat,"Führerschein",pInfo[playerid][pCarLic]);
pInfo[playerid][pGeld] = 5000;
pInfo[playerid][pEingeloggt] = 0;
pInfo[playerid][pWanted] = 0;
pInfo[playerid][pCarLic] = 0;
gTeam[playerid] = 0;
pInfo[playerid][pEingeloggt] = 1;
GameTextForPlayer(playerid,"~g~Erfolgreich Registriert!",5000,1);
SendClientMessage(playerid,0xFFFFFFFF,"Account wurde in der Datenbank angelegt, und du wurdest eingeloggt!");
}
}
}
else
{
switch(dialogid)
{
case DIALOG_LOGIN:ShowPlayerDialog(playerid,DIALOG_LOGIN,1,"Login System",logintext,"Weiter","Abbrechen");
case DIALOG_REGISTER:ShowPlayerDialog(playerid,DIALOG_REGISTER,1,"Register System",registertext,"Weiter","Abbrechen");
}
}
return 1;
}
Hoffe ihr findet den Fehler