[YINI] How would I load this...
#6

All load code(Didn't think you would need it..):
pawn Код:
function LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Deposit",PlayerInfo[playerid][pDeposit]);
    INI_Int("PayDay",PlayerInfo[playerid][pPayDay]);
    INI_Int("PayCheck",PlayerInfo[playerid][pPayCheck]);
    INI_Int("ConnectTime",PlayerInfo[playerid][pConnectTime]);
    INI_Int("WRestricted",PlayerInfo[playerid][pWRestricted]);
    INI_Int("Age",PlayerInfo[playerid][pAge]);
    INI_Int("Sex",PlayerInfo[playerid][pSex]);
    INI_Int("Level",PlayerInfo[playerid][pLevel]);
    INI_Int("Number",PlayerInfo[playerid][pNumber]);
    INI_Int("SpeakerPhone",PlayerInfo[playerid][pSpeakerPhone]);
    INI_Int("PB",PlayerInfo[playerid][pPB]);
    INI_Int("PhonePrivacy",PlayerInfo[playerid][pPhonePrivacy]);
    INI_Int("JobID",PlayerInfo[playerid][pJobID]);
    INI_Int("Skin",PlayerInfo[playerid][pSkin]);
    INI_Int("Team",PlayerInfo[playerid][pTeam]);
    INI_Int("Accent",PlayerInfo[playerid][pAccent]);
    INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Int("Helper",PlayerInfo[playerid][pHelper]);
    INI_Int("DutyHours",PlayerInfo[playerid][pDutyHours]);
    INI_Int("AcceptedHelp",PlayerInfo[playerid][pAcceptedHelp]);
    INI_Int("Spectate",PlayerInfo[playerid][pSpectate]);
    INI_Int("Banned",PlayerInfo[playerid][pBanned]);
    INI_Int("Muted",PlayerInfo[playerid][pMuted]);
    INI_Int("ReportMuted",PlayerInfo[playerid][pReportMuted]);
    INI_Int("Exp",PlayerInfo[playerid][pExp]);
    INI_Int("Vip",PlayerInfo[playerid][pVip]);
    INI_Int("VMuted",PlayerInfo[playerid][pVMuted]);
    INI_Int("Jailed",PlayerInfo[playerid][pJailed]);
    INI_Int("JailTime",PlayerInfo[playerid][pJailTime]);
    INI_String("PrisonReason",PlayerInfo[playerid][pPrisonReason], 128);
    INI_String("Prisonedby",PlayerInfo[playerid][pPrisonedby], 32);
    INI_Int("ToggedVIPChat",PlayerInfo[playerid][pToggedVIPChat]);
    INI_Int("Warns",PlayerInfo[playerid][pWarns]);
    INI_Int("GangWarn",PlayerInfo[playerid][pGangWarn]);
    INI_Float("Pos_x",PlayerInfo[playerid][pPos_x]);
    INI_Float("Pos_y",PlayerInfo[playerid][pPos_y]);
    INI_Float("Pos_z",PlayerInfo[playerid][pPos_z]);
    INI_Float("Pos_a",PlayerInfo[playerid][pPos_a]);
    INI_Float("Health",PlayerInfo[playerid][pHealth]);
    INI_Float("Armor",PlayerInfo[playerid][pArmor]);
    INI_Int("Materials",PlayerInfo[playerid][pMaterials]);
    INI_Int("Cocaine",PlayerInfo[playerid][pCocaine]);
    INI_Int("Packages",PlayerInfo[playerid][pPackages]);
    INI_Int("INT",PlayerInfo[playerid][pINT]);
    INI_Int("VW",PlayerInfo[playerid][pVW]);
    INI_Int("Dice",PlayerInfo[playerid][pDice]);
    INI_Int("Weapon1",PlayerInfo[playerid][pWeapon][1]);
    INI_Int("Weapon1a",PlayerInfo[playerid][pWeapona][1]);
    INI_Int("Weapon2",PlayerInfo[playerid][pWeapon][2]);
    INI_Int("Weapon2a",PlayerInfo[playerid][pWeapona][2]);
    INI_Int("Weapon3",PlayerInfo[playerid][pWeapon][3]);
    INI_Int("Weapon3a",PlayerInfo[playerid][pWeapona][3]);
    INI_Int("Weapon4",PlayerInfo[playerid][pWeapon][4]);
    INI_Int("Weapon4a",PlayerInfo[playerid][pWeapona][4]);
    INI_Int("Weapon5",PlayerInfo[playerid][pWeapon][5]);
    INI_Int("Weapon5a",PlayerInfo[playerid][pWeapona][5]);
    INI_Int("Weapon6",PlayerInfo[playerid][pWeapon][6]);
    INI_Int("Weapon6a",PlayerInfo[playerid][pWeapona][6]);
    INI_Int("Weapon7",PlayerInfo[playerid][pWeapon][7]);
    INI_Int("Weapon7a",PlayerInfo[playerid][pWeapona][7]);
    INI_Int("Weapon8",PlayerInfo[playerid][pWeapon][8]);
    INI_Int("Weapon8a",PlayerInfo[playerid][pWeapona][8]);
    INI_Int("Weapon9",PlayerInfo[playerid][pWeapon][9]);
    INI_Int("Weapon9a",PlayerInfo[playerid][pWeapona][9]);
    INI_Int("Weapon10",PlayerInfo[playerid][pWeapon][10]);
    INI_Int("Weapon10a",PlayerInfo[playerid][pWeapona][10]);
    INI_Int("Weapon11",PlayerInfo[playerid][pWeapon][11]);
    INI_Int("Weapon11a",PlayerInfo[playerid][pWeapona][11]);
    INI_String("KillLog0",PlayerInfo[playerid][pKillLog0], 256);
    INI_String("KillLog1",PlayerInfo[playerid][pKillLog1], 256);
    INI_String("KillLog2",PlayerInfo[playerid][pKillLog2], 256);
    INI_String("KillLog3",PlayerInfo[playerid][pKillLog3], 256);
    INI_String("KillLog4",PlayerInfo[playerid][pKillLog4], 256);
    INI_String("KillLog5",PlayerInfo[playerid][pKillLog5], 256);
    INI_String("KillLog6",PlayerInfo[playerid][pKillLog6], 256);
    INI_String("KillLog7",PlayerInfo[playerid][pKillLog7], 256);
    INI_String("KillLog8",PlayerInfo[playerid][pKillLog8], 256);
    INI_String("KillLog9",PlayerInfo[playerid][pKillLog9], 256);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Int("Faction",PlayerInfo[playerid][pFaction]);
    INI_Int("FMember",PlayerInfo[playerid][pFMember]);
    INI_Int("Rank",PlayerInfo[playerid][pRank]);
    INI_Int("Leader",PlayerInfo[playerid][pLeader]);
    INI_Int("Married",PlayerInfo[playerid][pMarried]);
    INI_String("MarriedTo",PlayerInfo[playerid][pMarriedTo], 128);
    INI_Int("Duty",PlayerInfo[playerid][pDuty]);
    INI_Int("JobDuty",PlayerInfo[playerid][pJobDuty]);
    INI_Int("Crimes",PlayerInfo[playerid][pCrimes]);
    INI_Int("WantedLevel",PlayerInfo[playerid][pWantedLevel]);
    INI_Int("Radio",PlayerInfo[playerid][pRadio]);
    INI_Int("RadioFreq",PlayerInfo[playerid][pRadioFreq]);
    INI_Int("Spam",PlayerInfo[playerid][pSpam]);
    INI_Int("Dashboard",PlayerInfo[playerid][pDashboard]);
    INI_Int("RobHouse",PlayerInfo[playerid][pRobHouse]);
    INI_Int("HSpawn",PlayerInfo[playerid][pHSpawn]);
    INI_Float("HSpawnX",PlayerInfo[playerid][pHSpawnX]);
    INI_Float("HSpawnY",PlayerInfo[playerid][pHSpawnY]);
    INI_Float("HSpawnZ",PlayerInfo[playerid][pHSpawnZ]);
    INI_Int("HSpawnInt",PlayerInfo[playerid][pHSpawnInt]);
    INI_Int("HSpawnVW",PlayerInfo[playerid][pHSpawnVW]);
    INI_Int("RequestingBackup",PlayerInfo[playerid][pRequestingBackup]);
    INI_Int("AttendingBackupCall",PlayerInfo[playerid][pAttendingBackupCall]);
    INI_Int("Bugged",PlayerInfo[playerid][pBugged]);
    INI_Int("HeadValue",PlayerInfo[playerid][pHeadValue]);
    INI_String("ContractBy",PlayerInfo[playerid][pContractBy], 32);
    INI_String("ContractDetail",PlayerInfo[playerid][pContractDetail], 64);
    INI_Int("C4Used",PlayerInfo[playerid][pC4Used]);
    INI_Int("C4",PlayerInfo[playerid][pC4]);
    INI_Int("Bombs",PlayerInfo[playerid][pBombs]);
    INI_Int("CHits",PlayerInfo[playerid][pCHits]);
    INI_Int("FHits",PlayerInfo[playerid][pFHits]);
    INI_Int("AcceptReport",PlayerInfo[playerid][pAcceptReport]);
    INI_Int("TrashReport",PlayerInfo[playerid][pTrashReport]);
    INI_Int("Spraycan",PlayerInfo[playerid][pSpraycan]);
    INI_Int("Boombox",PlayerInfo[playerid][pBoombox]);
    INI_Int("Lock",PlayerInfo[playerid][pLock]);
    INI_Int("LockCar",PlayerInfo[playerid][pLockCar]);
    INI_Int("Sprunk",PlayerInfo[playerid][pSprunk]);
    INI_Int("Cigar",PlayerInfo[playerid][pCigar]);
    INI_Int("Insurance",PlayerInfo[playerid][pInsurance]);
    INI_Int("NMute",PlayerInfo[playerid][pNMute]);
    INI_Int("NMuteTotal",PlayerInfo[playerid][pNMuteTotal]);
    INI_Int("ADMute",PlayerInfo[playerid][pADMute]);
    INI_Int("ADMuteTotal",PlayerInfo[playerid][pADMuteTotal]);
    INI_String("Tempname",PlayerInfo[playerid][pTempname], 64);
    INI_String("Flag",PlayerInfo[playerid][pFlag], 128);
    INI_String("IP",PlayerInfo[playerid][pIP], 32);

    for(new v = 0; v < MAX_PLAYERVEHICLES; v++) // Doesnt load
    {
        new var[1240];
        format(var, 32, "v%dPosX", v);
        INI_Float(var,PlayerVehicleInfo[playerid][v][vPosX]);
        if(!strcmp(name, var)) { PlayerVehicleInfo[playerid][v][vPosX] = strval(value); } // Tried to see if that would work.. But it doesnt.
        format(var, 32, "v%dPosY", v);
        INI_Float(var,PlayerVehicleInfo[playerid][v][vPosY]);
        if(!strcmp(name, var)) { PlayerVehicleInfo[playerid][v][vPosY] = strval(value); }
        format(var, 32, "v%dPosZ", v);
        INI_Float(var,PlayerVehicleInfo[playerid][v][vPosZ]);
        if(!strcmp(name, var)) { PlayerVehicleInfo[playerid][v][vPosZ] = strval(value); }
        format(var, 32, "v%dPosAngle", v);
        INI_Float(var,PlayerVehicleInfo[playerid][v][vPosAngle]);
        if(!strcmp(name, var)) { PlayerVehicleInfo[playerid][v][vPosAngle] = strval(value); }
        format(var, 32, "v%dModelId", v);
        INI_Int(var,PlayerVehicleInfo[playerid][v][vModelId]);
        if(!strcmp(name, var)) { PlayerVehicleInfo[playerid][v][vModelId] = strval(value); }
        format(var, 32, "v%dLock", v);
        INI_Int(var,PlayerVehicleInfo[playerid][v][vLock]);
        if(!strcmp(name, var)) { PlayerVehicleInfo[playerid][v][vLock] = strval(value); }
    }
    return 1;
}
Also what do you mean by where do I set the tags? I only use:
pawn Код:
INI_SetTag(File,"vehicles");
On the saving function.. Does that mean I need it for loading as well?
Reply


Messages In This Thread
[YINI] How would I load this... - by ryansheilds - 21.04.2012, 21:06
Re: [YINI] How would I load this... - by Face9000 - 22.04.2012, 18:46
Re: [YINI] How would I load this... - by IceCube! - 22.04.2012, 18:48
Re: [YINI] How would I load this... - by ryansheilds - 22.04.2012, 20:00
Re: [YINI] How would I load this... - by ryansheilds - 22.04.2012, 21:07
Re: [YINI] How would I load this... - by ryansheilds - 22.04.2012, 21:18
Re: [YINI] How would I load this... - by ryansheilds - 22.04.2012, 21:51

Forum Jump:


Users browsing this thread: 1 Guest(s)