hey liebe Community...
ich verzweifleeee !! xD Auf meinem Server hat sich irgendwie ein Account Bug eingeschlichen. Dieser tritt nur ab und zu auf. bei diesem Bug werden die User resettet alles wird auf 0 gesetzt und haben dann manchmal das Passwort von einem anderen Spieler... Ich hoffe ihr könnt mir da helfen..
Onplayerregister:
public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new string3[64];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "/Accounts/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if (hFile)
{
strmid(Spieler[playerid][pKey], password, 0, strlen(password), 255);
new var[32];
format(var, 32, "Key=%s\n", Spieler[playerid][pKey]);fwrite(hFile, var);
Spieler[playerid][pCash] = GetPlayerMoney(playerid);
format(var, 32, "Level=%d\n",Spieler[playerid][pLevel]);fwrite(hFile, var);
format(var, 32, "AdminLevel=%d\n",Spieler[playerid][pAdmin]);fwrite(hFile, var);
format(var, 32, "Supporter=%d\n",Spieler[playerid][pSupporter]);fwrite(hFile, var);
format(var, 32, "DonateRank=%d\n",Spieler[playerid][pDonateRank]);fwrite(hFile, var);
format(var, 32, "UpgradePoints=%d\n",Spieler[playerid][gPupgrade]);fwrite(hFile, var);
format(var, 32, "ConnectedTime=%d\n",Spieler[playerid][pConnectTime]);fwrite(hFile, var);
format(var, 32, "Registered=%d\n",Spieler[playerid][pReg]);fwrite(hFile, var);
format(var, 32, "Sex=%d\n",Spieler[playerid][pSex]);fwrite(hFile, var);
format(var, 32, "Age=%d\n",Spieler[playerid][pAge]);fwrite(hFile, var);
format(var, 32, "Origin=%d\n",Spieler[playerid][pOrigin]);fwrite(hFile, var);
format(var, 32, "CK=%d\n",Spieler[playerid][pCK]);fwrite(hFile, var);
format(var, 32, "Muted=%d\n",Spieler[playerid][pMuted]);fwrite(hFile, var);
format(var, 32, "Respect=%d\n",Spieler[playerid][pExp]);fwrite(hFile, var);
format(var, 32, "Money=%d\n",Spieler[playerid][pCash]);fwrite(hFile, var);
format(var, 32, "Bank=%d\n",Spieler[playerid][pAccount]);fwrite(hFile, var);
format(var, 32, "Crimes=%d\n",Spieler[playerid][pCrimes]);fwrite(hFile, var);
format(var, 32, "Kills=%d\n",Spieler[playerid][pKills]);fwrite(hFile, var);
format(var, 32, "Deaths=%d\n",Spieler[playerid][pDeaths]);fwrite(hFile, var);
format(var, 32, "Arrested=%d\n",Spieler[playerid][pArrested]);fwrite(hFile, var);
format(var, 32, "WantedDeaths=%d\n",Spieler[playerid][pWantedDeaths]);fwrite(hFile, var);
format(var, 32, "Phonebook=%d\n",Spieler[playerid][pPhoneBook]);fwrite(hFile, var);
format(var, 32, "LottoNr=%d\n",Spieler[playerid][pLottoNr]);fwrite(hFile, var);
format(var, 32, "Fishes=%d\n",Spieler[playerid][pFishes]);fwrite(hFile, var);
format(var, 32, "BiggestFish=%d\n",Spieler[playerid][pBiggestFish]);fwrite(hFile, var);
format(var, 32, "Job=%d\n",Spieler[playerid][pJob]);fwrite(hFile, var);
format(var, 32, "HeadValue=%d\n",Spieler[playerid][pHeadValue]);fwrite(hFile, var);
format(var, 32, "Jailed=%d\n",Spieler[playerid][pJailed]);fwrite(hFile, var);
format(var, 32, "JailTime=%d\n",Spieler[playerid][pJailTime]);fwrite(hFile, var);
format(var, 32, "Materials=%d\n",Spieler[playerid][pMats]);fwrite(hFile, var);
format(var, 32, "Drugs=%d\n",Spieler[playerid][pDrugs]);fwrite(hFile, var);
format(var, 32, "Leader=%d\n",Spieler[playerid][pLeader]);fwrite(hFile, var);
format(var, 32, "Member=%d\n",Spieler[playerid][pMember]);fwrite(hFile, var);
format(var, 32, "FMember=%d\n",Spieler[playerid][pFMember]);fwrite(hFile, var);
format(var, 32, "Rank=%d\n",Spieler[playerid][pRank]);fwrite(hFile, var);
format(var, 32, "Char=%d\n",Spieler[playerid][pChar]);fwrite(hFile, var);
format(var, 32, "DetSkill=%d\n",Spieler[playerid][pDetSkill]);fwrite(hFile, var);
format(var, 32, "SexSkill=%d\n",Spieler[playerid][pSexSkill]);fwrite(hFile, var);
format(var, 32, "BoxSkill=%d\n",Spieler[playerid][pBoxSkill]);fwrite(hFile, var);
format(var, 32, "LawSkill=%d\n",Spieler[playerid][pLawSkill]);fwrite(hFile, var);
format(var, 32, "MechSkill=%d\n",Spieler[playerid][pMechSkill]);fwrite(hFile, var);
format(var, 32, "JackSkill=%d\n",Spieler[playerid][pJackSkill]);fwrite(hFile, var);
format(var, 32, "CarSkill=%d\n",Spieler[playerid][pCarSkill]);fwrite(hFile, var);
format(var, 32, "NewsSkill=%d\n",Spieler[playerid][pNewsSkill]);fwrite(hFile, var);
format(var, 32, "DrugsSkill=%d\n",Spieler[playerid][pDrugsSkill]);fwrite(hFile, var);
format(var, 32, "CookSkill=%d\n",Spieler[playerid][pCookSkill]);fwrite(hFile, var);
format(var, 32, "FishSkill=%d\n",Spieler[playerid][pFishSkill]);fwrite(hFile, var);
format(var, 32, "pSHealth=%.1f\n",Spieler[playerid][pSHealth]);fwrite(hFile, var);
GetPlayerHealth(playerid,Spieler[playerid][pHealth]);
format(var, 32, "pHealth=%.1f\n",Spieler[playerid][pHealth]);fwrite(hFile, var);
format(var, 32, "Int=%d\n",Spieler[playerid][pInt]);fwrite(hFile, var);
format(var, 32, "Local=%d\n",Spieler[playerid][pLocal]);fwrite(hFile, var);
format(var, 32, "Team=%d\n",Spieler[playerid][pTeam]);fwrite(hFile, var);
format(var, 32, "Model=%d\n",Spieler[playerid][pModel]);fwrite(hFile, var);
format(var, 32, "PhoneNr=%d\n",Spieler[playerid][pPnumber]);fwrite(hFile, var);
format(var, 32, "House=%d\n",Spieler[playerid][pPhousekey]);fwrite(hFile, var);
format(var, 32, "Bizz=%d\n",Spieler[playerid][pPbiskey]);fwrite(hFile, var);
format(var, 32, "HandyGeld=%d\n",Spieler[playerid][pHandyGeld]);fwrite(hFile, var);
format(var, 32, "HandyVer=%d\n",Spieler[playerid][pHandyVer]);fwrite(hFile, var);
format(var, 32, "Arbeitgeld=%d\n",Spieler[playerid][pHartzIV]);fwrite(hFile, var);
format(var, 32, "Hotel=%d\n",Spieler[playerid][pHotel]);fwrite(hFile, var);
if ((Spieler[playerid][pPos_x]==0.0 && Spieler[playerid][pPos_y]==0.0 && Spieler[playerid][pPos_z]==0.0))
{
Spieler[playerid][pPos_x] = 1684.9;
Spieler[playerid][pPos_y] = -2244.5;
Spieler[playerid][pPos_z] = 13.5;
}
if(Spectate[playerid] != 255)
{
Spieler[playerid][pPos_x] = Unspec[playerid][sPx];
Spieler[playerid][pPos_y] = Unspec[playerid][sPy];
Spieler[playerid][pPos_z] = Unspec[playerid][sPz];
Spieler[playerid][pInt] = Unspec[playerid][sPint];
Spieler[playerid][pLocal] = Unspec[playerid][sLocal];
}
format(var, 32, "Pos_x=%.1f\n",Spieler[playerid][pPos_x]);fwrite(hFile, var);
format(var, 32, "Pos_y=%.1f\n",Spieler[playerid][pPos_y]);fwrite(hFile, var);
format(var, 32, "Pos_z=%.1f\n",Spieler[playerid][pPos_z]);fwrite(hFile, var);
format(var, 32, "CarLic=%d\n",Spieler[playerid][pCarLic]);fwrite(hFile, var);
format(var, 32, "NewLic=%d\n",Spieler[playerid][pNewLic]);fwrite(hFile, var);
format(var, 32, "FlyLic=%d\n",Spieler[playerid][pFlyLic]);fwrite(hFile, var);
format(var, 32, "BoatLic=%d\n",Spieler[playerid][pBoatLic]);fwrite(hFile, var);
format(var, 32, "FishLic=%d\n",Spieler[playerid][pFishLic]);fwrite(hFile, var);
format(var, 32, "GunLic=%d\n",Spieler[playerid][pGunLic]);fwrite(hFile, var);// hier wird der schein in der Spieler .ini gespeichert
format(var, 32, "LKWLic=%d\n",Spieler[playerid][pLKWLic]);fwrite(hFile, var);
format(var, 32, "MotoLic=%d\n",Spieler[playerid][pMotoLic]);fwrite(hFile, var);
format(var, 32, "Zig=%d\n",Spieler[playerid][pZig]);fwrite(hFile, var);
format(var, 32, "ZigSucht=%d\n",Spieler[playerid][pZigSucht]);fwrite(hFile, var);
format(var, 32, "Gun1=%d\n",Spieler[playerid][pGun1]);fwrite(hFile, var);
format(var, 32, "Gun2=%d\n",Spieler[playerid][pGun2]);fwrite(hFile, var);
format(var, 32, "Gun3=%d\n",Spieler[playerid][pGun3]);fwrite(hFile, var);
format(var, 32, "Gun4=%d\n",Spieler[playerid][pGun4]);fwrite(hFile, var);
format(var, 32, "Ammo1=%d\n",Spieler[playerid][pAmmo1]);fwrite(hFile, var);
format(var, 32, "Ammo2=%d\n",Spieler[playerid][pAmmo2]);fwrite(hFile, var);
format(var, 32, "Ammo3=%d\n",Spieler[playerid][pAmmo3]);fwrite(hFile, var);
format(var, 32, "Ammo4=%d\n",Spieler[playerid][pAmmo4]);fwrite(hFile, var);
format(var, 32, "CarTime=%d\n",Spieler[playerid][pCarTime]);fwrite(hFile, var);
format(var, 32, "CDPlayer=%d\n",Spieler[playerid][pCDPlayer]);fwrite(hFile, var);
format(var, 32, "Wins=%d\n",Spieler[playerid][pWins]);fwrite(hFile, var);
format(var, 32, "Loses=%d\n",Spieler[playerid][pLoses]);fwrite(hFile, var);
format(var, 32, "AlcoholPerk=%d\n",Spieler[playerid][pAlcoholPerk]);fwrite(hFile, var);
format(var, 32, "DrugPerk=%d\n",Spieler[playerid][pDrugPerk]);fwrite(hFile, var);
format(var, 32, "MiserPerk=%d\n",Spieler[playerid][pMiserPerk]);fwrite(hFile, var);
format(var, 32, "PainPerk=%d\n",Spieler[playerid][pPainPerk]);fwrite(hFile, var);
format(var, 32, "TraderPerk=%d\n",Spieler[playerid][pTraderPerk]);fwrite(hFile, var);
format(var, 32, "Tutorial=%d\n",Spieler[playerid][pTut]);fwrite(hFile, var);
format(var, 32, "Warnings=%d\n",Spieler[playerid][pWarns]);fwrite(hFile, var);
format(var, 32, "Adjustable=%d\n",Spieler[playerid][pAdjustable]);fwrite(hFile, var);
format(var, 32, "Fuel=%d\n",Spieler[playerid][pFuel]);fwrite(hFile, var);
format(var, 32, "Married=%d\n",Spieler[playerid][pMarried]);fwrite(hFile, var);
format(var, 32, "MarriedTo=%s\n",Spieler[playerid][pMarriedTo]);fwrite(hFile, var);
format(var, 32, "SpawnChange=%d\n",SpawnChange[playerid]);fwrite(hFile, var);
format(var, 32, "WantedLevel=%d\n",WantedLevel[playerid]);fwrite(hFile, var);
format(var, 32, "WantedPoints=%d\n",WantedPoints[playerid]);fwrite(hFile, var);
format(var, 32, "PlayMinutes=%d\n",Spieler[playerid][pPlayMinutes]);fwrite(hFile, var);
format(var, 32, "GesamtMinutes=%d\n",Spieler[playerid][pGesamtMinutes]);fwrite(hFile, var);
format(var, 32, "MinutesSinceAn=%d\n",Spieler[playerid][pMinutesSinceAn]);fwrite(hFile, var);
format(var, 32, "SFPASS=%d\n",Spieler[playerid][pSFPASS]);fwrite(hFile, var);
format(var, 32, "LVPASS=%d\n",Spieler[playerid][pLVPASS]);fwrite(hFile, var);
format(var, 32, "Offflucht=%d\n",OfflineFlucht[playerid]);fwrite(hFile, var);
format(var, 32, "Knast=%d\n",Knast[playerid]);fwrite(hFile, var);
format(var, 32, "Uhr=%d\n",Spieler[playerid][pUhrID]);fwrite(hFile, var);
format(var, 32, "Handy=%d\n",Spieler[playerid][pHandyID]);fwrite(hFile, var);
format(var, 32, "GWD=%d\n",Spieler[playerid][pGWD]);fwrite(hFile, var);
format(var, 32, "KnastTime=%d\n",KnastTime[playerid]);fwrite(hFile, var);
format(var, 32, "Perso=%d\n",Spieler[playerid][pOwnPerso]);fwrite(hFile, var);
format(var, 32, "FrakSperre=%d\n",Spieler[playerid][pFrakSperre]);fwrite(hFile, var);
format(var, 32, "Paycheck=%d\n",Spieler[playerid][pPayCheck]);fwrite(hFile, var);
format(var, 32, "PayDay=%d\n",Spieler[playerid][pPayDay]);fwrite(hFile, var);
format(var, 32, "PayDayHad=%d\n",Spieler[playerid][pPayDayHad]);fwrite(hFile, var);
// format(var, 32, "bankgeld=%d\n",Spieler[playerid][bankgeld]);fwrite(hFile, var);
//format(var, 32, "Wanteds=%d\n",WantedLevel[playerid]);fwrite(hFile, var);
fclose(hFile);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"German Force Roleplay","Willkommen zurück!\n Bitte gebe dein Passwort ein um dich einzuloggen!","Login","Abbrechen");
}
}
return 1;
}
Hoffentlich weiss jmd wieso
PS: 20k Zeilen pberschritten