Hey,
ich habe ein Problem..
Wenn ich meinen Player Speichere nach dem Logout, zB Serverrestart, dann läd alles wieder.
Doch wenn ich Server per Console schließe, und dann Server wieder starte, ist alles wieder weg.
Geld = 0
Level = 0
Adminlevel = 0
...
...
...
Woran könnte das liegen?
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,"Wantedlevel",PlayerInfo[playerid][pWanteds]);
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,"Geld",GetPlayerMoney(playerid));
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]);
}
}
stock LoadPlayer(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))
{
PlayerInfo[playerid][pWanteds] = dini_Int(Player,"Wantedlevel");
PlayerInfo[playerid][pLevel] = dini_Int(Player,"Level");
PlayerInfo[playerid][pAdmin] = dini_Int(Player,"Adminlevel");
PlayerInfo[playerid][pSupporter] = dini_Int(Player,"Supporter");
PlayerInfo[playerid][pDonateRank] = dini_Int(Player,"DonateRang");
PlayerInfo[playerid][gPupgrade] = dini_Int(Player,"UpgradePunkte");
GivePlayerMoney(playerid,dini_Int(Player,"Geld"));
PlayerInfo[playerid][pConnectTime] = dini_Int(Player,"ConnectTime");
PlayerInfo[playerid][pNeuling] = dini_Int(Player,"Neuling");
PlayerInfo[playerid][pReg] = dini_Int(Player,"pReg");
PlayerInfo[playerid][pSex] = dini_Int(Player,"Geschlecht");
PlayerInfo[playerid][pAge] = dini_Int(Player,"Alter");
PlayerInfo[playerid][pOrigin] = dini_Int(Player,"Herkunft");
PlayerInfo[playerid][pCK] = dini_Int(Player,"pCK");
PlayerInfo[playerid][pAccount] = dini_Int(Player,"Account");
PlayerInfo[playerid][pPlayerKreditDauer] = dini_Int(Player,"KreditkartenDauer");
PlayerInfo[playerid][pPlayerKredit] = dini_Int(Player,"Kredit");
PlayerInfo[playerid][pKills] = dini_Int(Player,"Kills");
PlayerInfo[playerid][pJailed] = dini_Int(Player,"Jailed");
PlayerInfo[playerid][pJailTime] = dini_Int(Player,"Jailtime");
PlayerInfo[playerid][pDeaths] = dini_Int(Player,"Tode");
PlayerInfo[playerid][pArrested] = dini_Int(Player,"Arrest");
PlayerInfo[playerid][pWantedDeaths] = dini_Int(Player,"Wantedtode");
PlayerInfo[playerid][pPhoneBook] = dini_Int(Player,"Telefonbuch");
PlayerInfo[playerid][pLottoNr] = dini_Int(Player,"Lottonummer");
PlayerInfo[playerid][pFishes] = dini_Int(Player,"Fische");
PlayerInfo[playerid][pBiggestFish] = dini_Int(Player,"GrosterFang");
PlayerInfo[playerid][pJob] = dini_Int(Player,"Job");
PlayerInfo[playerid][pPayCheck] = dini_Int(Player,"PayCheck");
PlayerInfo[playerid][pRest] = dini_Int(Player,"Rest");
PlayerInfo[playerid][pHeadValue] = dini_Int(Player,"Kopfgeld");
PlayerInfo[playerid][pGangJailed] = dini_Int(Player,"Gangjail");
PlayerInfo[playerid][pMauled] = dini_Int(Player,"Mundtape");
PlayerInfo[playerid][pMats] = dini_Int(Player,"Materialien");
PlayerInfo[playerid][pDrugs] = dini_Int(Player,"Drogen");
PlayerInfo[playerid][pLeader] = dini_Int(Player,"FraktionsLeader");
PlayerInfo[playerid][pMember] = dini_Int(Player,"FraktionsMember");
PlayerInfo[playerid][pRank] = dini_Int(Player,"FraktionsRang");
PlayerInfo[playerid][pChar] = dini_Int(Player,"Charakter");
PlayerInfo[playerid][pContractTime] = dini_Int(Player,"Contracts");
PlayerInfo[playerid][pDetSkill] = dini_Int(Player,"DetektivSkill");
PlayerInfo[playerid][pSexSkill] = dini_Int(Player,"SexSkill");
PlayerInfo[playerid][pBoxSkill] = dini_Int(Player,"BoxSkill");
PlayerInfo[playerid][pLawSkill] = dini_Int(Player,"AnwaltsSkill");
PlayerInfo[playerid][pMechSkill] = dini_Int(Player,"MechanikerSkill");
PlayerInfo[playerid][pJackSkill] = dini_Int(Player,"AutodiebSkill");
PlayerInfo[playerid][pCarSkill] = dini_Int(Player,"CarSkill");
PlayerInfo[playerid][pNewsSkill] = dini_Int(Player,"NewsSkill");
PlayerInfo[playerid][pDrugsSkill] = dini_Int(Player,"DrogenSkill");
PlayerInfo[playerid][pCookSkill] = dini_Int(Player,"KochSkill");
PlayerInfo[playerid][pFishSkill] = dini_Int(Player,"FischSkill");
PlayerInfo[playerid][pInt] = dini_Int(Player,"Interior");
PlayerInfo[playerid][pLocal] = dini_Int(Player,"Local");
PlayerInfo[playerid][pTeam] = dini_Int(Player,"Team");
PlayerInfo[playerid][pModel] = dini_Int(Player,"Model");
PlayerInfo[playerid][pPnumber] = dini_Int(Player,"Telefonnummer");
PlayerInfo[playerid][pPhousekey] = dini_Int(Player,"Hausschlüssel");
PlayerInfo[playerid][pPbiskey] = dini_Int(Player,"BizSchlüssel");
PlayerInfo[playerid][pCarLic] = dini_Int(Player,"Fahrschein");
PlayerInfo[playerid][pNewLic] = dini_Int(Player,"NewLic");
PlayerInfo[playerid][pFlyLic] = dini_Int(Player,"Flugschein");
PlayerInfo[playerid][pBoatLic] = dini_Int(Player,"Bootschein");
PlayerInfo[playerid][pFishLic] = dini_Int(Player,"Fischerschein");
PlayerInfo[playerid][pGunLic] = dini_Int(Player,"Waffenschein");
PlayerInfo[playerid][pLKWLic] = dini_Int(Player,"LKWSchein");
PlayerInfo[playerid][pRollerLic] = dini_Int(Player,"Rollerschein");
PlayerInfo[playerid][pMotoLic] = dini_Int(Player,"MotorradSchein");
PlayerInfo[playerid][pZig] = dini_Int(Player,"Zigaretten");
PlayerInfo[playerid][pKekse] = dini_Int(Player,"Kekse");
PlayerInfo[playerid][pZigSucht] = dini_Int(Player,"ZigarettenSucht");
PlayerInfo[playerid][pGun1] = dini_Int(Player,"Waffe1");
PlayerInfo[playerid][pGun2] = dini_Int(Player,"Waffe2");
PlayerInfo[playerid][pGun3] = dini_Int(Player,"Waffe3");
PlayerInfo[playerid][pGun4] = dini_Int(Player,"Waffe4");
PlayerInfo[playerid][pAmmo1] = dini_Int(Player,"Mun1");
PlayerInfo[playerid][pAmmo2] = dini_Int(Player,"Mun2");
PlayerInfo[playerid][pAmmo3] = dini_Int(Player,"Mun3");
PlayerInfo[playerid][pAmmo4] = dini_Int(Player,"Mun4");
PlayerInfo[playerid][pCarTime] = dini_Int(Player,"Fahrzeit");
PlayerInfo[playerid][pMulltime] = dini_Int(Player,"Mulltime");
PlayerInfo[playerid][pPayDay] = dini_Int(Player,"PayDay");
PlayerInfo[playerid][pPayDayHad] = dini_Int(Player,"GehabtePayDay");
PlayerInfo[playerid][pCDPlayer] = dini_Int(Player,"CDSpieler");
PlayerInfo[playerid][pWins] = dini_Int(Player,"Siege");
PlayerInfo[playerid][pLoses] = dini_Int(Player,"Niederlagen");
PlayerInfo[playerid][pAlcoholPerk] = dini_Int(Player,"PromilleAlk");
PlayerInfo[playerid][pDrugPerk] = dini_Int(Player,"PromilleDrug");
PlayerInfo[playerid][pMiserPerk] = dini_Int(Player,"MiserPerk");
PlayerInfo[playerid][pPainPerk] = dini_Int(Player,"PainPerk");
PlayerInfo[playerid][pTraderPerk] = dini_Int(Player,"TraderPerk");
PlayerInfo[playerid][pTut] = dini_Int(Player,"Tutorial");
PlayerInfo[playerid][pRadio] = dini_Int(Player,"Radio");
PlayerInfo[playerid][pWarns] = dini_Int(Player,"Warns");
PlayerInfo[playerid][pMarried] = dini_Int(Player,"Verheiratet");
PlayerInfo[playerid][pMarriedTo] = dini_Int(Player,"VeheiratetMit");
PlayerInfo[playerid][pPlayMinutes] = dini_Int(Player,"SpielMinuten");
PlayerInfo[playerid][pGesamtMinutes] = dini_Int(Player,"SpielMinutenGesamt");
PlayerInfo[playerid][pSFPASS] = dini_Int(Player,"SFPass");
PlayerInfo[playerid][pDrugsSkill] = dini_Int(Player,"DrogenSkill");
PlayerInfo[playerid][pHandyGeld] = dini_Int(Player,"HandyGuthaben");
PlayerInfo[playerid][pHandyVer] = dini_Int(Player,"HandyVersion");
PlayerInfo[playerid][pUhrID] = dini_Int(Player,"UhrID");
PlayerInfo[playerid][pHandyID] = dini_Int(Player,"HandyID");
PlayerInfo[playerid][pOwnPerso] = dini_Int(Player,"Personalausweis");
PlayerInfo[playerid][pOwnAntrag] = dini_Int(Player,"Antrag");
PlayerInfo[playerid][pPersoStop] = dini_Int(Player,"PersoStop");
PlayerInfo[playerid][pGehalt] = dini_Int(Player,"Gehalt");
PlayerInfo[playerid][pFrakSperre] = dini_Int(Player,"Fraktionssperre");
PlayerInfo[playerid][pBoxMats] = dini_Int(Player,"SafeMats");
PlayerInfo[playerid][pBoxDrugs] = dini_Int(Player,"SafeDrugs");
PlayerInfo[playerid][pban] = dini_Int(Player,"Banned");
PlayerInfo[playerid][pTot] = dini_Int(Player,"pTot");
PlayerInfo[playerid][pFarmTime] = dini_Int(Player,"FarmZeit");
PlayerInfo[playerid][pGDeaths] = dini_Int(Player,"GDeaths");
PlayerInfo[playerid][pGKills] = dini_Int(Player,"GKills");
PlayerInfo[playerid][pMeldung] = dini_Int(Player,"Meldungen");
PlayerInfo[playerid][pHouseKey] = dini_Int(Player,"HouseKey");
PlayerInfo[playerid][pRentHouseKey] = dini_Int(Player,"RentHouseKey");
}
return 1;
}