Help Users Arent Saving in User file
#1

Hey ineed help my user files keep showing up in scriptfiles instead of users how do i fix this?
Reply
#2

"Users/%s.ini"
Reply
#3

try this

pawn Код:
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Users/%s.ini", sendername);
Reply
#4

Nothing Still
Reply
#5

What malaka said. When you save your users, you can save them as several different things, .ini, .data, .user, ect. We need to know that line of where its saving, and make sure you have your 'user' folder created in your scriptfiles and make sure you have it saved to /users/%s.ini instead of %s.ini.
Reply
#6

its saved 2 %s.ini but i got it 2 save in the right folder but everytime i log in for the second time it says to 2 register then it says im already registered and 2 pick another name
Reply
#7

anyone?
Reply
#8

can u show the code where it saves the stuff
Reply
#9

public OnPlayerSave(playerid)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerNPC(playerid)) return 1;
if(gPlayerLogged[playerid] != 0 && gPlayerSpawned[playerid] == 1)
{
new string3[32];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "/users/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if(hFile)
{
new var[64];
if(gmx == 0)
{
GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
GetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
}
PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
PlayerInfo[playerid][pVirtualWorld] = GetPlayerVirtualWorld(playerid);
GetPlayerPos(playerid, PlayerInfo[playerid][pSPos_x], PlayerInfo[playerid][pSPos_y], PlayerInfo[playerid][pSPos_z]);
GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pSPos_r]);
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, "Band=%d\n",PlayerInfo[playerid][pBand]);fwrite(hFile, var);
format(var, 32, "PermBand=%d\n",PlayerInfo[playerid][pPermBand]);fwrite(hFile, var);
format(var, 32, "Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
format(var, 32, "Disabled=%d\n",PlayerInfo[playerid][pDisabled]);fwrite(hFile, var);
format(var, 32, "DonateRank=%d\n",PlayerInfo[playerid][pDonateRank]);fwrite(hFile, var);
format(var, 32, "BanAppealer=%d\n",PlayerInfo[playerid][pBanAppealer]);fwrite(hFile, var);
format(var, 32, "GangMod=%d\n",PlayerInfo[playerid][pGangMod]);fwrite(hFile, var);
format(var, 32, "UpgradePoints=%d\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
format(var, 32, "ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
format(var, 32, "Registered=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
format(var, 32, "Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
format(var, 32, "Age=%d\n",PlayerInfo[playerid][pAge]);fwrite(hFile, var);
format(var, 32, "Origin=%d\n",PlayerInfo[playerid][pOrigin]);fwrite(hFile, var);
format(var, 32, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
format(var, 32, "Respect=%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][pAccount]);fwrite(hFile, var);
format(var, 32, "Crimes=%d\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
format(var, 32, "Accent=%s\n",Accent[playerid]);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, "CHits=%d\n",PlayerInfo[playerid][pCHits]);fwrite(hFile, var);
format(var, 32, "FHits=%d\n",PlayerInfo[playerid][pFHits]);fwrite(hFile, var);
format(var, 32, "Arrested=%d\n",PlayerInfo[playerid][pArrested]);fwrite(hFile, var);
format(var, 32, "Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
format(var, 32, "LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
format(var, 32, "Fishes=%d\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
format(var, 32, "BiggestFish=%d\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
format(var, 32, "Job=%d\n",PlayerInfo[playerid][pJob]);fwrite(hFile, var);
format(var, 32, "Paycheck=%d\n",PlayerInfo[playerid][pPayCheck]);fwrite(hFile, var);
format(var, 32, "HeadValue=%d\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
format(var, 32, "Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
format(var, 32, "Materials=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
format(var, 32, "Pot=%d\n",PlayerInfo[playerid][pPot]);fwrite(hFile, var);
format(var, 32, "Crack=%d\n",PlayerInfo[playerid][pCrack]);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, "FMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
format(var, 32, "Rank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
format(var, 32, "DetSkill=%d\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
format(var, 32, "SexSkill=%d\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
format(var, 32, "BoxSkill=%d\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
format(var, 32, "LawSkill=%d\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
format(var, 32, "MechSkill=%d\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
format(var, 32, "JackSkill=%d\n",PlayerInfo[playerid][pJackSkill]);fwrite(hFile, var);
format(var, 32, "CarSkill=%d\n",PlayerInfo[playerid][pCarSkill]);fwrite(hFile, var);
format(var, 32, "NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
format(var, 32, "DrugsSkill=%d\n",PlayerInfo[playerid][pDrugsSkill]);fwrite(hFile, var);
format(var, 32, "ArmsSkill=%d\n",PlayerInfo[playerid][pArmsSkill]);fwrite(hFile, var);
// format(var, 32, "TrashSkill=%d\n",PlayerInfo[playerid][pTrashSkill]);fwrite(hFile, var); // Trashman
format(var, 32, "SmugglerSkill=%d\n",PlayerInfo[playerid][pSmugglerSkill]);fwrite(hFile, var);
format(var, 32, "FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
format(var, 32, "FightingStyle=%d\n",PlayerInfo[playerid][pFightingStyle]);fwrite(hFile, var);
format(var, 32, "pHealth=%.1f\n",PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
format(var, 32, "pArmor=%.1f\n",PlayerInfo[playerid][pArmor]);fwrite(hFile, var);
format(var, 32, "pSHealth=%d\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
format(var, 32, "Int=%d\n",PlayerInfo[playerid][pInt]);fwrite(hFile, var);
format(var, 32, "Local=%d\n",PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
format(var, 32, "VirtualWorld=%d\n",PlayerInfo[playerid][pVirtualWorld]);fwrite(hFile, var);
format(var, 32, "Model=%d\n",PlayerInfo[playerid][pModel]);fwrite(hFile, var);
format(var, 32, "Clothes=%d\n",PlayerInfo[playerid][pClothes]);fwrite(hFile, var);
format(var, 32, "PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
format(var, 32, "Bizz=%d\n",PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
format(var, 32, "Apartment=%d\n",PlayerInfo[playerid][pPaptkey]);fwrite(hFile, var);
format(var, 32, "CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
format(var, 32, "FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
format(var, 32, "BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
format(var, 32, "FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
format(var, 32, "GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
format(var, 32, "Gun0=%d\n",PlayerInfo[playerid][pGun0]);fwrite(hFile, var);
format(var, 32, "Gun1=%d\n",PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
format(var, 32, "Gun2=%d\n",PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
format(var, 32, "Gun3=%d\n",PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
format(var, 32, "Gun4=%d\n",PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
format(var, 32, "Gun5=%d\n",PlayerInfo[playerid][pGun5]);fwrite(hFile, var);
format(var, 32, "Gun6=%d\n",PlayerInfo[playerid][pGun6]);fwrite(hFile, var);
format(var, 32, "Gun7=%d\n",PlayerInfo[playerid][pGun7]);fwrite(hFile, var);
format(var, 32, "Gun8=%d\n",PlayerInfo[playerid][pGun8]);fwrite(hFile, var);
format(var, 32, "Gun9=%d\n",PlayerInfo[playerid][pGun9]);fwrite(hFile, var);
format(var, 32, "Gun10=%d\n",PlayerInfo[playerid][pGun10]);fwrite(hFile, var);
format(var, 32, "Gun11=%d\n",PlayerInfo[playerid][pGun11]);fwrite(hFile, var);
format(var, 32, "Gun12=%d\n",PlayerInfo[playerid][pGun12]);fwrite(hFile, var);
format(var, 32, "HouseTag=%s\n",PlayerInfo[playerid][pHouseTag]);fwrite(hFile, var);
format(var, 32, "HouseAccepted=%d\n",PlayerInfo[playerid][pHouseAccepted]);fwrite(hFile, var);
format(var, 32, "HouseRequested=%d\n",PlayerInfo[playerid][pHouseRequested]);fwrite(hFile, var);
format(var, 32, "HouseApproved=%d\n",PlayerInfo[playerid][pHouseApproved]);fwrite(hFile, var);
format(var, 32, "HouseOwnerTag=%s\n",PlayerInfo[playerid][pHouseOwnerTag]);fwrite(hFile, var);
format(var, 32, "HouseLevel=%d\n",PlayerInfo[playerid][pHouseLevel]);fwrite(hFile, var);
format(var, 64, "HouseLocTag=%s\n",PlayerInfo[playerid][pHouseLocTag]);fwrite(hFile, var);
format(var, 32, "HouseX=%.1f\n",PlayerInfo[playerid][pHouseX]);fwrite(hFile, var);
format(var, 32, "HouseY=%.1f\n",PlayerInfo[playerid][pHouseY]);fwrite(hFile, var);
format(var, 32, "HouseZ=%.1f\n",PlayerInfo[playerid][pHouseZ]);fwrite(hFile, var);
format(var, 32, "HouseExitX=%.1f\n",PlayerInfo[playerid][pHouseExitX]);fwrite(hFile, var);
format(var, 32, "HouseExitY=%.1f\n",PlayerInfo[playerid][pHouseExitY]);fwrite(hFile, var);
format(var, 32, "HouseExitZ=%.1f\n",PlayerInfo[playerid][pHouseExitZ]);fwrite(hFile, var);
format(var, 32, "HouseExitR=%.1f\n",PlayerInfo[playerid][pHouseExitR]);fwrite(hFile, var);
format(var, 32, "HouseCarModel=%d\n",PlayerInfo[playerid][pHouseCarModel]);fwrite(hFile, var);
format(var, 32, "HouseCarFacing=%.1f\n",PlayerInfo[playerid][pHouseCarFacing]);fwrite(hFile, var);
format(var, 32, "HouseCarColor=%d\n",PlayerInfo[playerid][pHouseCarColor]);fwrite(hFile, var);
format(var, 32, "HouseCarColor2=%d\n",PlayerInfo[playerid][pHouseCarColor2]);fwrite(hFile, var);
format(var, 32, "HouseLocked=%d\n",PlayerInfo[playerid][pHouseLocked]);fwrite(hFile, var);
format(var, 32, "HouseCarX=%.1f\n",PlayerInfo[playerid][pHouseCarX]);fwrite(hFile, var);
format(var, 32, "HouseCarY=%.1f\n",PlayerInfo[playerid][pHouseCarY]);fwrite(hFile, var);
format(var, 32, "HouseCarZ=%.1f\n",PlayerInfo[playerid][pHouseCarZ]);fwrite(hFile, var);
format(var, 32, "hCash=%d\n",PlayerInfo[playerid][hCash]);fwrite(hFile, var);
format(var, 32, "hPot=%d\n",PlayerInfo[playerid][hPot]);fwrite(hFile, var);
format(var, 32, "hCrack=%d\n",PlayerInfo[playerid][hCrack]);fwrite(hFile, var);
format(var, 32, "hMats=%d\n",PlayerInfo[playerid][hMats]);fwrite(hFile, var);
format(var, 32, "hGun1=%d\n",PlayerInfo[playerid][hGun1]);fwrite(hFile, var);
format(var, 32, "hGun2=%d\n",PlayerInfo[playerid][hGun2]);fwrite(hFile, var);
format(var, 32, "hGun3=%d\n",PlayerInfo[playerid][hGun3]);fwrite(hFile, var);
format(var, 32, "hGun4=%d\n",PlayerInfo[playerid][hGun4]);fwrite(hFile, var);
format(var, 32, "hGun5=%d\n",PlayerInfo[playerid][hGun5]);fwrite(hFile, var);
format(var, 32, "hGL=%d\n",PlayerInfo[playerid][hGL]);fwrite(hFile, var);
format(var, 32, "hValue=%d\n",PlayerInfo[playerid][hValue]);fwrite(hFile, var);
format(var, 32, "hAlarmSystem=%d\n",PlayerInfo[playerid][hAlarmSystem]);fwrite(hFile, var);
format(var, 32, "hAlarmNumber=%d\n",PlayerInfo[playerid][hAlarmNumber]);fwrite(hFile, var);
format(var, 32, "hNitro=%d\n",PlayerInfo[playerid][hNitro]);fwrite(hFile, var);
format(var, 32, "hLicensePlate=%d\n",PlayerInfo[playerid][hLicensePlate]);fwrite(hFile, var);
format(var, 32, "hVehLock=%d\n",PlayerInfo[playerid][hVehLock]);fwrite(hFile, var);
format(var, 32, "hTicket=%d\n",PlayerInfo[playerid][hTicket]);fwrite(hFile, var);
format(var, 32, "CarTime=%d\n",PlayerInfo[playerid][pCarTime]);fwrite(hFile, var);
format(var, 32, "DrugsTime=%d\n",PlayerInfo[playerid][pDrugsTime]);fwrite(hFile, var);
format(var, 32, "LawyerTime=%d\n",PlayerInfo[playerid][pLawyerTime]);fwrite(hFile, var);
format(var, 32, "LawyerFreeTime=%d\n",PlayerInfo[playerid][pLawyerFreeTime]);fwrite(hFile, var);
format(var, 32, "MechTime=%d\n",PlayerInfo[playerid][pMechTime]);fwrite(hFile, var);
format(var, 32, "SexTime=%d\n",PlayerInfo[playerid][pSexTime]);fwrite(hFile, var);
format(var, 32, "PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
format(var, 32, "PayDayHad=%d\n",PlayerInfo[playerid][pPayDayHad]);fwrite(hFile, var);
format(var, 32, "CDPlayer=%d\n",PlayerInfo[playerid][pCDPlayer]);fwrite(hFile, var);
format(var, 32, "Dice=%d\n",PlayerInfo[playerid][pDice]);fwrite(hFile, var);
format(var, 32, "Spraycan=%d\n",PlayerInfo[playerid][pSpraycan]);fwrite(hFile, var);
format(var, 32, "Screw=%d\n",PlayerInfo[playerid][pScrew]);fwrite(hFile, var);
format(var, 32, "Rope=%d\n",PlayerInfo[playerid][pRope]);fwrite(hFile, var);
format(var, 32, "Cigars=%d\n",PlayerInfo[playerid][pCigars]);fwrite(hFile, var);
format(var, 32, "Sprunk=%d\n",PlayerInfo[playerid][pSprunk]);fwrite(hFile, var);
format(var, 32, "Cookies=%d\n",PlayerInfo[playerid][pCookies]);fwrite(hFile, var);
format(var, 32, "WT=%d\n",PlayerInfo[playerid][pWT]);fwrite(hFile, var);
format(var, 32, "WTc=%d\n",PlayerInfo[playerid][pWTc]);fwrite(hFile, var);
format(var, 32, "Bombs=%d\n",PlayerInfo[playerid][pBombs]);fwrite(hFile, var);
format(var, 32, "Scope=%d\n",PlayerInfo[playerid][pScope]);fwrite(hFile, var);
format(var, 32, "Wins=%d\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
format(var, 32, "Loses=%d\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
format(var, 32, "Tutorial=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
format(var, 32, "On‌Duty=%d\n",PlayerInfo[playerid][pOnDuty]);fwrite(hFile, var);
format(var, 32, "Hospital=%d\n",PlayerInfo[playerid][pHospital]);fwrite(hFile, var);
format(var, 32, "Adjustable=%d\n",PlayerInfo[playerid][pAdjustable]);fwrite(hFile, var);
format(var, 32, "Married=%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
format(var, 32, "MarriedTo=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
format(var, 32, "ContractBy=%s\n",PlayerInfo[playerid][pContractBy]);fwrite(hFile, var);
format(var, 32, "IP=%s\n",PlayerInfo[playerid][pIP]);fwrite(hFile, var);
format(var, 32, "WantedLevel=%d\n",PlayerInfo[playerid][pWantedLevel]);fwrite(hFile, var);
format(var, 32, "NewbieMuted=%d\n",PlayerInfo[playerid][pNewbieMuted]);fwrite(hFile, var);
format(var, 32, "SafeSpawn=%d\n",PlayerInfo[playerid][pSafeSpawn]);fwrite(hFile, var);
format(var, 32, "SPos_x=%.1f\n",PlayerInfo[playerid][pSPos_x]);fwrite(hFile, var);
format(var, 32, "SPos_y=%.1f\n",PlayerInfo[playerid][pSPos_y]);fwrite(hFile, var);
format(var, 32, "SPos_z=%.1f\n",PlayerInfo[playerid][pSPos_z]);fwrite(hFile, var);
format(var, 32, "SPos_r=%.1f\n",PlayerInfo[playerid][pSPos_r]);fwrite(hFile, var);
format(var, 32, "HelperLevel=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var);
format(var, 32, "Mask=%d\n",HasBoughtMask[playerid]);fwrite(hFile, var);
format(var, 32, "Blindfolds=%d\n",PlayerInfo[playerid][pBlindfolds]);fwrite(hFile, var);
format(var, 32, "Speedo=%d\n",gSpeedo[playerid]);fwrite(hFile, var);
format(var, 32, "Seeds=%d\n",PlayerInfo[playerid][pSeeds]);fwrite(hFile, var);
format(var, 32, "BizX=%.1f\n",PlayerInfo[playerid][pBizX]);fwrite(hFile, var);
format(var, 32, "BizY=%.1f\n",PlayerInfo[playerid][pBizY]);fwrite(hFile, var);
format(var, 32, "BizZ=%.1f\n",PlayerInfo[playerid][pBizZ]);fwrite(hFile, var);
format(var, 32, "BizExitX=%.1f\n",PlayerInfo[playerid][pBizExitX]);fwrite(hFile, var);
format(var, 32, "BizExitY=%.1f\n",PlayerInfo[playerid][pBizExitY]);fwrite(hFile, var);
format(var, 32, "BizExitZ=%.1f\n",PlayerInfo[playerid][pBizExitZ]);fwrite(hFile, var);
format(var, 32, "BizKind=%d\n",PlayerInfo[playerid][pBizKind]);fwrite(hFile, var);
format(var, 32, "BizBank=%d\n",PlayerInfo[playerid][pBizBank]);fwrite(hFile, var);
format(var, 32, "BizFee=%d\n",PlayerInfo[playerid][pBizFee]);fwrite(hFile, var);
format(var, 32, "BizAccepted=%d\n",PlayerInfo[playerid][pBizAccepted]);fwrite(hFile, var);
format(var, 32, "BizInt=%d\n",PlayerInfo[playerid][pBizInt]);fwrite(hFile, var);
format(var, 32, "BizLevel=%d\n",PlayerInfo[playerid][pBizLevel]);fwrite(hFile, var);
format(var, 32, "BizTag=%s\n",PlayerInfo[playerid][pBizTag]);fwrite(hFile, var);
format(var, 32, "BizLoc=%s\n",PlayerInfo[playerid][pBizLoc]);fwrite(hFile, var);
format(var, 32, "BizMes=%s\n",PlayerInfo[playerid][pBizMes]);fwrite(hFile, var);
fclose(hFile);
}
}
}
return 1;
}
Reply
#10

Try and create the folder "users." I don't know if it does it automatically.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)