Stats won's save on disconnect
#3

Okay, I tried debugging it and this is what I got:

Код:
[22:43:19] [part] Marcus_Keaton has left the server (0:1)
[22:43:19] Passed
[22:43:19] Resetting stats
[22:43:19] KILLED
[22:43:19] Destroying weed, DMV car and killing timers...
[22:43:19] Passed the save...
[22:43:19] pre-return part
[22:43:19] PASSED
[22:43:19] Resetting weapons...
[22:43:19] Starting to write in the file... checking if file exists.
[22:43:19] Saved the weapons
[22:43:19] Checking if on duty...
[22:43:19] Set the money
[22:43:19] CHECK PASSED
[22:43:19] Checking for money hacks...
[22:43:19] CHECK PASSED
[22:43:19] Checking of player is logged in...
[22:43:19] Starting to save...
[22:43:19] Checking if on duty
[22:43:19] Vehicle check passed
[22:43:19] Checking for spawned personal vehicles...
[22:43:19] reason 1 passed
[22:43:19] Check passed, player is leaving...
[22:43:19] Checking disconnection reason...
[22:43:19] Checking if player is logged in...
It seems like it skipped the whole file saving part:

pawn Код:
print("Saved the weapons");
            new string3[128];
            format(string3, sizeof(string3), "Accounts/%s.ini", PlayerName(playerid));
            new File: hFile = fopen(string3, io_write);
            print("Starting to write in the file... checking if file exists.");
            if (hFile)
            {
                print("File exists...");
                new var[32];
                PlayerInfo[playerid][pCash] = GetPlayerCash(playerid);
                format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
                format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
                format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
                format(var, 32, "GMLevel=%d\n",PlayerInfo[playerid][pGM]);fwrite(hFile, var);
                format(var, 32, "DonateRank=%d\n",PlayerInfo[playerid][pDonateRank]);fwrite(hFile, var);
                format(var, 32, "Registered=%d\n",PlayerInfo[playerid][pRegistered]);fwrite(hFile, var);
                format(var, 32, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
                format(var, 32, "Race=%d\n",PlayerInfo[playerid][pRace]);fwrite(hFile, var);
                format(var, 32, "Experience=%d\n",PlayerInfo[playerid][pExp]);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, "Skin=%i\n",PlayerInfo[playerid][pSkin]);fwrite(hFile, var);
                format(var, 32, "PlayingHours=%d\n",PlayerInfo[playerid][pPlayingHours]);fwrite(hFile, var);
                format(var, 32, "AllowedPayday=%d\n",PlayerInfo[playerid][pAllowedPayday]);fwrite(hFile, var);
                format(var, 32, "Insurance=%d\n",PlayerInfo[playerid][pInsurance]);fwrite(hFile, var);
                format(var, 32, "Faction=%d\n",PlayerInfo[playerid][pFaction]);fwrite(hFile, var);
                format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
                format(var, 32, "HouseKey=%d\n",PlayerInfo[playerid][pHouseKey]);fwrite(hFile, var);
                format(var, 32, "BizKey=%d\n",PlayerInfo[playerid][pBizKey]);fwrite(hFile, var);
                format(var, 32, "SpawnPoint=%d\n",PlayerInfo[playerid][pSpawnPoint]);fwrite(hFile, var);
                format(var, 32, "PhoneNumber=%d\n",PlayerInfo[playerid][pPhoneNumber]);fwrite(hFile, var);
                format(var, 32, "PhoneC=%d\n",PlayerInfo[playerid][pPhoneC]);fwrite(hFile, var);
                format(var, 32, "PhoneBook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
                format(var, 32, "ListNumber=%d\n",PlayerInfo[playerid][pListNumber]);fwrite(hFile, var);
                format(var, 32, "Donator=%d\n",PlayerInfo[playerid][pDonator]);fwrite(hFile, var);
                format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
                format(var, 32, "Ajailed=%d\n",PlayerInfo[playerid][pAjailed]);fwrite(hFile, var);
                format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
                format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
                format(var, 32, "Wanted=%d\n",PlayerInfo[playerid][pWanted]);fwrite(hFile, var);
                format(var, 32, "WantedFor=%s\n",PlayerInfo[playerid][pWantedFor]);fwrite(hFile, var);
                format(var, 32, "DriverLicense=%d\n",PlayerInfo[playerid][pDriverLicense]);fwrite(hFile, var);
                format(var, 32, "WeaponLicense=%d\n",PlayerInfo[playerid][pWeaponLicense]);fwrite(hFile, var);
                format(var, 32, "CrashX=%.1f\n",PlayerInfo[playerid][pCrashX]);fwrite(hFile, var);
                format(var, 32, "CrashY=%.1f\n",PlayerInfo[playerid][pCrashY]);fwrite(hFile, var);
                format(var, 32, "CrashZ=%.1f\n",PlayerInfo[playerid][pCrashZ]);fwrite(hFile, var);
                GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
                if(PlayerInfo[playerid][pHealth] > 100) PlayerInfo[playerid][pHealth] = oldhp[playerid];
                format(var, 32, "Health=%f\n", PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
                GetPlayerArmour(playerid, PlayerInfo[playerid][pArmour]);
                if(CopOnDuty[playerid] != 0) PlayerInfo[playerid][pArmour] = 0;
                format(var, 32, "Armour=%f\n", PlayerInfo[playerid][pArmour]);fwrite(hFile, var);
                format(var, 32, "Paycheck=%d\n",PlayerInfo[playerid][pPaycheck]);fwrite(hFile, var);
                format(var, 32, "CrashInt=%d\n",PlayerInfo[playerid][pCrashInt]);fwrite(hFile, var);
                format(var, 32, "CrashW=%d\n",PlayerInfo[playerid][pCrashW]);fwrite(hFile, var);
                format(var, 32, "Crashed=%d\n",PlayerInfo[playerid][pCrashed]);fwrite(hFile, var);
                format(var, 64, "Gun1=%d\n",PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
                format(var, 64, "Gun2=%d\n",PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
                format(var, 64, "Gun3=%d\n",PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
                format(var, 64, "Gun4=%d\n",PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
                format(var, 64, "Ammo1=%d\n",PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
                format(var, 64, "Ammo2=%d\n",PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
                format(var, 64, "Ammo3=%d\n",PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
                format(var, 64, "Ammo4=%d\n",PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
                format(var, 32, "LearningPoints=%d\n",PlayerInfo[playerid][pLearn]);fwrite(hFile, var);
                format(var, 32, "UniqueID=%d\n",PlayerInfo[playerid][pUniqueID]);fwrite(hFile, var);
                format(var, 64, "Seeds=%d\n",PlayerInfo[playerid][pSeeds]);fwrite(hFile, var);
                format(var, 64, "Weed=%d\n",PlayerInfo[playerid][pWeed]);fwrite(hFile, var);
                format(var, 32, "WeedX=%f\n",PlayerInfo[playerid][pWeedX]);fwrite(hFile, var);
                format(var, 32, "WeedY=%f\n",PlayerInfo[playerid][pWeedY]);fwrite(hFile, var);
                format(var, 32, "WeedZ=%f\n",PlayerInfo[playerid][pWeedZ]);fwrite(hFile, var);
                format(var, 32, "WeedR=%f\n",PlayerInfo[playerid][pWeedR]);fwrite(hFile, var);
                format(var, 64, "WeedTimeLeft=%d\n",PlayerInfo[playerid][pWeedTimeLeft]);fwrite(hFile, var);
                format(var, 32, "MaskID=%s\n",PlayerInfo[playerid][pMaskID]);fwrite(hFile, var);
                format(var, 32, "Veh1_Model=%d\n", PlayerInfo[playerid][pVeh1Model]); fwrite(hFile, var);
                format(var, 32, "Veh1_X=%f\n", PlayerInfo[playerid][pVeh1X]); fwrite(hFile, var);
                format(var, 32, "Veh1_Y=%f\n", PlayerInfo[playerid][pVeh1Y]); fwrite(hFile, var);
                format(var, 32, "Veh1_Z=%f\n", PlayerInfo[playerid][pVeh1Z]); fwrite(hFile, var);
                format(var, 32, "Veh1_Rot=%f\n", PlayerInfo[playerid][pVeh1Rotation]); fwrite(hFile, var);
                format(var, 32, "Veh1_Paintjob=%d\n", PlayerInfo[playerid][pVeh1PaintJob]); fwrite(hFile, var);
                format(var, 32, "Veh1_Color1=%d\n", PlayerInfo[playerid][pVeh1Color1]); fwrite(hFile, var);
                format(var, 32, "Veh1_Color2=%d\n", PlayerInfo[playerid][pVeh1Color2]); fwrite(hFile, var);
                format(var, 32, "Veh1_Fuel=%d\n", PlayerInfo[playerid][pVeh1Fuel]); fwrite(hFile, var);
                format(var, 32, "Veh1_Destroyed=%d\n", PlayerInfo[playerid][pVeh1Destroyed]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod1=%d\n", PlayerInfo[playerid][pVeh1Mod1]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod2=%d\n", PlayerInfo[playerid][pVeh1Mod2]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod3=%d\n", PlayerInfo[playerid][pVeh1Mod3]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod4=%d\n", PlayerInfo[playerid][pVeh1Mod4]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod5=%d\n", PlayerInfo[playerid][pVeh1Mod5]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod6=%d\n", PlayerInfo[playerid][pVeh1Mod6]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod7=%d\n", PlayerInfo[playerid][pVeh1Mod7]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod8=%d\n", PlayerInfo[playerid][pVeh1Mod8]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod9=%d\n", PlayerInfo[playerid][pVeh1Mod9]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod10=%d\n", PlayerInfo[playerid][pVeh1Mod10]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod11=%d\n", PlayerInfo[playerid][pVeh1Mod11]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod12=%d\n", PlayerInfo[playerid][pVeh1Mod12]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod13=%d\n", PlayerInfo[playerid][pVeh1Mod13]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod14=%d\n", PlayerInfo[playerid][pVeh1Mod14]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod15=%d\n", PlayerInfo[playerid][pVeh1Mod15]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod16=%d\n", PlayerInfo[playerid][pVeh1Mod16]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod17=%d\n", PlayerInfo[playerid][pVeh1Mod17]); fwrite(hFile, var);
                format(var, 32, "Veh1_Mod18=%d\n", PlayerInfo[playerid][pVeh1Mod18]); fwrite(hFile, var);
                format(var, 32, "Veh2_Model=%d\n", PlayerInfo[playerid][pVeh2Model]); fwrite(hFile, var);
                format(var, 32, "Veh2_X=%f\n", PlayerInfo[playerid][pVeh2X]); fwrite(hFile, var);
                format(var, 32, "Veh2_Y=%f\n", PlayerInfo[playerid][pVeh2Y]); fwrite(hFile, var);
                format(var, 32, "Veh2_Z=%f\n", PlayerInfo[playerid][pVeh2Z]); fwrite(hFile, var);
                format(var, 32, "Veh2_Rot=%d\n", PlayerInfo[playerid][pVeh2Rotation]); fwrite(hFile, var);
                format(var, 32, "Veh2_Paintjob=%d\n", PlayerInfo[playerid][pVeh2PaintJob]); fwrite(hFile, var);
                format(var, 32, "Veh2_Color1=%d\n", PlayerInfo[playerid][pVeh2Color1]); fwrite(hFile, var);
                format(var, 32, "Veh2_Color2=%d\n", PlayerInfo[playerid][pVeh2Color2]); fwrite(hFile, var);
                format(var, 32, "Veh2_Fuel=%d\n", PlayerInfo[playerid][pVeh2Fuel]); fwrite(hFile, var);
                format(var, 32, "Veh2_Destroyed=%d\n", PlayerInfo[playerid][pVeh2Destroyed]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod1=%d\n", PlayerInfo[playerid][pVeh2Mod1]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod2=%d\n", PlayerInfo[playerid][pVeh2Mod2]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod3=%d\n", PlayerInfo[playerid][pVeh2Mod3]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod4=%d\n", PlayerInfo[playerid][pVeh2Mod4]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod5=%d\n", PlayerInfo[playerid][pVeh2Mod5]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod6=%d\n", PlayerInfo[playerid][pVeh2Mod6]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod7=%d\n", PlayerInfo[playerid][pVeh2Mod7]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod8=%d\n", PlayerInfo[playerid][pVeh2Mod8]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod9=%d\n", PlayerInfo[playerid][pVeh2Mod9]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod10=%d\n", PlayerInfo[playerid][pVeh2Mod10]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod11=%d\n", PlayerInfo[playerid][pVeh2Mod11]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod12=%d\n", PlayerInfo[playerid][pVeh2Mod12]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod13=%d\n", PlayerInfo[playerid][pVeh2Mod13]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod14=%d\n", PlayerInfo[playerid][pVeh2Mod14]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod15=%d\n", PlayerInfo[playerid][pVeh2Mod15]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod16=%d\n", PlayerInfo[playerid][pVeh2Mod16]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod17=%d\n", PlayerInfo[playerid][pVeh2Mod17]); fwrite(hFile, var);
                format(var, 32, "Veh2_Mod18=%d\n", PlayerInfo[playerid][pVeh2Mod18]); fwrite(hFile, var);
                format(var, 32, "Veh3_Model=%d\n", PlayerInfo[playerid][pVeh3Model]); fwrite(hFile, var);
                format(var, 32, "Veh3_X=%f\n", PlayerInfo[playerid][pVeh3X]); fwrite(hFile, var);
                format(var, 32, "Veh3_Y=%f\n", PlayerInfo[playerid][pVeh3Y]); fwrite(hFile, var);
                format(var, 32, "Veh3_Z=%f\n", PlayerInfo[playerid][pVeh3Z]); fwrite(hFile, var);
                format(var, 32, "Veh3_Rot=%f\n", PlayerInfo[playerid][pVeh3Rotation]); fwrite(hFile, var);
                format(var, 32, "Veh3_Paintjob=%d\n", PlayerInfo[playerid][pVeh3PaintJob]); fwrite(hFile, var);
                format(var, 32, "Veh3_Color1=%d\n", PlayerInfo[playerid][pVeh3Color1]); fwrite(hFile, var);
                format(var, 32, "Veh3_Color2=%d\n", PlayerInfo[playerid][pVeh3Color2]); fwrite(hFile, var);
                format(var, 32, "Veh3_Fuel=%d\n", PlayerInfo[playerid][pVeh3Fuel]); fwrite(hFile, var);
                format(var, 32, "Veh3_Destroyed=%d\n", PlayerInfo[playerid][pVeh3Destroyed]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod1=%d\n", PlayerInfo[playerid][pVeh3Mod1]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod2=%d\n", PlayerInfo[playerid][pVeh3Mod2]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod3=%d\n", PlayerInfo[playerid][pVeh3Mod3]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod4=%d\n", PlayerInfo[playerid][pVeh3Mod4]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod5=%d\n", PlayerInfo[playerid][pVeh3Mod5]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod6=%d\n", PlayerInfo[playerid][pVeh3Mod6]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod7=%d\n", PlayerInfo[playerid][pVeh3Mod7]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod8=%d\n", PlayerInfo[playerid][pVeh3Mod8]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod9=%d\n", PlayerInfo[playerid][pVeh3Mod9]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod10=%d\n", PlayerInfo[playerid][pVeh3Mod10]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod11=%d\n", PlayerInfo[playerid][pVeh3Mod11]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod12=%d\n", PlayerInfo[playerid][pVeh3Mod12]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod13=%d\n", PlayerInfo[playerid][pVeh3Mod13]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod14=%d\n", PlayerInfo[playerid][pVeh3Mod14]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod15=%d\n", PlayerInfo[playerid][pVeh3Mod15]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod16=%d\n", PlayerInfo[playerid][pVeh3Mod16]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod17=%d\n", PlayerInfo[playerid][pVeh3Mod17]); fwrite(hFile, var);
                format(var, 32, "Veh3_Mod18=%d\n", PlayerInfo[playerid][pVeh3Mod18]); fwrite(hFile, var);
                format(var, 32, "Veh1License=%s\n",PlayerInfo[playerid][pVeh1License]);fwrite(hFile, var);
                format(var, 32, "Veh2License=%s\n",PlayerInfo[playerid][pVeh2License]);fwrite(hFile, var);
                format(var, 32, "Veh3License=%s\n",PlayerInfo[playerid][pVeh3License]);fwrite(hFile, var);
                format(var, 32, "Veh1Slot1=%d\n", PlayerInfo[playerid][pVeh1Slot1]); fwrite(hFile, var);
                format(var, 32, "Veh1Slot1a=%d\n", PlayerInfo[playerid][pVeh1Slot1a]); fwrite(hFile, var);
                format(var, 32, "Veh1Slot2=%f\n", PlayerInfo[playerid][pVeh1Slot2]); fwrite(hFile, var);
                format(var, 32, "Veh1Slot3=%d\n", PlayerInfo[playerid][pVeh1Slot3]); fwrite(hFile, var);
                format(var, 32, "Veh2Slot1=%d\n", PlayerInfo[playerid][pVeh2Slot1]); fwrite(hFile, var);
                format(var, 32, "Veh2Slot1a=%d\n", PlayerInfo[playerid][pVeh2Slot1a]); fwrite(hFile, var);
                format(var, 32, "Veh2Slot2=%f\n", PlayerInfo[playerid][pVeh2Slot2]); fwrite(hFile, var);
                format(var, 32, "Veh2Slot3=%d\n", PlayerInfo[playerid][pVeh2Slot3]); fwrite(hFile, var);
                format(var, 32, "Veh3Slot1=%d\n", PlayerInfo[playerid][pVeh3Slot1]); fwrite(hFile, var);
                format(var, 32, "Veh3Slot1a=%d\n", PlayerInfo[playerid][pVeh3Slot1a]); fwrite(hFile, var);
                format(var, 32, "Veh3Slot2=%f\n", PlayerInfo[playerid][pVeh3Slot2]); fwrite(hFile, var);
                format(var, 32, "Veh3Slot3=%d\n", PlayerInfo[playerid][pVeh3Slot3]); fwrite(hFile, var);
                format(var, 32, "Object1=%d\n", PlayerInfo[playerid][pObject1]); fwrite(hFile, var);
                format(var, 32, "Object2=%d\n", PlayerInfo[playerid][pObject2]); fwrite(hFile, var);
                format(var, 32, "Object3=%d\n", PlayerInfo[playerid][pObject3]); fwrite(hFile, var);
                format(var, 32, "Object4=%d\n", PlayerInfo[playerid][pObject4]); fwrite(hFile, var);
                format(var, 32, "Object5=%d\n", PlayerInfo[playerid][pObject5]); fwrite(hFile, var);
                print("Saved mutual variables, checking if donator...");
                if(PlayerInfo[playerid][pDonator] > 1)
                {
                    format(var, 32, "Mask=%d\n", PlayerInfo[playerid][pMask]); fwrite(hFile, var);
                }
                if(PlayerInfo[playerid][pDonator] < 1)
                {
                    format(var, 32, "Mask=%d\n", 0); fwrite(hFile, var);
                }
                print("Passed the donator check");
                print("Checking if player is human or vampire...");
                if(PlayerInfo[playerid][pRace] == 1)
                {
                    print("Saving human stats");
                    format(var, 32, "hColt45=%d\n",HumanSkill[playerid][hColt45]);fwrite(hFile, var);
                    format(var, 32, "hDesertEagle=%d\n",HumanSkill[playerid][hDesertEagle]);fwrite(hFile, var);
                    format(var, 32, "hSilencedPistol=%d\n",HumanSkill[playerid][hSilencedPistol]);fwrite(hFile, var);
                    format(var, 32, "hMicroUzi=%d\n",HumanSkill[playerid][hMicroUzi]);fwrite(hFile, var);
                    format(var, 32, "hMP5=%d\n",HumanSkill[playerid][hMP5]);fwrite(hFile, var);
                    format(var, 32, "hAK47=%d\n",HumanSkill[playerid][hAK47]);fwrite(hFile, var);
                    format(var, 32, "hM4=%d\n",HumanSkill[playerid][hM4]);fwrite(hFile, var);
                    format(var, 32, "hShotgun=%d\n",HumanSkill[playerid][hShotgun]);fwrite(hFile, var);
                    format(var, 32, "hSPAS12=%d\n",HumanSkill[playerid][hSPAS12]);fwrite(hFile, var);
                    format(var, 32, "hSniperRifle=%d\n",HumanSkill[playerid][hSniperRifle]);fwrite(hFile, var);
                }
                if(PlayerInfo[playerid][pRace] == 2)
                {
                    print("Saving vampire stats");
                    format(var, 32, "vJump=%d\n",VampireAbility[playerid][vJump]);fwrite(hFile, var);
                    format(var, 32, "vSpeed=%d\n",VampireAbility[playerid][vSpeed]);fwrite(hFile, var);
                    format(var, 32, "vSniff=%d\n",VampireAbility[playerid][vSniff]);fwrite(hFile, var);
                    format(var, 32, "vComb=%d\n",VampireAbility[playerid][vComb]);fwrite(hFile, var);
                    format(var, 32, "vBite=%d\n",VampireAbility[playerid][vBite]);fwrite(hFile, var);
                    format(var, 32, "vBloodPoints=%d\n",VampireAbility[playerid][vBloodPoints]);fwrite(hFile, var);
                    format(var, 32, "vBPMax=%d\n",VampireAbility[playerid][vBPMax]);fwrite(hFile, var);
                }
                print("File saved, closing it...");
                fclose(hFile);
                print("File closed");
            }
            print("Resetting weapons...");
            PlayerInfo[playerid][pGun1] = 0; PlayerInfo[playerid][pAmmo1] = 0;
            PlayerInfo[playerid][pGun2] = 0; PlayerInfo[playerid][pAmmo2] = 0;
            PlayerInfo[playerid][pGun3] = 0; PlayerInfo[playerid][pAmmo3] = 0;
            PlayerInfo[playerid][pGun4] = 0; PlayerInfo[playerid][pAmmo4] = 0;
            print("PASSED");
        }
        print("pre-return part");
        return 1;
Now, account path on FTP is the following: "/scriptfiles/Accounts", which is the same as defined in the script. Now I really don't know what the problem is :/

This is my PlayerName(playerid) stock function:
pawn Код:
stock PlayerName(playerid)
{
  new name[255];
  GetPlayerName(playerid, name, 255);
  return name;
}
Reply


Messages In This Thread
Stats won's save on disconnect - by Makaveli93 - 24.06.2012, 19:20
Re: Stats won's save on disconnect - by JaTochNietDan - 24.06.2012, 19:46
Re: Stats won's save on disconnect - by Makaveli93 - 24.06.2012, 20:35
Re: Stats won's save on disconnect - by JaTochNietDan - 24.06.2012, 20:38
Re: Stats won's save on disconnect - by Dodo9655 - 24.06.2012, 20:43
Re: Stats won's save on disconnect - by Makaveli93 - 24.06.2012, 20:43
Re: Stats won's save on disconnect - by Kindred - 24.06.2012, 20:53
Re: Stats won's save on disconnect - by Makaveli93 - 24.06.2012, 21:01
Re: Stats won's save on disconnect - by JaTochNietDan - 24.06.2012, 21:05
Re: Stats won's save on disconnect - by Makaveli93 - 24.06.2012, 21:07

Forum Jump:


Users browsing this thread: 1 Guest(s)