YINI problem | Reseting account on login
#1

I convert all my save/load system in yini (i was use fwrite before i did it) and my problem is when i login ALL MY STATS go on 0

Example

Admin Level = 1337

When i logout Admin Level is on 1337 but when i go login my stats are on 0 so admin level goes to Admin Level = 0

Here's some code....

pawn Код:
stock OnPlayerLogin(playerid,password[])
{
    new
       string[128],
       Data[128];
    format(Data, sizeof(Data), "users/%s.ini", GetName(playerid));
    INI_ParseFile(Data, "LoadUser", .bExtra = true, .extra = playerid);
    if(udb_hash(password) == GetPVarInt(playerid, "Lozinka"))
    {
         LoadPlayerData(playerid);
    } else
    {
          /* LOGIN FAIL */
    }
    return (true);
}
This is LoadUser parse

pawn Код:
forward LoadUser(playerid,name[],value[]);
public LoadUser(playerid,name[],value[])
{
    if(!strcmp(name, "Lozinka")) { SetPVarInt(playerid, "Lozinka", strval(value)); }
    if(!strcmp(name, "pLevel")) { SetPVarInt(playerid, "pLevel", strval(value)); }
    if(!strcmp(name, "AdminLevel")) { SetPVarInt(playerid, "AdminLevel", strval(value)); }
    if(!strcmp(name, "pDonateRank")) { SetPVarInt(playerid, "pDonateRank", strval(value)); }
    if(!strcmp(name, "gPupgrade")) { SetPVarInt(playerid, "gPupgrade", strval(value)); }
    if(!strcmp(name, "pReg")) { SetPVarInt(playerid, "pReg", strval(value)); }
    if(!strcmp(name, "pSex")) { SetPVarInt(playerid, "pSex", strval(value)); }
    if(!strcmp(name, "pAge")) { SetPVarInt(playerid, "pAge", strval(value)); }
    if(!strcmp(name, "pOrigin")) { SetPVarInt(playerid, "pOrigin", strval(value)); }
    if(!strcmp(name, "pCK")) { SetPVarInt(playerid, "pCK", strval(value)); }
    if(!strcmp(name, "pMuted")) { SetPVarInt(playerid, "pMuted", strval(value)); }
    if(!strcmp(name, "pExp")) { SetPVarInt(playerid, "pExp", strval(value)); }
    if(!strcmp(name, "pCash")) { SetPVarInt(playerid, "pCash", strval(value)); }
    if(!strcmp(name, "pAccount")) { SetPVarInt(playerid, "pAccount", strval(value)); }
    if(!strcmp(name, "pCrimes")) { SetPVarInt(playerid, "pCrimes", strval(value)); }
    if(!strcmp(name, "pKills")) { SetPVarInt(playerid, "pKills", strval(value)); }
    if(!strcmp(name, "pHouseKey1")) { SetPVarInt(playerid, "pHouseKey1", strval(value)); }
    if(!strcmp(name, "pHouseKey2")) { SetPVarInt(playerid, "pHouseKey2", strval(value)); }
    if(!strcmp(name, "pHouseKey3")) { SetPVarInt(playerid, "pHouseKey3", strval(value)); }
    if(!strcmp(name, "pBizKey")) { SetPVarInt(playerid, "pBizKey", strval(value)); }
    if(!strcmp(name, "pDeaths")) { SetPVarInt(playerid, "pDeaths", strval(value)); }
    if(!strcmp(name, "pArrested")) { SetPVarInt(playerid, "pArrested", strval(value)); }
    if(!strcmp(name, "pWantedDeaths")) { SetPVarInt(playerid, "pWantedDeaths", strval(value)); }
    if(!strcmp(name, "pPhoneBook")) { SetPVarInt(playerid, "pPhoneBook", strval(value)); }
    if(!strcmp(name, "pLottoNr")) { SetPVarInt(playerid, "pLottoNr", strval(value)); }
    if(!strcmp(name, "pFishes")) { SetPVarInt(playerid, "pFishes", strval(value)); }
    if(!strcmp(name, "pBiggestFish")) { SetPVarInt(playerid, "pBiggestFish", strval(value)); }
    if(!strcmp(name, "pJob")) { SetPVarInt(playerid, "pJob", strval(value)); }
    if(!strcmp(name, "Placa")) { SetPVarInt(playerid, "Placa", strval(value)); }
    if(!strcmp(name, "pHeadValue")) { SetPVarInt(playerid, "pHeadValue", strval(value)); }
    if(!strcmp(name, "pJailed")) { SetPVarInt(playerid, "pJailed", strval(value)); }
    if(!strcmp(name, "pJailTime")) { SetPVarInt(playerid, "pJailTime", strval(value)); }
    if(!strcmp(name, "pMats")) { SetPVarInt(playerid, "pMats", strval(value)); }
    if(!strcmp(name, "pDrugs")) { SetPVarInt(playerid, "pDrugs", strval(value)); }
    if(!strcmp(name, "pLeader")) { SetPVarInt(playerid, "pLeader", strval(value)); }
    if(!strcmp(name, "pMember")) { SetPVarInt(playerid, "pMember", strval(value)); }
    if(!strcmp(name, "pFMember")) { SetPVarInt(playerid, "pFMember", strval(value)); }
    if(!strcmp(name, "pRank")) { SetPVarInt(playerid, "pRank", strval(value)); }
    if(!strcmp(name, "pChar")) { SetPVarInt(playerid, "pChar", strval(value)); }
    if(!strcmp(name, "pContractTime")) { SetPVarInt(playerid, "pContractTime", strval(value)); }
    if(!strcmp(name, "pDetSkill")) { SetPVarInt(playerid, "pDetSkill", strval(value)); }
    if(!strcmp(name, "pSexSkill")) { SetPVarInt(playerid, "pSexSkill", strval(value)); }
    if(!strcmp(name, "pBoxSkill")) { SetPVarInt(playerid, "pBoxSkill", strval(value)); }
    if(!strcmp(name, "pLawSkill")) { SetPVarInt(playerid, "pLawSkill", strval(value)); }
    if(!strcmp(name, "pMechSkill")) { SetPVarInt(playerid, "pMechSkill", strval(value)); }
    if(!strcmp(name, "pJackSkill")) { SetPVarInt(playerid, "pJackSkill", strval(value)); }
    if(!strcmp(name, "pCarSkill")) { SetPVarInt(playerid, "pCarSkill", strval(value)); }
    if(!strcmp(name, "pNewsSkill")) { SetPVarInt(playerid, "pNewsSkill", strval(value)); }
    if(!strcmp(name, "pDrugsSkill")) { SetPVarInt(playerid, "pDrugsSkill", strval(value)); }
    if(!strcmp(name, "pCookSkill")) { SetPVarInt(playerid, "pCookSkill", strval(value)); }
    if(!strcmp(name, "pFishSkill")) { SetPVarInt(playerid, "pFishSkill", strval(value)); }
    if(!strcmp(name, "pSHealth")) { SetPVarFloat(playerid, "pSHealth", strval(value)); }
    if(!strcmp(name, "pHealth")) { SetPVarFloat(playerid, "pHealth", strval(value)); }
    if(!strcmp(name, "pInt")) { SetPVarInt(playerid, "pInt", strval(value)); }
    if(!strcmp(name, "pLocal")) { SetPVarInt(playerid, "pLocal", strval(value)); }
    if(!strcmp(name, "pTeam")) { SetPVarInt(playerid, "pTeam", strval(value)); }
    if(!strcmp(name, "pModel")) { SetPVarInt(playerid, "pModel", strval(value)); }
    if(!strcmp(name, "pPnumber")) { SetPVarInt(playerid, "pPnumber", strval(value)); }
    if(!strcmp(name, "pPcarkey")) { SetPVarInt(playerid, "pPcarkey", strval(value)); }
    if(!strcmp(name, "pPcarkey2")) { SetPVarInt(playerid, "pPcarkey2", strval(value)); }
    if(!strcmp(name, "pPcarkey3")) { SetPVarInt(playerid, "pPcarkey3", strval(value)); }
    if(!strcmp(name, "pPbiskey")) { SetPVarInt(playerid, "pPbiskey", strval(value)); }
    if(!strcmp(name, "pPos_x")) { SetPVarFloat(playerid, "pPos_x", strval(value)); }
    if(!strcmp(name, "pPos_y")) { SetPVarFloat(playerid, "pPos_y", strval(value)); }
    if(!strcmp(name, "pPos_z")) { SetPVarFloat(playerid, "pPos_z", strval(value)); }
    if(!strcmp(name, "pCarLic")) { SetPVarInt(playerid, "pCarLic", strval(value)); }
    if(!strcmp(name, "pFlyLic")) { SetPVarInt(playerid, "pFlyLic", strval(value)); }
    if(!strcmp(name, "pBoatLic")) { SetPVarInt(playerid, "pBoatLic", strval(value)); }
    if(!strcmp(name, "pFishLic")) { SetPVarInt(playerid, "pFishLic", strval(value)); }
    if(!strcmp(name, "pGunLic")) { SetPVarInt(playerid, "pGunLic", strval(value)); }
    if(!strcmp(name, "pGun1")) { SetPVarInt(playerid, "pGun1", strval(value)); }
    if(!strcmp(name, "pGun2")) { SetPVarInt(playerid, "pGun2", strval(value)); }
    if(!strcmp(name, "pGun3")) { SetPVarInt(playerid, "pGun3", strval(value)); }
    if(!strcmp(name, "pGun4")) { SetPVarInt(playerid, "pGun4", strval(value)); }
    if(!strcmp(name, "pAmmo1")) { SetPVarInt(playerid, "pAmmo1", strval(value)); }
    if(!strcmp(name, "pAmmo2")) { SetPVarInt(playerid, "pAmmo2", strval(value)); }
    if(!strcmp(name, "pAmmo3")) { SetPVarInt(playerid, "pAmmo3", strval(value)); }
    if(!strcmp(name, "pAmmo4")) { SetPVarInt(playerid, "pAmmo4", strval(value)); }
    if(!strcmp(name, "pCarTime")) { SetPVarInt(playerid, "pCarTime", strval(value)); }
    if(!strcmp(name, "pOnlineMin")) { SetPVarInt(playerid, "pOnlineMin", strval(value)); }
    if(!strcmp(name, "pPayDayHad")) { SetPVarInt(playerid, "pPayDayHad", strval(value)); }
    if(!strcmp(name, "pCrashed")) { SetPVarInt(playerid, "pCrashed", strval(value)); }
    if(!strcmp(name, "pWins")) { SetPVarInt(playerid, "pWins", strval(value)); }
    if(!strcmp(name, "pLoses")) { SetPVarInt(playerid, "pLoses", strval(value)); }
    if(!strcmp(name, "pAlcoholPerk")) { SetPVarInt(playerid, "pAlcoholPerk", strval(value)); }
    if(!strcmp(name, "pDrugPerk")) { SetPVarInt(playerid, "pDrugPerk", strval(value)); }
    if(!strcmp(name, "pMiserPerk")) { SetPVarInt(playerid, "pMiserPerk", strval(value)); }
    if(!strcmp(name, "pPainPerk")) { SetPVarInt(playerid, "pPainPerk", strval(value)); }
    if(!strcmp(name, "pTraderPerk")) { SetPVarInt(playerid, "pTraderPerk", strval(value)); }
    if(!strcmp(name, "pTut")) { SetPVarInt(playerid, "pTut", strval(value)); }
    if(!strcmp(name, "pMissionNr")) { SetPVarInt(playerid, "pMissionNr", strval(value)); }
    if(!strcmp(name, "pWarns")) { SetPVarInt(playerid, "pWarns", strval(value)); }
    if(!strcmp(name, "pVirWorld")) { SetPVarInt(playerid, "pVirWorld", strval(value)); }
    if(!strcmp(name, "pFuel")) { SetPVarInt(playerid, "pFuel", strval(value)); }
    if(!strcmp(name, "pMarried")) { SetPVarInt(playerid, "pMarried", strval(value)); }
    if(!strcmp(name, "pMarriedTo")) { SetPVarString(playerid,"pMarriedTo",value); }
    if(!strcmp(name, "pFishTool")) { SetPVarInt(playerid, "pFishTool", strval(value)); }
    if(!strcmp(name, "pNote1")) { SetPVarString(playerid,"pNote1",value); }
    if(!strcmp(name, "pNote1s")) { SetPVarInt(playerid, "pNote1s", strval(value)); }
    if(!strcmp(name, "pNote2")) { SetPVarString(playerid,"pNote2",value); }
    if(!strcmp(name, "pNote2s")) { SetPVarInt(playerid, "pNote2s", strval(value)); }
    if(!strcmp(name, "pNote3")) { SetPVarString(playerid,"pNote3",value); }
    if(!strcmp(name, "pNote3s")) { SetPVarInt(playerid, "pNote3s", strval(value)); }
    if(!strcmp(name, "pNote4")) { SetPVarString(playerid,"pNote4",value); }
    if(!strcmp(name, "pNote4s")) { SetPVarInt(playerid, "pNote4s", strval(value)); }
    if(!strcmp(name, "pNote5")) { SetPVarString(playerid,"pNote5",value); }
    if(!strcmp(name, "pNote5s")) { SetPVarInt(playerid, "pNote5s", strval(value)); }
    if(!strcmp(name, "pInvWeapon")) { SetPVarInt(playerid, "pInvWeapon", strval(value)); }
    if(!strcmp(name, "pInvAmmo")) { SetPVarInt(playerid, "pInvAmmo", strval(value)); }
    if(!strcmp(name, "pLighter")) { SetPVarInt(playerid, "pLighter", strval(value)); }
    if(!strcmp(name, "pCigarettes")) { SetPVarInt(playerid, "pCigarettes", strval(value)); }
    if(!strcmp(name, "pLocked")) { SetPVarInt(playerid, "pLocked", strval(value)); }
    if(!strcmp(name, "pKreditP1")) { SetPVarInt(playerid, "pKreditP1", strval(value)); }
    if(!strcmp(name, "pKreditP2")) { SetPVarInt(playerid, "pKreditP2", strval(value)); }
    if(!strcmp(name, "pKreditP3")) { SetPVarInt(playerid, "pKreditP3", strval(value)); }
    if(!strcmp(name, "pOdignuoKredit")) { SetPVarInt(playerid, "pOdignuoKredit", strval(value)); }
    if(!strcmp(name, "pKredit")) { SetPVarInt(playerid, "pKredit", strval(value)); }
    if(!strcmp(name, "pKredit2")) { SetPVarInt(playerid, "pKredit2", strval(value)); }
    if(!strcmp(name, "pKredit3")) { SetPVarInt(playerid, "pKredit3", strval(value)); }
    if(!strcmp(name, "pGM")) { SetPVarInt(playerid, "pGM", strval(value)); }
    if(!strcmp(name, "pGlad")) { SetPVarInt(playerid, "pGlad", strval(value)); }
    if(!strcmp(name, "pWC")) { SetPVarInt(playerid, "pWC", strval(value)); }
        return (true);
}
And this is my LoadPlayerData() code....

pawn Код:
stock LoadPlayerData(playerid)
{
     new Data[128];
     format(Data, sizeof(Data), "users/%s.ini", GetName(playerid));
     if(fexist(Data))
     {
          new string[128];
          PlayerInfo[playerid][pLevel] = GetPVarInt(playerid, "pLevel");
          PlayerInfo[playerid][pAdmin] = GetPVarInt(playerid, "AdminLevel");
          PlayerInfo[playerid][pDonateRank] = GetPVarInt(playerid, "pDonateRank");
          PlayerInfo[playerid][gPupgrade] = GetPVarInt(playerid, "gPupgrade");
          PlayerInfo[playerid][pReg] = GetPVarInt(playerid, "pReg");
          PlayerInfo[playerid][pSex] = GetPVarInt(playerid, "pSex");
          PlayerInfo[playerid][pAge] = GetPVarInt(playerid, "pAge");
          PlayerInfo[playerid][pOrigin] = GetPVarInt(playerid, "pOrigin");
          PlayerInfo[playerid][pCK] = GetPVarInt(playerid, "pCK");
          PlayerInfo[playerid][pMuted] = GetPVarInt(playerid, "pMuted");
          PlayerInfo[playerid][pExp] = GetPVarInt(playerid, "pExp");
          PlayerInfo[playerid][pCash] = GetPVarInt(playerid, "pCash");
          PlayerInfo[playerid][pCrimes] = GetPVarInt(playerid, "pCrimes");
          PlayerInfo[playerid][pAccount] = GetPVarInt(playerid, "pAccount");
          PlayerInfo[playerid][pKills] = GetPVarInt(playerid, "pKills");
          PlayerInfo[playerid][pHouseKey1] = GetPVarInt(playerid, "pHouseKey1");
          PlayerInfo[playerid][pHouseKey2] = GetPVarInt(playerid, "pHouseKey2");
          PlayerInfo[playerid][pHouseKey3] = GetPVarInt(playerid, "pHouseKey3");
          PlayerInfo[playerid][pBizKey] = GetPVarInt(playerid, "pBizKey");
          PlayerInfo[playerid][pDeaths] = GetPVarInt(playerid, "pDeaths");
          PlayerInfo[playerid][pArrested] = GetPVarInt(playerid, "pArrested");
          PlayerInfo[playerid][pWantedDeaths] = GetPVarInt(playerid, "pWantedDeaths");
          PlayerInfo[playerid][pPhoneBook] = GetPVarInt(playerid, "pPhoneBook");
          PlayerInfo[playerid][pLottoNr] = GetPVarInt(playerid, "pLottoNr");
          PlayerInfo[playerid][pFishes] = GetPVarInt(playerid, "pFishes");
          PlayerInfo[playerid][pBiggestFish] = GetPVarInt(playerid, "pBiggestFish");
          PlayerInfo[playerid][pJob] = GetPVarInt(playerid, "pJob");
          PlayerInfo[playerid][Placa] = GetPVarInt(playerid, "Placa");
          PlayerInfo[playerid][pHeadValue] = GetPVarInt(playerid, "pHeadValue");
          PlayerInfo[playerid][pJailed] = GetPVarInt(playerid, "pJailed");
          PlayerInfo[playerid][pJailTime] = GetPVarInt(playerid, "pJailTime");
          PlayerInfo[playerid][pMats] = GetPVarInt(playerid, "pMats");
          PlayerInfo[playerid][pDrugs] = GetPVarInt(playerid, "pDrugs");
          PlayerInfo[playerid][pLeader] = GetPVarInt(playerid, "pLeader");
          PlayerInfo[playerid][pMember] = GetPVarInt(playerid, "pMember");
          PlayerInfo[playerid][pFMember] = GetPVarInt(playerid, "pFMember");
          PlayerInfo[playerid][pRank] = GetPVarInt(playerid, "pRank");
          PlayerInfo[playerid][pChar] = GetPVarInt(playerid, "pChar");
          PlayerInfo[playerid][pContractTime] = GetPVarInt(playerid, "pContractTime");
          PlayerInfo[playerid][pDetSkill] = GetPVarInt(playerid, "pDetSkill");
          PlayerInfo[playerid][pSexSkill] = GetPVarInt(playerid, "pSexSkill");
          PlayerInfo[playerid][pBoxSkill] = GetPVarInt(playerid, "pBoxSkill");
          PlayerInfo[playerid][pLawSkill] = GetPVarInt(playerid, "pLawSkill");
          PlayerInfo[playerid][pMechSkill] = GetPVarInt(playerid, "pMechSkill");
          PlayerInfo[playerid][pJackSkill] = GetPVarInt(playerid, "pJackSkill");
          PlayerInfo[playerid][pCarSkill] = GetPVarInt(playerid, "pCarSkill");
          PlayerInfo[playerid][pNewsSkill] = GetPVarInt(playerid, "pNewsSkill");
          PlayerInfo[playerid][pDrugsSkill] = GetPVarInt(playerid, "pDrugsSkill");
          PlayerInfo[playerid][pCookSkill] = GetPVarInt(playerid, "pCookSkill");
          PlayerInfo[playerid][pFishSkill] = GetPVarInt(playerid, "pFishSkill");
          PlayerInfo[playerid][pSHealth] = GetPVarFloat(playerid,"pSHealth");
          PlayerInfo[playerid][pHealth] = GetPVarFloat(playerid,"pHealth");
          PlayerInfo[playerid][pInt] = GetPVarInt(playerid, "pInt");
          PlayerInfo[playerid][pLocal] = GetPVarInt(playerid, "pLocal");
          PlayerInfo[playerid][pTeam] = GetPVarInt(playerid, "pTeam");
          PlayerInfo[playerid][pModel] = GetPVarInt(playerid, "pModel");
          PlayerInfo[playerid][pPnumber] = GetPVarInt(playerid, "pPnumber");
          PlayerInfo[playerid][pPcarkey] = GetPVarInt(playerid, "pPcarkey");
          PlayerInfo[playerid][pPcarkey2] = GetPVarInt(playerid, "pPcarkey2");
          PlayerInfo[playerid][pPcarkey3] = GetPVarInt(playerid, "pPcarkey3");
          PlayerInfo[playerid][pPbiskey] = GetPVarInt(playerid, "pPbiskey");
          PlayerInfo[playerid][pPos_x] = GetPVarFloat(playerid, "pPos_x");
          PlayerInfo[playerid][pPos_y] = GetPVarFloat(playerid, "pPos_y");
          PlayerInfo[playerid][pPos_z] = GetPVarFloat(playerid, "pPos_z");
          PlayerInfo[playerid][pCarLic] = GetPVarInt(playerid, "pCarLic");
          PlayerInfo[playerid][pFlyLic] = GetPVarInt(playerid, "pFlyLic");
          PlayerInfo[playerid][pBoatLic] = GetPVarInt(playerid, "pBoatLic");
          PlayerInfo[playerid][pFishLic] = GetPVarInt(playerid, "pFishLic");
          PlayerInfo[playerid][pGunLic] = GetPVarInt(playerid, "pGunLic");
          PlayerInfo[playerid][pGun1] = GetPVarInt(playerid, "pGun1");
          PlayerInfo[playerid][pGun2] = GetPVarInt(playerid, "pGun2");
          PlayerInfo[playerid][pGun3] = GetPVarInt(playerid, "pGun3");
          PlayerInfo[playerid][pGun4] = GetPVarInt(playerid, "pGun4");
          PlayerInfo[playerid][pAmmo1] = GetPVarInt(playerid, "pAmmo1");
          PlayerInfo[playerid][pAmmo2] = GetPVarInt(playerid, "pAmmo2");
          PlayerInfo[playerid][pAmmo3] = GetPVarInt(playerid, "pAmmo3");
          PlayerInfo[playerid][pAmmo4] = GetPVarInt(playerid, "pAmmo4");
          PlayerInfo[playerid][pCarTime] = GetPVarInt(playerid, "pCarTime");
          PlayerInfo[playerid][pOnlineMin] = GetPVarInt(playerid, "pOnlineMin");
          PlayerInfo[playerid][pPayDayHad] = GetPVarInt(playerid, "pPayDayHad");
          PlayerInfo[playerid][pCrashed] = GetPVarInt(playerid, "pCrashed");
          PlayerInfo[playerid][pLoses] = GetPVarInt(playerid, "pLoses");
          PlayerInfo[playerid][pAlcoholPerk] = GetPVarInt(playerid, "pAlcoholPerk");
          PlayerInfo[playerid][pDrugPerk] = GetPVarInt(playerid, "pDrugPerk");
          PlayerInfo[playerid][pMiserPerk] = GetPVarInt(playerid, "pMiserPerk");
          PlayerInfo[playerid][pPainPerk] = GetPVarInt(playerid, "pPainPerk");
          PlayerInfo[playerid][pTraderPerk] = GetPVarInt(playerid, "pTraderPerk");
          PlayerInfo[playerid][pTut] = GetPVarInt(playerid, "pTut");
          PlayerInfo[playerid][pMissionNr] = GetPVarInt(playerid, "pMissionNr");
          PlayerInfo[playerid][pWarns] = GetPVarInt(playerid, "pWarns");
          PlayerInfo[playerid][pVirWorld] = GetPVarInt(playerid, "pVirWorld");
          PlayerInfo[playerid][pFuel] = GetPVarInt(playerid, "pFuel");
          PlayerInfo[playerid][pMarried] = GetPVarInt(playerid, "pMarried");
          GetPVarString(playerid, "pMarriedTo", string, MAX_PLAYER_NAME);
          format(PlayerInfo[playerid][pMarriedTo], MAX_PLAYER_NAME, "%s", string);
          PlayerInfo[playerid][pFishTool] = GetPVarInt(playerid, "pFishTool");
          GetPVarString(playerid, "pNote1", string, 128);
          format(PlayerInfo[playerid][pNote1], 128, "%s", string);
          PlayerInfo[playerid][pNote1s] = GetPVarInt(playerid, "pNote1s");
          GetPVarString(playerid, "pNote2", string, 128);
          format(PlayerInfo[playerid][pNote2], 128, "%s", string);
          PlayerInfo[playerid][pNote2s] = GetPVarInt(playerid, "pNote2s");
          GetPVarString(playerid, "pNote3", string, 128);
          format(PlayerInfo[playerid][pNote3], 128, "%s", string);
          PlayerInfo[playerid][pNote3s] = GetPVarInt(playerid, "pNote3s");
          GetPVarString(playerid, "pNote4", string, 128);
          format(PlayerInfo[playerid][pNote4], 128, "%s", string);
          PlayerInfo[playerid][pNote4s] = GetPVarInt(playerid, "pNote4s");
          GetPVarString(playerid, "pNote5", string, 128);
          format(PlayerInfo[playerid][pNote5], 128, "%s", string);
          PlayerInfo[playerid][pNote5s] = GetPVarInt(playerid, "pNote5s");
          PlayerInfo[playerid][pInvWeapon] = GetPVarInt(playerid, "pInvWeapon");
          PlayerInfo[playerid][pInvAmmo] = GetPVarInt(playerid, "pInvAmmo");
          PlayerInfo[playerid][pLighter] = GetPVarInt(playerid, "pLighter");
          PlayerInfo[playerid][pCigarettes] = GetPVarInt(playerid, "pCigarettes");
          PlayerInfo[playerid][pLocked] = GetPVarInt(playerid, "pLocked");
          PlayerInfo[playerid][pKreditP1] = GetPVarInt(playerid, "pKreditP1");
          PlayerInfo[playerid][pKreditP2] = GetPVarInt(playerid, "pKreditP2");
          PlayerInfo[playerid][pKreditP3] = GetPVarInt(playerid, "pKreditP3");
          PlayerInfo[playerid][pOdignuoKredit] = GetPVarInt(playerid, "pOdignuoKredit");
          PlayerInfo[playerid][pKredit] = GetPVarInt(playerid, "pKredit");
          PlayerInfo[playerid][pKredit2] = GetPVarInt(playerid, "pKredit2");
          PlayerInfo[playerid][pKredit3] = GetPVarInt(playerid, "pKredit3");
          PlayerInfo[playerid][pGM] = GetPVarInt(playerid, "pGM");
          PlayerInfo[playerid][pGlad] = GetPVarInt(playerid, "pGlad");
          PlayerInfo[playerid][pWC] = GetPVarInt(playerid, "pWC");
     }
     return (true);
}
For update server data i don't use OnPlayerDisconnect callback i use OnPlayerUpdate
Reply
#2

I don't understand english so good :P
If i understand you, you ask do i use just .ini or i use .ini + something ?

I use just yini and i forget to put 'OnPlayerRegister' code...

pawn Код:
stock OnPlayerRegister(playerid, password[])
{
    if(IsPlayerConnected(playerid))
    {
            new Data[128], string3[128];
            format(Data, sizeof(Data), "users/%s.ini", GetName(playerid));
            if(!fexist(Data))
            {
                new INI:USER_ = INI_Open(Data);
                PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
                GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
                INI_WriteInt(USER_, "Lozinka", udb_hash(password));
                INI_WriteInt(USER_, "pLevel", PlayerInfo[playerid][pLevel]);
                INI_WriteInt(USER_, "AdminLevel", PlayerInfo[playerid][pAdmin]);
                INI_WriteInt(USER_, "DonateRank", PlayerInfo[playerid][pDonateRank]);
                INI_WriteInt(USER_, "UpgradePoints", PlayerInfo[playerid][gPupgrade]);
                INI_WriteInt(USER_, "Registered", PlayerInfo[playerid][pReg]);
                INI_WriteInt(USER_, "Sex", PlayerInfo[playerid][pSex]);
                INI_WriteInt(USER_, "Age", PlayerInfo[playerid][pAge]);
                INI_WriteInt(USER_, "Origin", PlayerInfo[playerid][pOrigin]);
                INI_WriteInt(USER_, "CK", PlayerInfo[playerid][pCK]);
                INI_WriteInt(USER_, "Muted", PlayerInfo[playerid][pMuted]);
                INI_WriteInt(USER_, "Respect", PlayerInfo[playerid][pExp]);
                INI_WriteInt(USER_, "Money", PlayerInfo[playerid][pCash]);
                INI_WriteInt(USER_, "Bank", PlayerInfo[playerid][pAccount]);
                INI_WriteInt(USER_, "Crimes", PlayerInfo[playerid][pCrimes]);
                INI_WriteInt(USER_, "Kills", PlayerInfo[playerid][pKills]);
                INI_WriteInt(USER_, "Deaths", PlayerInfo[playerid][pDeaths]);
                INI_WriteInt(USER_, "Arrested", PlayerInfo[playerid][pArrested]);
                INI_WriteInt(USER_, "WantedDeaths", PlayerInfo[playerid][pWantedDeaths]);
                INI_WriteInt(USER_, "Phonebook", PlayerInfo[playerid][pPhoneBook]);
                INI_WriteInt(USER_, "LottoNr", PlayerInfo[playerid][pLottoNr]);
                INI_WriteInt(USER_, "Fishes", PlayerInfo[playerid][pFishes]);
                INI_WriteInt(USER_, "BiggestFish", PlayerInfo[playerid][pBiggestFish]);
                INI_WriteInt(USER_, "Job", PlayerInfo[playerid][pJob]);
                INI_WriteInt(USER_, "Paycheck", PlayerInfo[playerid][Placa]);
                INI_WriteInt(USER_, "HeadValue", PlayerInfo[playerid][pHeadValue]);
                INI_WriteInt(USER_, "Jailed", PlayerInfo[playerid][pJailed]);
                INI_WriteInt(USER_, "JailTime", PlayerInfo[playerid][pJailTime]);
                INI_WriteInt(USER_, "Materials", PlayerInfo[playerid][pMats]);
                INI_WriteInt(USER_, "Drugs", PlayerInfo[playerid][pDrugs]);
                INI_WriteInt(USER_, "Leader", PlayerInfo[playerid][pLeader]);
                INI_WriteInt(USER_, "Member", PlayerInfo[playerid][pMember]);
                INI_WriteInt(USER_, "FMember", PlayerInfo[playerid][pFMember]);
                INI_WriteInt(USER_, "Rank", PlayerInfo[playerid][pRank]);
                INI_WriteInt(USER_, "Char", PlayerInfo[playerid][pChar]);
                INI_WriteInt(USER_, "ContractTime", PlayerInfo[playerid][pContractTime]);
                INI_WriteInt(USER_, "DetSkill", PlayerInfo[playerid][pDetSkill]);
                INI_WriteInt(USER_, "SexSkill", PlayerInfo[playerid][pSexSkill]);
                INI_WriteInt(USER_, "BoxSkill", PlayerInfo[playerid][pBoxSkill]);
                INI_WriteInt(USER_, "LawSkill", PlayerInfo[playerid][pLawSkill]);
                INI_WriteInt(USER_, "MechSkill", PlayerInfo[playerid][pMechSkill]);
                INI_WriteInt(USER_, "JackSkill", PlayerInfo[playerid][pJackSkill]);
                INI_WriteInt(USER_, "CarSkill", PlayerInfo[playerid][pCarSkill]);
                INI_WriteInt(USER_, "NewsSkill", PlayerInfo[playerid][pNewsSkill]);
                INI_WriteInt(USER_, "DrugsSkill", PlayerInfo[playerid][pDrugsSkill]);
                INI_WriteInt(USER_, "CookSkill", PlayerInfo[playerid][pCookSkill]);
                INI_WriteInt(USER_, "FishSkill", PlayerInfo[playerid][pFishSkill]);
                INI_WriteFloat(USER_, "pSHealth", PlayerInfo[playerid][pSHealth]);
                INI_WriteFloat(USER_, "pHealth", PlayerInfo[playerid][pHealth]);
                INI_WriteInt(USER_, "Int", PlayerInfo[playerid][pInt]);
                INI_WriteInt(USER_, "Local", PlayerInfo[playerid][pLocal]);
                INI_WriteInt(USER_, "Team", PlayerInfo[playerid][pTeam]);
                INI_WriteInt(USER_, "Model", PlayerInfo[playerid][pModel]);
                INI_WriteInt(USER_, "PhoneNr", PlayerInfo[playerid][pPnumber]);
                INI_WriteInt(USER_, "Car", PlayerInfo[playerid][pPcarkey]);
                INI_WriteInt(USER_, "Car2", PlayerInfo[playerid][pPcarkey2]);
                INI_WriteInt(USER_, "Car3", PlayerInfo[playerid][pPcarkey3]);
                INI_WriteInt(USER_, "Bizz", PlayerInfo[playerid][pPbiskey]);
                INI_WriteInt(USER_, "pKreditP1", PlayerInfo[playerid][pKreditP1]);
                INI_WriteInt(USER_, "pKreditP2", PlayerInfo[playerid][pKreditP2]);
                INI_WriteInt(USER_, "pKreditP3", PlayerInfo[playerid][pKreditP3]);
                INI_WriteInt(USER_, "Podi", PlayerInfo[playerid][pOdignuoKredit]);
                INI_WriteInt(USER_, "Kredit1", PlayerInfo[playerid][pKredit]);
                INI_WriteInt(USER_, "Kredit2", PlayerInfo[playerid][pKredit2]);
                INI_WriteInt(USER_, "Kredit3", PlayerInfo[playerid][pKredit3]);
                INI_WriteInt(USER_, "pHouseKey1", PlayerInfo[playerid][pHouseKey1]);
                INI_WriteInt(USER_, "pHouseKey2", PlayerInfo[playerid][pHouseKey2]);
                INI_WriteInt(USER_, "pHouseKey3", PlayerInfo[playerid][pHouseKey3]);
                INI_WriteInt(USER_, "pBizKey", PlayerInfo[playerid][pBizKey]);
                if((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
                {
                    PlayerInfo[playerid][pPos_x] = 1684.9;
                    PlayerInfo[playerid][pPos_y] = -2244.5;
                    PlayerInfo[playerid][pPos_z] = 13.5;
                }
                if(Spectate[playerid] != 255)
                {
                    PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
                    PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
                    PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
                    PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
                    PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
                }
                INI_WriteFloat(USER_, "Pos_x", PlayerInfo[playerid][pPos_x]);
                INI_WriteFloat(USER_, "Pos_y", PlayerInfo[playerid][pPos_y]);
                INI_WriteFloat(USER_, "Pos_z", PlayerInfo[playerid][pPos_z]);
                INI_WriteInt(USER_, "CarLic", PlayerInfo[playerid][pCarLic]);
                INI_WriteInt(USER_, "FlyLic", PlayerInfo[playerid][pFlyLic]);
                INI_WriteInt(USER_, "BoatLic", PlayerInfo[playerid][pBoatLic]);
                INI_WriteInt(USER_, "FishLic", PlayerInfo[playerid][pFishLic]);
                INI_WriteInt(USER_, "GunLic", PlayerInfo[playerid][pGunLic]);
                INI_WriteInt(USER_, "Gun1", PlayerInfo[playerid][pGun1]);
                INI_WriteInt(USER_, "Gun2", PlayerInfo[playerid][pGun2]);
                INI_WriteInt(USER_, "Gun3", PlayerInfo[playerid][pGun3]);
                INI_WriteInt(USER_, "Gun4", PlayerInfo[playerid][pGun4]);
                INI_WriteInt(USER_, "Ammo1", PlayerInfo[playerid][pAmmo1]);
                INI_WriteInt(USER_, "Ammo2", PlayerInfo[playerid][pAmmo2]);
                INI_WriteInt(USER_, "Ammo3", PlayerInfo[playerid][pAmmo3]);
                INI_WriteInt(USER_, "Ammo4", PlayerInfo[playerid][pAmmo4]);
                INI_WriteInt(USER_, "CarTime", PlayerInfo[playerid][pCarTime]);
                INI_WriteInt(USER_, "PayDay", PlayerInfo[playerid][pOnlineMin]);
                INI_WriteInt(USER_, "PayDayHad", PlayerInfo[playerid][pPayDayHad]);
                INI_WriteInt(USER_, "Crashed", PlayerInfo[playerid][pCrashed]);
                INI_WriteInt(USER_, "Wins", PlayerInfo[playerid][pWins]);
                INI_WriteInt(USER_, "Loses", PlayerInfo[playerid][pLoses]);
                INI_WriteInt(USER_, "AlcoholPerk", PlayerInfo[playerid][pAlcoholPerk]);
                INI_WriteInt(USER_, "DrugPerk", PlayerInfo[playerid][pDrugPerk]);
                INI_WriteInt(USER_, "MiserPerk", PlayerInfo[playerid][pMiserPerk]);
                INI_WriteInt(USER_, "PainPerk", PlayerInfo[playerid][pPainPerk]);
                INI_WriteInt(USER_, "TraderPerk", PlayerInfo[playerid][pTraderPerk]);
                INI_WriteInt(USER_, "pTut", PlayerInfo[playerid][pTut]);
                INI_WriteInt(USER_, "Mission", PlayerInfo[playerid][pMissionNr]);
                INI_WriteInt(USER_, "Warnings", PlayerInfo[playerid][pWarns]);
                INI_WriteInt(USER_, "VirWorld", PlayerInfo[playerid][pVirWorld]);
                INI_WriteInt(USER_, "Fuel", PlayerInfo[playerid][pFuel]);
                INI_WriteInt(USER_, "Married", PlayerInfo[playerid][pMarried]);
                INI_WriteString(USER_, "MarriedTo", PlayerInfo[playerid][pMarriedTo]);
                INI_WriteInt(USER_, "FishTool", PlayerInfo[playerid][pFishTool]);
                INI_WriteString(USER_, "Note1", PlayerInfo[playerid][pNote1]);
                INI_WriteInt(USER_, "Note1s", PlayerInfo[playerid][pNote1s]);
                INI_WriteString(USER_, "Note2", PlayerInfo[playerid][pNote2]);
                INI_WriteInt(USER_, "Note2s", PlayerInfo[playerid][pNote2s]);
                INI_WriteString(USER_, "Note3", PlayerInfo[playerid][pNote3]);
                INI_WriteInt(USER_, "Note3s", PlayerInfo[playerid][pNote3s]);
                INI_WriteString(USER_, "Note4", PlayerInfo[playerid][pNote4]);
                INI_WriteInt(USER_, "Note4s", PlayerInfo[playerid][pNote4s]);
                INI_WriteString(USER_, "Note5", PlayerInfo[playerid][pNote5]);
                INI_WriteInt(USER_, "Note5s", PlayerInfo[playerid][pNote5s]);
                INI_WriteInt(USER_, "InvWeapon", PlayerInfo[playerid][pInvWeapon]);
                INI_WriteInt(USER_, "InvAmmo", PlayerInfo[playerid][pInvAmmo]);
                INI_WriteInt(USER_, "Lighter", PlayerInfo[playerid][pLighter]);
                INI_WriteInt(USER_, "Cigarettes", PlayerInfo[playerid][pCigarettes]);
                INI_WriteInt(USER_, "Locked", PlayerInfo[playerid][pLocked]);
                INI_WriteInt(USER_, "GameMaster", PlayerInfo[playerid][pGM]);
                INI_WriteInt(USER_, "pGlad", PlayerInfo[playerid][pGlad]);
                INI_WriteInt(USER_, "pWC", PlayerInfo[playerid][pWC]);
                INI_Close(USER_);
               
                /* OSTALO */
               
                PlayerInfo[playerid][pGlad] = 100;
                PlayerInfo[playerid][pWC] = 100;

                gPlayerAccount[playerid] = 1;
                format(string3, sizeof string3, "Imate ~r~%d ~w~sekundi da ispunite stupac!", LoginRegisterTimer[playerid]);
                TextDrawSetString(TextInfoStart[playerid], string3);
                TextDrawShowForPlayer(playerid, Text:TextInfoStart[playerid]);
                TextDrawSetString(HReg[6][playerid],"~>~~r~LOGIN ~w~BRISI");
                TextDrawSetString(HRegText2[playerid], "~r~LOGIN~w~: Logiranje ~r~Brisi~w~: Brisanje unosa");
                TextDrawSetString(HReg[1][playerid], "Dobrodosli na GTX roleplay! Vase ime je registrirano u nasoj bazi molimo vas da upisete svoju lozinku:");
                TextDrawShowForPlayer(playerid, Text:HReg[6][playerid]);
                TextDrawShowForPlayer(playerid, Text:HRegText[0]);
                TextDrawShowForPlayer(playerid, Text:HRegText[1]);
                TextDrawShowForPlayer(playerid, HRegText2[playerid]);

                PlayerPlaySound(playerid, 1097, 0.0, 0.0, 0.0);
                format(string3, sizeof string3, ""#hex_plava"[SERVER]: "#hex_bjela"Dobrodosao %s na GTX Roleplay! Vasa lozinka: '%s'",GetName(playerid),password);
                SCM(playerid, string3);
                SCM(playerid, "");
                SCM(playerid, "");
                SCM(playerid, "");

                gPlayerLogged[playerid] = 1;
                checkTimer[playerid] = 0;
                TogglePlayerSpectating(playerid, 0);
                TextDrawHideForPlayer(playerid, Text:HReg[0][playerid]);
                TextDrawHideForPlayer(playerid, Text:HReg[1][playerid]);
                TextDrawHideForPlayer(playerid, Text:HReg[2][playerid]);
                TextDrawHideForPlayer(playerid, Text:HReg[3][playerid]);
                TextDrawHideForPlayer(playerid, Text:HReg[4][playerid]);
                TextDrawHideForPlayer(playerid, Text:HReg[5][playerid]);
                TextDrawHideForPlayer(playerid, Text:HReg[6][playerid]);
                TogglePlayerControllable(playerid, 1);
                TextDrawHideForPlayer(playerid, Text:TextInfoStart[playerid]);
                TextDrawHideForPlayer(playerid, Text:HRegText[0]);
                TextDrawHideForPlayer(playerid, Text:HRegText[1]);
                TextDrawHideForPlayer(playerid, HRegText2[playerid]);
                pPotrebe[playerid] = 50;
                format(string3, sizeof string3, "~w~Glad: ~g~%d ~w~WC: ~g~%d",PlayerInfo[playerid][pGlad],PlayerInfo[playerid][pWC]);
                TextDrawSetString(Text:PotrebeText[playerid],string3);
                StopMovingCamera(playerid);
                RegButon[playerid] = 0;
                RegLoginMenu[playerid] = 0;
                RegTipkaUnio[playerid] = 0;
                LoginTextPos[playerid] = 0;
                TextDrawHideForPlayer(playerid, Text:DialogMenu[0][playerid]);
                TextDrawHideForPlayer(playerid, Text:DialogMenu[1][playerid]);
                TextDrawHideForPlayer(playerid, Text:DialogMenu[2][playerid]);
                if(PlayerInfo[playerid][pReg] == 0)
                {
                     PlayerInfo[playerid][pLevel] = 1;
                     PlayerInfo[playerid][pSHealth] = 0.0;
                    PlayerInfo[playerid][pHealth] = 100;
                    PlayerInfo[playerid][pPos_x] = 536.0988;
                    PlayerInfo[playerid][pPos_y] = -1812.8470;
                    PlayerInfo[playerid][pPos_z] = 6.5713;
                    PlayerInfo[playerid][pInt] = 0;
                    PlayerInfo[playerid][pLocal] = 255;
                    PlayerInfo[playerid][pTeam] = 3;
                    PlayerInfo[playerid][pModel] = 135;
                    new randphone = 100000 + random(899999);//minimum 1000  max 9999 //giving one at the start
                    PlayerInfo[playerid][pPnumber] = randphone;
                    PlayerInfo[playerid][pPcarkey] = 999;
                    PlayerInfo[playerid][pPcarkey2] = 999;
                    PlayerInfo[playerid][pPcarkey3] = 999;
                    PlayerInfo[playerid][pAccount] = 0;
                    PlayerInfo[playerid][pReg] = 1;
                    SafeGivePlayerMoney(playerid, REGISTER_NOVAC);
                }
            }
    }
    return (true);
}
Reply
#3

I did it... I put INI_SetTag under OnPlayerRegister

pawn Код:
stock OnPlayerRegister(playerid, password[])
{
    if(IsPlayerConnected(playerid))
    {
            new Data[128], string3[128];
            format(Data, sizeof(Data), "users/%s.ini", GetName(playerid));
            if(!fexist(Data))
            {
                new INI:USER_ = INI_Open(Data);
                INI_SetTag(USER_, "GTX GAMING");
                PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
                GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
                INI_WriteInt(USER_, "Lozinka", udb_hash(password));
                INI_WriteInt(USER_, "pLevel", PlayerInfo[playerid][pLevel]);
                INI_WriteInt(USER_, "AdminLevel", PlayerInfo[playerid][pAdmin]);
                INI_WriteInt(USER_, "DonateRank", PlayerInfo[playerid][pDonateRank]);
                INI_WriteInt(USER_, "UpgradePoints", PlayerInfo[playerid][gPupgrade]);
                INI_WriteInt(USER_, "Registered", PlayerInfo[playerid][pReg]);
                INI_WriteInt(USER_, "Sex", PlayerInfo[playerid][pSex]);
                INI_WriteInt(USER_, "Age", PlayerInfo[playerid][pAge]);
                INI_WriteInt(USER_, "Origin", PlayerInfo[playerid][pOrigin]);
                INI_WriteInt(USER_, "CK", PlayerInfo[playerid][pCK]);
                INI_WriteInt(USER_, "Muted", PlayerInfo[playerid][pMuted]);
                INI_WriteInt(USER_, "Respect", PlayerInfo[playerid][pExp]);
                INI_WriteInt(USER_, "Money", PlayerInfo[playerid][pCash]);
                INI_WriteInt(USER_, "Bank", PlayerInfo[playerid][pAccount]);
                INI_WriteInt(USER_, "Crimes", PlayerInfo[playerid][pCrimes]);
                INI_WriteInt(USER_, "Kills", PlayerInfo[playerid][pKills]);
                INI_WriteInt(USER_, "Deaths", PlayerInfo[playerid][pDeaths]);
                INI_WriteInt(USER_, "Arrested", PlayerInfo[playerid][pArrested]);
                INI_WriteInt(USER_, "WantedDeaths", PlayerInfo[playerid][pWantedDeaths]);
                INI_WriteInt(USER_, "Phonebook", PlayerInfo[playerid][pPhoneBook]);
                INI_WriteInt(USER_, "LottoNr", PlayerInfo[playerid][pLottoNr]);
                INI_WriteInt(USER_, "Fishes", PlayerInfo[playerid][pFishes]);
                INI_WriteInt(USER_, "BiggestFish", PlayerInfo[playerid][pBiggestFish]);
                INI_WriteInt(USER_, "Job", PlayerInfo[playerid][pJob]);
                INI_WriteInt(USER_, "Paycheck", PlayerInfo[playerid][Placa]);
                INI_WriteInt(USER_, "HeadValue", PlayerInfo[playerid][pHeadValue]);
                INI_WriteInt(USER_, "Jailed", PlayerInfo[playerid][pJailed]);
                INI_WriteInt(USER_, "JailTime", PlayerInfo[playerid][pJailTime]);
                INI_WriteInt(USER_, "Materials", PlayerInfo[playerid][pMats]);
                INI_WriteInt(USER_, "Drugs", PlayerInfo[playerid][pDrugs]);
                INI_WriteInt(USER_, "Leader", PlayerInfo[playerid][pLeader]);
                INI_WriteInt(USER_, "Member", PlayerInfo[playerid][pMember]);
                INI_WriteInt(USER_, "FMember", PlayerInfo[playerid][pFMember]);
                INI_WriteInt(USER_, "Rank", PlayerInfo[playerid][pRank]);
                INI_WriteInt(USER_, "Char", PlayerInfo[playerid][pChar]);
                INI_WriteInt(USER_, "ContractTime", PlayerInfo[playerid][pContractTime]);
                INI_WriteInt(USER_, "DetSkill", PlayerInfo[playerid][pDetSkill]);
                INI_WriteInt(USER_, "SexSkill", PlayerInfo[playerid][pSexSkill]);
                INI_WriteInt(USER_, "BoxSkill", PlayerInfo[playerid][pBoxSkill]);
                INI_WriteInt(USER_, "LawSkill", PlayerInfo[playerid][pLawSkill]);
                INI_WriteInt(USER_, "MechSkill", PlayerInfo[playerid][pMechSkill]);
                INI_WriteInt(USER_, "JackSkill", PlayerInfo[playerid][pJackSkill]);
                INI_WriteInt(USER_, "CarSkill", PlayerInfo[playerid][pCarSkill]);
                INI_WriteInt(USER_, "NewsSkill", PlayerInfo[playerid][pNewsSkill]);
                INI_WriteInt(USER_, "DrugsSkill", PlayerInfo[playerid][pDrugsSkill]);
                INI_WriteInt(USER_, "CookSkill", PlayerInfo[playerid][pCookSkill]);
                INI_WriteInt(USER_, "FishSkill", PlayerInfo[playerid][pFishSkill]);
                INI_WriteFloat(USER_, "pSHealth", PlayerInfo[playerid][pSHealth]);
                INI_WriteFloat(USER_, "pHealth", PlayerInfo[playerid][pHealth]);
                INI_WriteInt(USER_, "Int", PlayerInfo[playerid][pInt]);
                INI_WriteInt(USER_, "Local", PlayerInfo[playerid][pLocal]);
                INI_WriteInt(USER_, "Team", PlayerInfo[playerid][pTeam]);
                INI_WriteInt(USER_, "Model", PlayerInfo[playerid][pModel]);
                INI_WriteInt(USER_, "PhoneNr", PlayerInfo[playerid][pPnumber]);
                INI_WriteInt(USER_, "Car", PlayerInfo[playerid][pPcarkey]);
                INI_WriteInt(USER_, "Car2", PlayerInfo[playerid][pPcarkey2]);
                INI_WriteInt(USER_, "Car3", PlayerInfo[playerid][pPcarkey3]);
                INI_WriteInt(USER_, "Bizz", PlayerInfo[playerid][pPbiskey]);
                INI_WriteInt(USER_, "pKreditP1", PlayerInfo[playerid][pKreditP1]);
                INI_WriteInt(USER_, "pKreditP2", PlayerInfo[playerid][pKreditP2]);
                INI_WriteInt(USER_, "pKreditP3", PlayerInfo[playerid][pKreditP3]);
                INI_WriteInt(USER_, "Podi", PlayerInfo[playerid][pOdignuoKredit]);
                INI_WriteInt(USER_, "Kredit1", PlayerInfo[playerid][pKredit]);
                INI_WriteInt(USER_, "Kredit2", PlayerInfo[playerid][pKredit2]);
                INI_WriteInt(USER_, "Kredit3", PlayerInfo[playerid][pKredit3]);
                INI_WriteInt(USER_, "pHouseKey1", PlayerInfo[playerid][pHouseKey1]);
                INI_WriteInt(USER_, "pHouseKey2", PlayerInfo[playerid][pHouseKey2]);
                INI_WriteInt(USER_, "pHouseKey3", PlayerInfo[playerid][pHouseKey3]);
                INI_WriteInt(USER_, "pBizKey", PlayerInfo[playerid][pBizKey]);
                if((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
                {
                    PlayerInfo[playerid][pPos_x] = 1684.9;
                    PlayerInfo[playerid][pPos_y] = -2244.5;
                    PlayerInfo[playerid][pPos_z] = 13.5;
                }
                if(Spectate[playerid] != 255)
                {
                    PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
                    PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
                    PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
                    PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
                    PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
                }
                INI_WriteFloat(USER_, "Pos_x", PlayerInfo[playerid][pPos_x]);
                INI_WriteFloat(USER_, "Pos_y", PlayerInfo[playerid][pPos_y]);
                INI_WriteFloat(USER_, "Pos_z", PlayerInfo[playerid][pPos_z]);
                INI_WriteInt(USER_, "CarLic", PlayerInfo[playerid][pCarLic]);
                INI_WriteInt(USER_, "FlyLic", PlayerInfo[playerid][pFlyLic]);
                INI_WriteInt(USER_, "BoatLic", PlayerInfo[playerid][pBoatLic]);
                INI_WriteInt(USER_, "FishLic", PlayerInfo[playerid][pFishLic]);
                INI_WriteInt(USER_, "GunLic", PlayerInfo[playerid][pGunLic]);
                INI_WriteInt(USER_, "Gun1", PlayerInfo[playerid][pGun1]);
                INI_WriteInt(USER_, "Gun2", PlayerInfo[playerid][pGun2]);
                INI_WriteInt(USER_, "Gun3", PlayerInfo[playerid][pGun3]);
                INI_WriteInt(USER_, "Gun4", PlayerInfo[playerid][pGun4]);
                INI_WriteInt(USER_, "Ammo1", PlayerInfo[playerid][pAmmo1]);
                INI_WriteInt(USER_, "Ammo2", PlayerInfo[playerid][pAmmo2]);
                INI_WriteInt(USER_, "Ammo3", PlayerInfo[playerid][pAmmo3]);
                INI_WriteInt(USER_, "Ammo4", PlayerInfo[playerid][pAmmo4]);
                INI_WriteInt(USER_, "CarTime", PlayerInfo[playerid][pCarTime]);
                INI_WriteInt(USER_, "PayDay", PlayerInfo[playerid][pOnlineMin]);
                INI_WriteInt(USER_, "PayDayHad", PlayerInfo[playerid][pPayDayHad]);
                INI_WriteInt(USER_, "Crashed", PlayerInfo[playerid][pCrashed]);
                INI_WriteInt(USER_, "Wins", PlayerInfo[playerid][pWins]);
                INI_WriteInt(USER_, "Loses", PlayerInfo[playerid][pLoses]);
                INI_WriteInt(USER_, "AlcoholPerk", PlayerInfo[playerid][pAlcoholPerk]);
                INI_WriteInt(USER_, "DrugPerk", PlayerInfo[playerid][pDrugPerk]);
                INI_WriteInt(USER_, "MiserPerk", PlayerInfo[playerid][pMiserPerk]);
                INI_WriteInt(USER_, "PainPerk", PlayerInfo[playerid][pPainPerk]);
                INI_WriteInt(USER_, "TraderPerk", PlayerInfo[playerid][pTraderPerk]);
                INI_WriteInt(USER_, "pTut", PlayerInfo[playerid][pTut]);
                INI_WriteInt(USER_, "Mission", PlayerInfo[playerid][pMissionNr]);
                INI_WriteInt(USER_, "Warnings", PlayerInfo[playerid][pWarns]);
                INI_WriteInt(USER_, "VirWorld", PlayerInfo[playerid][pVirWorld]);
                INI_WriteInt(USER_, "Fuel", PlayerInfo[playerid][pFuel]);
                INI_WriteInt(USER_, "Married", PlayerInfo[playerid][pMarried]);
                INI_WriteString(USER_, "MarriedTo", PlayerInfo[playerid][pMarriedTo]);
                INI_WriteInt(USER_, "FishTool", PlayerInfo[playerid][pFishTool]);
                INI_WriteString(USER_, "Note1", PlayerInfo[playerid][pNote1]);
                INI_WriteInt(USER_, "Note1s", PlayerInfo[playerid][pNote1s]);
                INI_WriteString(USER_, "Note2", PlayerInfo[playerid][pNote2]);
                INI_WriteInt(USER_, "Note2s", PlayerInfo[playerid][pNote2s]);
                INI_WriteString(USER_, "Note3", PlayerInfo[playerid][pNote3]);
                INI_WriteInt(USER_, "Note3s", PlayerInfo[playerid][pNote3s]);
                INI_WriteString(USER_, "Note4", PlayerInfo[playerid][pNote4]);
                INI_WriteInt(USER_, "Note4s", PlayerInfo[playerid][pNote4s]);
                INI_WriteString(USER_, "Note5", PlayerInfo[playerid][pNote5]);
                INI_WriteInt(USER_, "Note5s", PlayerInfo[playerid][pNote5s]);
                INI_WriteInt(USER_, "InvWeapon", PlayerInfo[playerid][pInvWeapon]);
                INI_WriteInt(USER_, "InvAmmo", PlayerInfo[playerid][pInvAmmo]);
                INI_WriteInt(USER_, "Lighter", PlayerInfo[playerid][pLighter]);
                INI_WriteInt(USER_, "Cigarettes", PlayerInfo[playerid][pCigarettes]);
                INI_WriteInt(USER_, "Locked", PlayerInfo[playerid][pLocked]);
                INI_WriteInt(USER_, "GameMaster", PlayerInfo[playerid][pGM]);
                INI_WriteInt(USER_, "pGlad", PlayerInfo[playerid][pGlad]);
                INI_WriteInt(USER_, "pWC", PlayerInfo[playerid][pWC]);
                INI_Close(USER_);
               
                /* OSTALO */
               
                PlayerInfo[playerid][pGlad] = 100;
                PlayerInfo[playerid][pWC] = 100;

                gPlayerAccount[playerid] = 1;
                format(string3, sizeof string3, "Imate ~r~%d ~w~sekundi da ispunite stupac!", LoginRegisterTimer[playerid]);
                TextDrawSetString(TextInfoStart[playerid], string3);
                TextDrawShowForPlayer(playerid, Text:TextInfoStart[playerid]);
                TextDrawSetString(HReg[6][playerid],"~>~~r~LOGIN ~w~BRISI");
                TextDrawSetString(HRegText2[playerid], "~r~LOGIN~w~: Logiranje ~r~Brisi~w~: Brisanje unosa");
                TextDrawSetString(HReg[1][playerid], "Dobrodosli na GTX roleplay! Vase ime je registrirano u nasoj bazi molimo vas da upisete svoju lozinku:");
                TextDrawShowForPlayer(playerid, Text:HReg[6][playerid]);
                TextDrawShowForPlayer(playerid, Text:HRegText[0]);
                TextDrawShowForPlayer(playerid, Text:HRegText[1]);
                TextDrawShowForPlayer(playerid, HRegText2[playerid]);

                PlayerPlaySound(playerid, 1097, 0.0, 0.0, 0.0);
                format(string3, sizeof string3, ""#hex_plava"[SERVER]: "#hex_bjela"Dobrodosao %s na GTX Roleplay! Vasa lozinka: '%s'",GetName(playerid),password);
                SCM(playerid, string3);
                SCM(playerid, "");
                SCM(playerid, "");
                SCM(playerid, "");

                gPlayerLogged[playerid] = 1;
                checkTimer[playerid] = 0;
                TogglePlayerSpectating(playerid, 0);
                TextDrawHideForPlayer(playerid, Text:HReg[0][playerid]);
                TextDrawHideForPlayer(playerid, Text:HReg[1][playerid]);
                TextDrawHideForPlayer(playerid, Text:HReg[2][playerid]);
                TextDrawHideForPlayer(playerid, Text:HReg[3][playerid]);
                TextDrawHideForPlayer(playerid, Text:HReg[4][playerid]);
                TextDrawHideForPlayer(playerid, Text:HReg[5][playerid]);
                TextDrawHideForPlayer(playerid, Text:HReg[6][playerid]);
                TogglePlayerControllable(playerid, 1);
                TextDrawHideForPlayer(playerid, Text:TextInfoStart[playerid]);
                TextDrawHideForPlayer(playerid, Text:HRegText[0]);
                TextDrawHideForPlayer(playerid, Text:HRegText[1]);
                TextDrawHideForPlayer(playerid, HRegText2[playerid]);
                pPotrebe[playerid] = 50;
                format(string3, sizeof string3, "~w~Glad: ~g~%d ~w~WC: ~g~%d",PlayerInfo[playerid][pGlad],PlayerInfo[playerid][pWC]);
                TextDrawSetString(Text:PotrebeText[playerid],string3);
                StopMovingCamera(playerid);
                RegButon[playerid] = 0;
                RegLoginMenu[playerid] = 0;
                RegTipkaUnio[playerid] = 0;
                LoginTextPos[playerid] = 0;
                TextDrawHideForPlayer(playerid, Text:DialogMenu[0][playerid]);
                TextDrawHideForPlayer(playerid, Text:DialogMenu[1][playerid]);
                TextDrawHideForPlayer(playerid, Text:DialogMenu[2][playerid]);
                if(PlayerInfo[playerid][pReg] == 0)
                {
                     PlayerInfo[playerid][pLevel] = 1;
                     PlayerInfo[playerid][pSHealth] = 0.0;
                    PlayerInfo[playerid][pHealth] = 100;
                    PlayerInfo[playerid][pPos_x] = 536.0988;
                    PlayerInfo[playerid][pPos_y] = -1812.8470;
                    PlayerInfo[playerid][pPos_z] = 6.5713;
                    PlayerInfo[playerid][pInt] = 0;
                    PlayerInfo[playerid][pLocal] = 255;
                    PlayerInfo[playerid][pTeam] = 3;
                    PlayerInfo[playerid][pModel] = 135;
                    new randphone = 100000 + random(899999);//minimum 1000  max 9999 //giving one at the start
                    PlayerInfo[playerid][pPnumber] = randphone;
                    PlayerInfo[playerid][pPcarkey] = 999;
                    PlayerInfo[playerid][pPcarkey2] = 999;
                    PlayerInfo[playerid][pPcarkey3] = 999;
                    PlayerInfo[playerid][pAccount] = 0;
                    PlayerInfo[playerid][pReg] = 1;
                    SafeGivePlayerMoney(playerid, REGISTER_NOVAC);
                }
            }
    }
    return (true);
}
And i delete my account from scriptfiles i was register again.... When i watch tutorial and logout from server connect again and when i log in i must watch tutorial again my stats are again on '0'
Reply
#4

Maybe you didn't see.... I don't use OnPlayerDisconnect for update stats, i use OnPlayerUpdate, maybe is problem there? idk
Reply
#5

Yeah i know.... Do you have any suggestion how to do that? I don't love use OnPlayerDisconnect for update stats because if server get crashed all new data are lost. Maybe timer with 2 minutes?
Reply
#6

How i can fix problem with reseting account stats?
Reply
#7

Stop bumping. Solution to save scores in case of server crash is to save all player's data OnGameModeExit
Reply
#8

i don't look for 'how to save stats'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)