(World of Red Apple) Passwort probelm

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Bei mir wird das ned gespeichert, das passwort, hier ma den code


    onplayerconnect public OnPlayerConnect(playerid)
    {
    SetPlayerColor(playerid, COLOR_GREY);
    if(IsPlayerNPC(playerid))
    {
    gPlayerAccount[playerid] = 1;
    gPlayerLogged[playerid] = 1;
    return 1;
    }
    else
    {
    SetPlayerCameraPos(playerid, -2668.5005, 1420.0167, 912.4063);
    SetPlayerCameraLookAt(playerid, -2666.1284, 1423.0178, 912.4063);
    new string[256]; format(string, sizeof(string), "|- %s betretet den Server -|",ReadName(playerid));
    SendClientMessageToAll(COLOR_GREY, string);
    ServerLog(string);
    PlayerInfo[playerid][pKills] = 0; PlayerInfo[playerid][pDeaths] = 0;
    PlayerInfo[playerid][pKey] = 0;
    PlayerInfo[playerid][pCash] = 0; PlayerInfo[playerid][pBank] = 0;
    PlayerInfo[playerid][pTeam] = 0; PlayerInfo[playerid][pLeader] = 0;
    PlayerInfo[playerid][pMember] = 0; PlayerInfo[playerid][pRank] = 0;
    PlayerInfo[playerid][pAdmin] = 0; PlayerInfo[playerid][pSupporter] = 0;
    PlayerInfo[playerid][pSkin] = 0; PlayerInfo[playerid][pFSkin] = 0;
    PlayerInfo[playerid][pLevel] = 0; PlayerInfo[playerid][pKnastzeit] = 0;
    PlayerInfo[playerid][pKnast] = 0; PlayerInfo[playerid][pJailed] = 0;
    PlayerInfo[playerid][pJPoints] = 0; PlayerInfo[playerid][pWanteds] = 0;
    PlayerInfo[playerid][pDrogen] = 0; PlayerInfo[playerid][pMaterials] = 0;
    PlayerInfo[playerid][pNummer] = 0; PlayerInfo[playerid][pBuch] = 0;
    PlayerInfo[playerid][pAutoLiz] = 0; PlayerInfo[playerid][pBikeLiz] = 0;
    PlayerInfo[playerid][pFlugLiz] = 0; PlayerInfo[playerid][pWaffLiz] = 0;
    PlayerInfo[playerid][pAnglLiz] = 0; PlayerInfo[playerid][pBootLiz] = 0;
    PlayerInfo[playerid][pLKWLiz] = 0; PlayerInfo[playerid][pKopfgeld] = 0;
    PlayerInfo[playerid][pOpfer] = 999; PlayerInfo[playerid][pAuftrag] = 0;
    PlayerInfo[playerid][pMacher] = 999; PlayerInfo[playerid][pKey] = 1;
    PlayerInfo[playerid][pCarID] = -1; Woof[playerid] = -1; WooX[playerid] = -1;
    SetPlayerCameraPos(playerid, -2668.5005, 1420.0167, 912.4063);
    SetPlayerCameraLookAt(playerid, -2666.1284, 1423.0178, 912.4063);
    new mat[256]; format(mat, sizeof(mat),"/User/%s.cer",ReadName(playerid));
    if(!fexist(mat))
    {
    gPlayerAccount[playerid] = 0;
    GivePlayerMoney(playerid, (START_CASH/2));
    PlayerInfo[playerid][pBank] = START_BANK;
    PlayerInfo[playerid][pTeam] = 1;
    PlayerInfo[playerid][pLeader] = 0;
    PlayerInfo[playerid][pMember] = 0;
    PlayerInfo[playerid][pRank] = 0;
    PlayerInfo[playerid][pAdmin] = 0;
    PlayerInfo[playerid][pSupporter] = 0;
    PlayerInfo[playerid][pSkin] = 0;
    PlayerInfo[playerid][pFSkin] = 0;
    PlayerInfo[playerid][pLevel] = 1;
    dini_IntSet("/User/%s.ini", "passwort", pKey);
    SendClientMessage(playerid, COLOR_WHITE, " ");
    SendClientMessage(playerid, COLOR_YELLOW2, "*::* Du hast noch keinen Account. Bitte fülle folgendes aus: *::*");
    new s[128];
    format(s,sizeof(s),"Wilkommen %s!\nDu bist noch nich Regestriert!\nFort Carson Roleplay\nVersion:0.2:",ReadName(playerid));
    ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Register Fenster",s,"Registrieren","Abbrechen");
    }
    else
    {
    gPlayerAccount[playerid] = 1;
    dini_IntSet("/User/%s.ini", "passwort", pKey);
    SendClientMessage(playerid, COLOR_WHITE, " ");
    SendClientMessage(playerid, COLOR_YELLOW2, "*::* Du hast bereits einen Account. Bitte tippe dein Passwort rein: *::*");
    new s[128];
    format(s,sizeof(s),"Wilkommen %s!\nDu bist schon Regestriert!\nFort Carson Roleplay\nVersion: 0.2:",ReadName(playerid));
    ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Login Fenster",s,"Einloggen","Abbrechen");
    format(mat, sizeof(mat),"/Autos/%s.carinfo",ReadName(playerid));
    if(dini_Exists(mat))
    {
    }
    }
    }
    return 1;
    }


    back register und login
    public BackLogin(playerid)
    {
    new s[128];
    new loginname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
    format(s,sizeof(s),"Wilkommen %s!\n\nTippe hier dein Passwort rein:",loginname);
    ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Login Fenster",s,"Einloggen","Abbrechen");
    return 1;
    }


    public BackRegister(playerid)
    {
    new s[128];
    new loginname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,loginname,MAX_PLAYER_NAME);
    format(s,sizeof(s),"Wilkommen %s!\n\nTippe hier dein Passwort rein:",loginname);
    ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Register Fenster",s,"Registrieren","Abbrechen");
    return 1;
    }


    ich muss das wirklich haben, sonst is das doof wen pw ned speicher!

  • Dir ist schon klar, dass du uns auch das Login/Register zeigen musst und nicht einfach den Punkt, wo man im Dialog was anklicken kann
    Außerdem:
    PlayerInfo[playerid][pFSkin] = 0;
    PlayerInfo[playerid][pLevel] = 1;
    dini_IntSet("/User/%s.ini", "passwort", pKey);//was soll denn die zeile? %s steht hier nicht für den namen... sondern für ein s
    SendClientMessage(playerid, COLOR_WHITE, " ");

  • ka was das sollte, habs versucht selbst zu machen
    hier register
    else if(dialogid == 2)
    {
    if(!response) return 1;
    else
    {
    if(response == 1)
    {
    if(IsPlayerConnected(playerid))
    {
    if(strlen(inputtext) > 24 || strlen(inputtext) < 4)
    {
    SendClientMessage(playerid, COLOR_GREY, "*:: Das Passwort muss mindestens 4 und maximal 24 Buchstaben lang sein. ::*");
    SendClientMessage(playerid, COLOR_GREEN, "*:: Um das Registrierungs-Fenster wiederaufzurufen: *:: (/register) ::*");
    return 1;
    }
    else
    {
    if(ReadRegister(playerid))
    {
    SendClientMessage(playerid, COLOR_GREY, "*:: Du bist bereits registriert ::*");
    return 1;
    }
    new pass[256], string[256];
    format(pass, 256, "%s", PlayerInfo[playerid][pPassword]);
    Encrypt(pass);
    format(string, sizeof(string), "/User/%s.cer", ReadName(playerid));
    dini_IntSet("/User/%s.ini", "passwort", pKey);
    new File: file = fopen(string, io_read);
    if (file)
    {
    SendClientMessage(playerid, COLOR_GREY, "*::* Du bist bereits registriert *::*");
    fclose(file);
    return 1;
    }
    PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
    new File:hFile;
    hFile = fopen(string, io_append);
    new var[32];
    format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]); fwrite(hFile, var);
    format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]); fwrite(hFile, var);
    format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]); fwrite(hFile, var);
    format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]); fwrite(hFile, var);
    format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pBank]); fwrite(hFile, var);
    format(var, 32, "Team=%d\n",PlayerInfo[playerid][pTeam]); fwrite(hFile, var);
    format(var, 32, "Leader=%d\n",PlayerInfo[playerid][pLeader]); fwrite(hFile, var);
    format(var, 32, "Member=%d\n",PlayerInfo[playerid][pMember]); fwrite(hFile, var);
    format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]); fwrite(hFile, var);
    format(var, 32, "Admin=%d\n",PlayerInfo[playerid][pAdmin]); fwrite(hFile, var);
    format(var, 32, "Supporter=%d\n",PlayerInfo[playerid][pSupporter]); fwrite(hFile, var);
    format(var, 32, "Skin=%d\n",PlayerInfo[playerid][pSkin]); fwrite(hFile, var);
    format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]); fwrite(hFile, var);
    format(var, 32, "FSkin=%d\n",PlayerInfo[playerid][pFSkin]); fwrite(hFile, var);
    format(var, 32, "Knastzeit=%d\n",PlayerInfo[playerid][pKnastzeit]); fwrite(hFile, var);
    format(var, 32, "Wanteds=%d\n",PlayerInfo[playerid][pWanteds]); fwrite(hFile, var);
    format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]); fwrite(hFile, var);
    format(var, 32, "JPoints=%d\n",PlayerInfo[playerid][pJPoints]); fwrite(hFile, var);
    format(var, 32, "Knast=%d\n",PlayerInfo[playerid][pKnast]); fwrite(hFile, var);
    format(var, 32, "Drogen=%d\n",PlayerInfo[playerid][pDrogen]); fwrite(hFile, var);
    format(var, 32, "Materialien=%d\n",PlayerInfo[playerid][pMaterials]); fwrite(hFile, var);
    format(var, 32, "Points=%d\n",PlayerInfo[playerid][pPoint]); fwrite(hFile, var);
    format(var, 32, "Experince=%d\n",PlayerInfo[playerid][pExp]); fwrite(hFile, var);
    format(var, 32, "Duty=%d\n",PlayerInfo[playerid][pDuty]); fwrite(hFile, var);
    format(var, 32, "Respekt=%d\n",PlayerInfo[playerid][pRespekt]); fwrite(hFile, var);
    format(var, 32, "Nummer=%d\n",PlayerInfo[playerid][pNummer]); fwrite(hFile, var);
    format(var, 32, "Buch=%d\n",PlayerInfo[playerid][pBuch]); fwrite(hFile, var);
    format(var, 32, "AutoLiz=%d\n",PlayerInfo[playerid][pAutoLiz]); fwrite(hFile, var);
    format(var, 32, "BikeLiz=%d\n",PlayerInfo[playerid][pBikeLiz]); fwrite(hFile, var);
    format(var, 32, "FlugLiz=%d\n",PlayerInfo[playerid][pFlugLiz]); fwrite(hFile, var);
    format(var, 32, "WaffLiz=%d\n",PlayerInfo[playerid][pWaffLiz]); fwrite(hFile, var);
    format(var, 32, "AnglLiz=%d\n",PlayerInfo[playerid][pAnglLiz]); fwrite(hFile, var);
    format(var, 32, "BootLiz=%d\n",PlayerInfo[playerid][pBootLiz]); fwrite(hFile, var);
    format(var, 32, "LKWLiz=%d\n",PlayerInfo[playerid][pLKWLiz]); fwrite(hFile, var);
    format(var, 32, "Kopfgeld=%d\n",PlayerInfo[playerid][pKopfgeld]); fwrite(hFile, var);
    format(var, 32, "Opfer=%d\n",PlayerInfo[playerid][pOpfer]); fwrite(hFile, var);
    format(var, 32, "Macher=%d\n",PlayerInfo[playerid][pMacher]); fwrite(hFile, var);
    format(var, 32, "Auftrag=%d\n",PlayerInfo[playerid][pAuftrag]); fwrite(hFile, var);
    format(var, 32, "Key=%d\n",PlayerInfo[playerid][pKey]); fwrite(hFile, var);
    format(var, 32, "CarID=%d\n",PlayerInfo[playerid][pCarID]); fwrite(hFile, var);
    fclose(hFile);
    SendClientMessage(playerid, COLOR_WHITE, "*::* Du hast dich erfolgreich registriert! *::* (/login) *::*");
    return 1;
    }
    }
    }
    else if(response == 0)
    {
    SendClientMessage(playerid, COLOR_GREEN, "*:: Um das Registrierungs-Fenster wiederaufzurufen: *:: (/register) ::*");
    return 1;
    }
    }
    }
    hier login else if(dialogid == 3)
    {
    if(!response) return 1;
    else
    {
    if(response == 1)
    {
    if(IsPlayerConnected(playerid))
    {
    if(strlen(inputtext) > 24 || strlen(inputtext) < 4)
    {
    SendClientMessage(playerid, COLOR_GREY, "*:: Das Passwort muss mindestens 4 und maximal 24 Buchstaben lang sein. ::*");
    SendClientMessage(playerid, COLOR_GREEN, "*:: Um das Einloggungs-Fenster wiederaufzurufen: *:: (/login) ::*");
    return 1;
    }
    else
    {
    if(ReadLogin(playerid))
    {
    SendClientMessage(playerid, COLOR_GREY, "*:: Du bist bereits eingeloggt ::*");
    return 1;
    }
    new pass[256];
    format(pass, 255, "%s", inputtext);
    Encrypt(pass);
    OnPlayerLogin(playerid, pass);
    /*if(PlayerInfo[playerid][pEingang] > 0)
    {
    new string[256];
    format(string, 256, "*:: Du hast %d neue Nachrichten! ::*", PlayerInfo[playerid][pEingang]);
    SendClientMessage(playerid, COLOR_GREY, string);
    }*/
    return 1;
    }
    }
    }
    else if(response == 0)
    {
    SendClientMessage(playerid, COLOR_GREEN, "*:: Um das Einloggungs-Fenster wiederaufzurufen: *:: (/login) ::*");
    return 1;
    }
    }
    }


    man kann mir vllt ach über icq helfen


    353020202