[Ajuda] Passa pra DOF2 =)
#1

Como passo para DOF2? Eu usei o converte mais nгo converteu, porque ele sу converte as funзхes e essas parada ai, oque eu sei й que passei o SalvarPlayer para DOF2, Blz estб salvando normalmente, mais na hora de carregar nгo, alguem pode passa isso ai pra dof2?

PHP код:
public CarregarPlayer(playerid)
{
    new 
file[128];
    
format(filesizeof(file), OpenAccPlayerPlayerName(playerid));
                new 
key128 ] , val128 ], Data128 ];
                new 
FileUserFile fopen(fileio_read);
                if ( 
UserFile )
                {
                    while ( 
freadUserFile Data sizeofData ) ) )
                    {
                        
key ini_GetKeyData );
                        if( 
strcmpkey "Level" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pLevel] = strvalval ); }
                        if( 
strcmpkey "Respeito" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pExp] = strvalval ); }
                        if( 
strcmpkey "Online" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pOnline] = strvalval ); }
                        if( 
strcmpkey "AdminLevel" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pAdmin] = strvalval ); }
                        if( 
strcmpkey "HelpLevel" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pHelper] = strvalval ); }
                        if( 
strcmpkey "Funcao" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pFuncao] = strvalval ); }
                        if( 
strcmpkey "Cash" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][tCash] = strvalval ); }
                        if( 
strcmpkey "DonateRank" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pVIP] = strvalval ); }
                        if( 
strcmpkey "UpgradePoints" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][gPupgrade] = strvalval ); }
                        if( 
strcmpkey "ConnectedTime" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pConnectTime] = strvalval ); }
                        if( 
strcmpkey "Registrado" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pReg] = strvalval ); }
                        if( 
strcmpkey "Sex" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pSex] = strvalval ); }
                        if( 
strcmpkey "Money" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pCash] = strvalval ); }
                        if( 
strcmpkey "Bank" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pConta] = strvalval ); }
                        if( 
strcmpkey "Crimes" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pCrimes] = strvalval ); }
                        if( 
strcmpkey "Kills" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pKills] = strvalval ); }
                        if( 
strcmpkey "Deaths" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pDeaths] = strvalval ); }
                        if( 
strcmpkey "Phonebook" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pPhoneBook] = strvalval ); }
                        if( 
strcmpkey "LottoNr" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pLottoNr] = strvalval ); }
                        if( 
strcmpkey "Fishes" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pFishes] = strvalval ); }
                        if( 
strcmpkey "BiggestFish" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pBiggestFish] = strvalval ); }
                        if( 
strcmpkey "Emprego" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pEmprego] = strvalval ); }
                        if( 
strcmpkey "Paycheck" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pSalario] = strvalval ); }
                        if( 
strcmpkey "HeadValue" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pHeadValue] = strvalval ); }
                        if( 
strcmpkey "Jailed" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pJailed] = strvalval ); }
                        if( 
strcmpkey "JailTime" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pJailTime] = strvalval ); }
                        if( 
strcmpkey "Materiais" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pMats] = strvalval ); }
                        if( 
strcmpkey "Maconha" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pDrogas] = strvalval ); }
                        if( 
strcmpkey "Cocaina" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pDrogas2] = strvalval ); }
                        if( 
strcmpkey "LSD" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pDrogas3] = strvalval ); }
                        if( 
strcmpkey "Lider" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pLider] = strvalval ); }
                        if( 
strcmpkey "FamyLider" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pFamyLider] = strvalval ); }
                        if( 
strcmpkey "Member" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pMembro] = strvalval ); }
                        if( 
strcmpkey "MemberF" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pFamyMember] = strvalval ); }
                        if( 
strcmpkey "Rank" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pCargo] = strvalval ); }
                        if( 
strcmpkey "Char" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pSkin] = strvalval ); }
                        if( 
strcmpkey "ContractTime" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pContractTime] = strvalval ); }
                        if( 
strcmpkey "DetSkill" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pDetSkill] = strvalval ); }
                        if( 
strcmpkey "SexSkill" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pSexSkill] = strvalval ); }
                        if( 
strcmpkey "BoxSkill" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pBoxSkill] = strvalval ); }
                        if( 
strcmpkey "LawSkill" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pLawSkill] = strvalval ); }
                        if( 
strcmpkey "MechSkill" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pMechSkill] = strvalval ); }
                        if( 
strcmpkey "NewsSkill" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pNewsSkill] = strvalval ); }
                        if( 
strcmpkey "DrogasSkill" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pDrogasSkill] = strvalval ); }
                        if( 
strcmpkey "CookSkill" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pCookSkill] = strvalval ); }
                        if( 
strcmpkey "FishSkill" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pFishSkill] = strvalval ); }
                        if( 
strcmpkey "pSHealth" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pSHealth] = floatstrval ); }
                        if( 
strcmpkey "Team" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pTeam] = strvalval ); }
                        if( 
strcmpkey "PhoneNr" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pPnumber] = strvalval ); }
                        if( 
strcmpkey "House" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pPHousekey] = strvalval ); }
                        if( 
strcmpkey "Bizz" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pPbiskey] = strvalval ); }
                        if( 
strcmpkey "CarLic" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pCarLic] = strvalval ); }
                        if( 
strcmpkey "FlyLic" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pFlyLic] = strvalval ); }
                        if( 
strcmpkey "BoatLic" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pBoatLic] = strvalval ); }
                        if( 
strcmpkey "FishLic" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pFishLic] = strvalval ); }
                        if( 
strcmpkey "GunLic" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pGunLic] = strvalval ); }
                        if( 
strcmpkey "PayDay" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pPayDay] = strvalval ); }
                        if( 
strcmpkey "CDPlayer" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pCDPlayer] = strvalval ); }
                        if( 
strcmpkey "ItemCash1" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pItemCash1] = strvalval ); }
                        if( 
strcmpkey "Wins" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pWins] = strvalval ); }
                        if( 
strcmpkey "Loses" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pLoses] = strvalval ); }
                        if( 
strcmpkey "AlcoholPerk" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pAlcoholPerk] = strvalval ); }
                        if( 
strcmpkey "DrugPerk" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pDrugPerk] = strvalval ); }
                        if( 
strcmpkey "MiserPerk" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pMiserPerk] = strvalval ); }
                        if( 
strcmpkey "PainPerk" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pPainPerk] = strvalval ); }
                        if( 
strcmpkey "TraderPerk" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pTraderPerk] = strvalval ); }
                        if( 
strcmpkey "pTut" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pTut] = strvalval ); }
                        if( 
strcmpkey "Avisos" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pWarns] = strvalval ); }
                        if( 
strcmpkey "Married" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pMarried] = strvalval ); }
                        if( 
strcmpkey "Spawn" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pSpawn] = strvalval ); }
                        if( 
strcmpkey "SafeMaconha" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pSafeDrogas] = strvalval ); }
                        if( 
strcmpkey "SafeCocaina" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pSafeDrogas2] = strvalval ); }
                        if( 
strcmpkey "SafeLSD" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pSafeDrogas3] = strvalval ); }
                        if( 
strcmpkey "NivelProcurado" true ) == ) { val ini_GetValueData ); WantedPoints[playerid] = strvalval ); }
                        if( 
strcmpkey "SafeMateriais" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][psMats] = strvalval ); }
                        if( 
strcmpkey "Luta" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pLuta] = strvalval ); }
                        if( 
strcmpkey "Dorgado" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pDorgado] = strvalval ); }
                        if( 
strcmpkey "Dorgado2" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pDorgado2] = strvalval ); }
                        if( 
strcmpkey "Doenca" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pDoenca] = strvalval ); }
                        if( 
strcmpkey "HoraLogin" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pLastHora] = strvalval ); }
                        if( 
strcmpkey "MinutoLogin" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pLastMinuto] = strvalval ); }
                        if( 
strcmpkey "SegundoLogin" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pLastSegundo] = strvalval ); }
                        if( 
strcmpkey "DiaLogin" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pLastDia] = strvalval ); }
                        if( 
strcmpkey "MesLogin" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pLastMes] = strvalval ); }
                        if( 
strcmpkey "AnoLogin" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pLastAno] = strvalval ); }
                        if( 
strcmpkey "Votei" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pVotou] = strvalval ); }
                        if( 
strcmpkey "Hospital" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pHosp] = strvalval ); }
                        if( 
strcmpkey "HospitalTime" true ) == ) { val ini_GetValueData ); PlayerInfo[playerid][pHospTime] = strvalval ); }
                        if( 
strcmpkey "MarriedTo" true ) == ) { val ini_GetValueData ); strmid(PlayerInfo[playerid][pMarriedTo], val0strlen(val)-1255); }
                    }
//end while
                    
fclose(UserFile);//close the file after everything has been read in the while
                
}
    return 
1;

Reply
#2

eu nem sei usar dof2 tou procurando um tutorial mas n acho .-.
Reply
#3

Veja se isso te ajuda
Sу terminar de fazer ai...
Se tiver algum valor float й sу usar DOF2_GetFloat
Й sу olhar as natives da include DOF2

PHP код:
public CarregarPlayer(playerid)
{
    new 
file[128];
    
format(filesizeof(file), OpenAccPlayerPlayerName(playerid));
    if(
DOF2_FileExists(file))
    {
        
PlayerInfo[playerid][pLevel] = DOF2_GetInt(file,"Level");
        
PlayerInfo[playerid][pExp] = DOF2_GetInt(file,"Respeito");
    }

Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)