Spieler Speichern

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
  • Hallo Leute,


    ich habe ein Register/Login System erstellt nach "NemesusScripts"Tutorials.
    also hab ich bei "stock Register" folgendes geschrieben.


    stock Register(playerid,key[])
    {
    new Player[64], Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Name,sizeof(Name));
    format(Player,sizeof(Player),"/Spieler/%s.txt",Name);
    dini_Create(Player);
    dini_Set(Player,"Passwort",key);
    SendClientMessage(playerid,0xFEFEFEFE,"Du hast dich erfolgreich registriert.");
    return 1;
    }
    Das Passwort speichern ist das Problem!! Wenn ich mich registriere und im Spiel auf das Scriptfile meines accs sehe steht da " Passwort=*key* "
    doch wenn ich dann mich auslogge steht da:



    Passwort=
    Level=0
    Adminlevel=0
    Supporter=0
    DonateRang=0
    UpgradePunkte=0
    ConnectTime=0
    Neuling=0
    pReg=0
    Geschlecht=0
    Alter=0
    Herkunft=0
    pCK=0
    Account=0
    KreditkartenDauer=0
    Kredit=0
    Kills=0
    Jailed=0
    Jailtime=0
    Tode=0
    Arrest=0
    Wantedtode=0
    Telefonbuch=0
    ..
    ..
    ...
    ......


    Durch das stock SpielerSpeichern passiert das glaub ich.. Wie kann ich das verbessern ?(

  • printf zu Spielerspeichern oder zu Register?


    SavePlayer:

    stock SavePlayer(playerid)
    {
    new Player[64], Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Name,sizeof(Name));
    format(Player,sizeof(Player),"/Spieler/%s.txt",Name);
    if(dini_Exists(Player))
    {
    dini_IntSet(Player,"Level",PlayerInfo[playerid][pLevel]);
    dini_IntSet(Player,"Adminlevel",PlayerInfo[playerid][pAdmin]);
    dini_IntSet(Player,"Supporter",PlayerInfo[playerid][pSupporter]);
    dini_IntSet(Player,"DonateRang",PlayerInfo[playerid][pDonateRank]);
    dini_IntSet(Player,"UpgradePunkte",PlayerInfo[playerid][gPupgrade]);
    dini_IntSet(Player,"ConnectTime",PlayerInfo[playerid][pConnectTime]);
    dini_IntSet(Player,"Neuling",PlayerInfo[playerid][pNeuling]);
    dini_IntSet(Player,"pReg",PlayerInfo[playerid][pReg]);
    dini_IntSet(Player,"Geschlecht",PlayerInfo[playerid][pSex]);
    dini_IntSet(Player,"Alter",PlayerInfo[playerid][pAge]);
    dini_IntSet(Player,"Herkunft",PlayerInfo[playerid][pOrigin]);
    dini_IntSet(Player,"pCK",PlayerInfo[playerid][pCK]);
    dini_IntSet(Player,"Account",PlayerInfo[playerid][pAccount]);
    dini_IntSet(Player,"KreditkartenDauer",PlayerInfo[playerid][pPlayerKreditDauer]);
    dini_IntSet(Player,"Kredit",PlayerInfo[playerid][pPlayerKredit]);
    dini_IntSet(Player,"Kills",PlayerInfo[playerid][pKills]);
    dini_IntSet(Player,"Jailed",PlayerInfo[playerid][pJailed]);
    dini_IntSet(Player,"Jailtime",PlayerInfo[playerid][pJailTime]);
    dini_IntSet(Player,"Tode",PlayerInfo[playerid][pDeaths]);
    dini_IntSet(Player,"Arrest",PlayerInfo[playerid][pArrested]);
    dini_IntSet(Player,"Wantedtode",PlayerInfo[playerid][pWantedDeaths]);
    dini_IntSet(Player,"Telefonbuch",PlayerInfo[playerid][pPhoneBook]);
    dini_IntSet(Player,"Lottonummer",PlayerInfo[playerid][pLottoNr]);
    dini_IntSet(Player,"Fische",PlayerInfo[playerid][pFishes]);
    dini_IntSet(Player,"GrosterFang",PlayerInfo[playerid][pBiggestFish]);
    dini_IntSet(Player,"Job",PlayerInfo[playerid][pJob]);
    dini_IntSet(Player,"PayCheck",PlayerInfo[playerid][pPayCheck]);
    dini_IntSet(Player,"Rest",PlayerInfo[playerid][pRest]);
    dini_IntSet(Player,"Kopfgeld",PlayerInfo[playerid][pHeadValue]);
    dini_IntSet(Player,"Gangjail",PlayerInfo[playerid][pGangJailed]);
    dini_IntSet(Player,"Mundtape",PlayerInfo[playerid][pMauled]);
    dini_IntSet(Player,"Materialien",PlayerInfo[playerid][pMats]);
    dini_IntSet(Player,"Drogen",PlayerInfo[playerid][pDrugs]);
    dini_IntSet(Player,"FraktionsLeader",PlayerInfo[playerid][pLeader]);
    dini_IntSet(Player,"FraktionsMember",PlayerInfo[playerid][pMember]);
    dini_IntSet(Player,"FraktionsRang",PlayerInfo[playerid][pRank]);
    dini_IntSet(Player,"Charakter",PlayerInfo[playerid][pChar]);
    dini_IntSet(Player,"Contracts",PlayerInfo[playerid][pContractTime]);
    dini_IntSet(Player,"DetektivSkill",PlayerInfo[playerid][pDetSkill]);
    dini_IntSet(Player,"SexSkill",PlayerInfo[playerid][pSexSkill]);
    dini_IntSet(Player,"BoxSkill",PlayerInfo[playerid][pBoxSkill]);
    dini_IntSet(Player,"AnwaltsSkill",PlayerInfo[playerid][pLawSkill]);
    dini_IntSet(Player,"MechanikerSkill",PlayerInfo[playerid][pMechSkill]);
    dini_IntSet(Player,"AutodiebSkill",PlayerInfo[playerid][pJackSkill]);
    dini_IntSet(Player,"CarSkill",PlayerInfo[playerid][pCarSkill]);
    dini_IntSet(Player,"NewsSkill",PlayerInfo[playerid][pNewsSkill]);
    dini_IntSet(Player,"DrogenSkill",PlayerInfo[playerid][pDrugsSkill]);
    dini_IntSet(Player,"KochSkill",PlayerInfo[playerid][pCookSkill]);
    dini_IntSet(Player,"FischSkill",PlayerInfo[playerid][pFishSkill]);
    dini_IntSet(Player,"Interior",PlayerInfo[playerid][pInt]);
    dini_IntSet(Player,"Local",PlayerInfo[playerid][pLocal]);
    dini_IntSet(Player,"Team",PlayerInfo[playerid][pTeam]);
    dini_IntSet(Player,"Model",PlayerInfo[playerid][pModel]);
    dini_IntSet(Player,"Telefonnummer",PlayerInfo[playerid][pPnumber]);
    dini_IntSet(Player,"Hausschlüssel",PlayerInfo[playerid][pPhousekey]);
    dini_IntSet(Player,"BizSchlüssel",PlayerInfo[playerid][pPbiskey]);
    dini_IntSet(Player,"Fahrschein",PlayerInfo[playerid][pCarLic]);
    dini_IntSet(Player,"NewLic",PlayerInfo[playerid][pNewLic]);
    dini_IntSet(Player,"Flugschein",PlayerInfo[playerid][pFlyLic]);
    dini_IntSet(Player,"Bootschein",PlayerInfo[playerid][pBoatLic]);
    dini_IntSet(Player,"Fischerschein",PlayerInfo[playerid][pFishLic]);
    dini_IntSet(Player,"Waffenschein",PlayerInfo[playerid][pGunLic]);
    dini_IntSet(Player,"LKWSchein",PlayerInfo[playerid][pLKWLic]);
    dini_IntSet(Player,"Rollerschein",PlayerInfo[playerid][pRollerLic]);
    dini_IntSet(Player,"MotorradSchein",PlayerInfo[playerid][pMotoLic]);
    dini_IntSet(Player,"Zigaretten",PlayerInfo[playerid][pZig]);
    dini_IntSet(Player,"Kekse",PlayerInfo[playerid][pKekse]);
    dini_IntSet(Player,"ZigarettenSucht",PlayerInfo[playerid][pZigSucht]);
    dini_IntSet(Player,"Waffe1",PlayerInfo[playerid][pGun1]);
    dini_IntSet(Player,"Waffe2",PlayerInfo[playerid][pGun2]);
    dini_IntSet(Player,"Waffe3",PlayerInfo[playerid][pGun3]);
    dini_IntSet(Player,"Waffe4",PlayerInfo[playerid][pGun4]);
    dini_IntSet(Player,"Mun1",PlayerInfo[playerid][pAmmo1]);
    dini_IntSet(Player,"Mun2",PlayerInfo[playerid][pAmmo2]);
    dini_IntSet(Player,"Mun3",PlayerInfo[playerid][pAmmo3]);
    dini_IntSet(Player,"Mun4",PlayerInfo[playerid][pAmmo4]);
    dini_IntSet(Player,"Fahrzeit",PlayerInfo[playerid][pCarTime]);
    dini_IntSet(Player,"Mulltime",PlayerInfo[playerid][pMulltime]);
    dini_IntSet(Player,"PayDay",PlayerInfo[playerid][pPayDay]);
    dini_IntSet(Player,"GehabtePayDay",PlayerInfo[playerid][pPayDayHad]);
    dini_IntSet(Player,"CDSpieler",PlayerInfo[playerid][pCDPlayer]);
    dini_IntSet(Player,"Siege",PlayerInfo[playerid][pWins]);
    dini_IntSet(Player,"Niederlagen",PlayerInfo[playerid][pLoses]);
    dini_IntSet(Player,"PromilleAlk",PlayerInfo[playerid][pAlcoholPerk]);
    dini_IntSet(Player,"PromilleDrug",PlayerInfo[playerid][pDrugPerk]);
    dini_IntSet(Player,"MiserPerk",PlayerInfo[playerid][pMiserPerk]);
    dini_IntSet(Player,"PainPerk",PlayerInfo[playerid][pPainPerk]);
    dini_IntSet(Player,"TraderPerk",PlayerInfo[playerid][pTraderPerk]);
    dini_IntSet(Player,"Tutorial",PlayerInfo[playerid][pTut]);
    dini_IntSet(Player,"Radio",PlayerInfo[playerid][pRadio]);
    dini_IntSet(Player,"Warns",PlayerInfo[playerid][pWarns]);
    dini_IntSet(Player,"Verheiratet",PlayerInfo[playerid][pMarried]);
    dini_IntSet(Player,"VeheiratetMit",PlayerInfo[playerid][pMarriedTo]);
    dini_IntSet(Player,"SpielMinuten",PlayerInfo[playerid][pPlayMinutes]);
    dini_IntSet(Player,"SpielMinutenGesamt",PlayerInfo[playerid][pGesamtMinutes]);
    dini_IntSet(Player,"SFPass",PlayerInfo[playerid][pSFPASS]);
    dini_IntSet(Player,"DrogenSkill",PlayerInfo[playerid][pDrugsSkill]);
    dini_IntSet(Player,"HandyGuthaben",PlayerInfo[playerid][pHandyGeld]);
    dini_IntSet(Player,"HandyVersion",PlayerInfo[playerid][pHandyVer]);
    dini_IntSet(Player,"UhrID",PlayerInfo[playerid][pUhrID]);
    dini_IntSet(Player,"HandyID",PlayerInfo[playerid][pHandyID]);
    dini_IntSet(Player,"Personalausweis",PlayerInfo[playerid][pOwnPerso]);
    dini_IntSet(Player,"Antrag",PlayerInfo[playerid][pOwnAntrag]);
    dini_IntSet(Player,"PersoStop",PlayerInfo[playerid][pPersoStop]);
    dini_IntSet(Player,"Gehalt",PlayerInfo[playerid][pGehalt]);
    dini_IntSet(Player,"Fraktionssperre",PlayerInfo[playerid][pFrakSperre]);
    dini_IntSet(Player,"SafeMats",PlayerInfo[playerid][pBoxMats]);
    dini_IntSet(Player,"SafeDrugs",PlayerInfo[playerid][pBoxDrugs]);
    dini_IntSet(Player,"Banned",PlayerInfo[playerid][pban]);
    dini_IntSet(Player,"pTot",PlayerInfo[playerid][pTot]);
    dini_IntSet(Player,"FarmZeit",PlayerInfo[playerid][pFarmTime]);
    dini_IntSet(Player,"GDeaths",PlayerInfo[playerid][pGDeaths]);
    dini_IntSet(Player,"GKills",PlayerInfo[playerid][pGKills]);
    dini_IntSet(Player,"Meldungen",PlayerInfo[playerid][pMeldung]);
    dini_IntSet(Player,"HouseKey",PlayerInfo[playerid][pHouseKey]);
    dini_IntSet(Player,"RentHouseKey",PlayerInfo[playerid][pRentHouseKey]);
    }
    }