[Ajuda] Dini pra DOF2 = Deu merda =(
#1

Converti meu gamemode pra DOF2, Sendo que quando eu me registro e saiu do servidor sу salva as contas, mais se eu logar no servidor ai salva as paradas, podem me ajuda

OBS: GM Й Gf

http://imgur.com/a/NhIzC
Reply
#2

Manda as principais variбveis do seu sistema de login/regis
Reply
#3

Quote:
Originally Posted by DarkBr
Посмотреть сообщение
Manda as principais variбveis do seu sistema de login/regis
Essa aqui й a base de tudo, oque faz salvar o player, ai ta em dini, mais nгo salva quando eu passo pra DOF2, Me ajude ai

PHP код:
public SalvarPlayer(playerid)
{
    if(
gPlayerLogged[playerid])
    {
        new 
file[128];
        
format(filesizeof(file), OpenAccPlayerPlayerName(playerid));
            if(!
dini_Exists(file))
            {
                
dini_Create(file);
            }
            new 
FilehFile fopen(fileio_write);
            if (
hFile)
            {
                new var[
64];
                
PlayerInfo[playerid][pCash] = GetGranaTheus(playerid);
                
//dini_Set(file, "Key", PlayerInfo[playerid][pKey]);
                
format(var, 64"Key=%s\n",PlayerInfo[playerid][pKey]);fwrite(hFile, var);
                
format(var, 64"Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
                
format(var, 64"Funcao=%s\n",PlayerInfo[playerid][pFuncao]);fwrite(hFile, var);
                
format(var, 64"AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
                
format(var, 64"HelpLevel=%d\n",PlayerInfo[playerid][pHelper]);fwrite(hFile, var);
                
format(var, 64"Cash=%d\n",PlayerInfo[playerid][tCash]);fwrite(hFile, var);
                
format(var, 64"DonateRank=%d\n",PlayerInfo[playerid][pVIP]);fwrite(hFile, var);
                
format(var, 64"UpgradePoints=%d\n",PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
                
format(var, 64"ConnectedTime=%d\n",PlayerInfo[playerid][pConnectTime]);fwrite(hFile, var);
                
format(var, 64"Registrado=%d\n",PlayerInfo[playerid][pReg]);fwrite(hFile, var);
                
format(var, 64"Sex=%d\n",PlayerInfo[playerid][pSex]);fwrite(hFile, var);
                
format(var, 64"Respeito=%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
                
format(var, 64"Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
                
format(var, 64"Bank=%d\n",PlayerInfo[playerid][pConta]);fwrite(hFile, var);
                
format(var, 64"Crimes=%d\n",PlayerInfo[playerid][pCrimes]);fwrite(hFile, var);
                
format(var, 64"Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
                
format(var, 64"Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
                
format(var, 64"Phonebook=%d\n",PlayerInfo[playerid][pPhoneBook]);fwrite(hFile, var);
                
format(var, 64"LottoNr=%d\n",PlayerInfo[playerid][pLottoNr]);fwrite(hFile, var);
                
format(var, 64"Fishes=%d\n",PlayerInfo[playerid][pFishes]);fwrite(hFile, var);
                
format(var, 64"BiggestFish=%d\n",PlayerInfo[playerid][pBiggestFish]);fwrite(hFile, var);
                
format(var, 64"Emprego=%d\n",PlayerInfo[playerid][pEmprego]);fwrite(hFile, var);
                
format(var, 64"Paycheck=%d\n",PlayerInfo[playerid][pSalario]);fwrite(hFile, var);
                
format(var, 64"HeadValue=%d\n",PlayerInfo[playerid][pHeadValue]);fwrite(hFile, var);
                
format(var, 64"Jailed=%d\n",PlayerInfo[playerid][pJailed]);fwrite(hFile, var);
                
format(var, 64"JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
                
format(var, 64"Materiais=%d\n",PlayerInfo[playerid][pMats]);fwrite(hFile, var);
                
format(var, 64"Maconha=%d\n",PlayerInfo[playerid][pDrogas]);fwrite(hFile, var);
                
format(var, 64"Cocaina=%d\n",PlayerInfo[playerid][pDrogas2]);fwrite(hFile, var);
                
format(var, 64"LSD=%d\n",PlayerInfo[playerid][pDrogas3]);fwrite(hFile, var);
                
format(var, 64"Lider=%d\n",PlayerInfo[playerid][pLider]);fwrite(hFile, var);
                
format(var, 64"Chefe=%d\n",PlayerInfo[playerid][pChefe]);fwrite(hFile, var);
                
format(var, 64"FamyLider=%d\n",PlayerInfo[playerid][pFamyLider]);fwrite(hFile, var);
                
format(var, 64"Member=%d\n",PlayerInfo[playerid][pMembro]);fwrite(hFile, var);
                
format(var, 64"Funcionario=%d\n",PlayerInfo[playerid][pFuncionario]);fwrite(hFile, var);
                
format(var, 64"MemberF=%d\n",PlayerInfo[playerid][pFamyMember]);fwrite(hFile, var);
                
format(var, 64"Rank=%d\n",PlayerInfo[playerid][pCargo]);fwrite(hFile, var);
                
format(var, 64"Char=%d\n",PlayerInfo[playerid][pSkin]);fwrite(hFile, var);
                
format(var, 64"ContractTime=%d\n",PlayerInfo[playerid][pContractTime]);fwrite(hFile, var);
                
format(var, 64"DetSkill=%d\n",PlayerInfo[playerid][pDetSkill]);fwrite(hFile, var);
                
format(var, 64"SexSkill=%d\n",PlayerInfo[playerid][pSexSkill]);fwrite(hFile, var);
                
format(var, 64"BoxSkill=%d\n",PlayerInfo[playerid][pBoxSkill]);fwrite(hFile, var);
                
format(var, 64"LawSkill=%d\n",PlayerInfo[playerid][pLawSkill]);fwrite(hFile, var);
                
format(var, 64"MechSkill=%d\n",PlayerInfo[playerid][pMechSkill]);fwrite(hFile, var);
                
format(var, 64"NewsSkill=%d\n",PlayerInfo[playerid][pNewsSkill]);fwrite(hFile, var);
                
format(var, 64"DrogasSkill=%d\n",PlayerInfo[playerid][pDrogasSkill]);fwrite(hFile, var);
                
format(var, 64"CookSkill=%d\n",PlayerInfo[playerid][pCookSkill]);fwrite(hFile, var);
                
format(var, 64"FishSkill=%d\n",PlayerInfo[playerid][pFishSkill]);fwrite(hFile, var);
                
format(var, 64"pSHealth=%.1f\n",PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
                
format(var, 64"Team=%d\n",PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
                
format(var, 64"PhoneNr=%d\n",PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
                
format(var, 64"House=%d\n",PlayerInfo[playerid][pPHousekey]);fwrite(hFile, var);
                
format(var, 64"Bizz=%d\n",PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
                
format(var, 64"Spawn=%d\n",PlayerInfo[playerid][pSpawn]);fwrite(hFile, var);
                
format(var, 64"SafeMaconha=%d\n",PlayerInfo[playerid][pSafeDrogas]);fwrite(hFile, var);
                
format(var, 64"SafeCocaina=%d\n",PlayerInfo[playerid][pSafeDrogas2]);fwrite(hFile, var);
                
format(var, 64"SafeLSD=%d\n",PlayerInfo[playerid][pSafeDrogas3]);fwrite(hFile, var);
                
format(var, 64"NivelProcurado=%d\n",WantedPoints[playerid]);fwrite(hFile, var);
                
format(var, 64"SafeMateriais=%d\n",PlayerInfo[playerid][psMats]);fwrite(hFile, var);
                
format(var, 64"CarLic=%d\n",PlayerInfo[playerid][pCarLic]);fwrite(hFile, var);
                
format(var, 64"FlyLic=%d\n",PlayerInfo[playerid][pFlyLic]);fwrite(hFile, var);
                
format(var, 64"BoatLic=%d\n",PlayerInfo[playerid][pBoatLic]);fwrite(hFile, var);
                
format(var, 64"FishLic=%d\n",PlayerInfo[playerid][pFishLic]);fwrite(hFile, var);
                
format(var, 64"GunLic=%d\n",PlayerInfo[playerid][pGunLic]);fwrite(hFile, var);
                
format(var, 64"PayDay=%d\n",PlayerInfo[playerid][pPayDay]);fwrite(hFile, var);
                
format(var, 64"CDPlayer=%d\n",PlayerInfo[playerid][pCDPlayer]);fwrite(hFile, var);
                
format(var, 64"ItemCash1=%d\n",PlayerInfo[playerid][pItemCash1]);fwrite(hFile, var);
                
format(var, 64"Wins=%d\n",PlayerInfo[playerid][pWins]);fwrite(hFile, var);
                
format(var, 64"Loses=%d\n",PlayerInfo[playerid][pLoses]);fwrite(hFile, var);
                
format(var, 64"AlcoholPerk=%d\n",PlayerInfo[playerid][pAlcoholPerk]);fwrite(hFile, var);
                
format(var, 64"DrugPerk=%d\n",PlayerInfo[playerid][pDrugPerk]);fwrite(hFile, var);
                
format(var, 64"MiserPerk=%d\n",PlayerInfo[playerid][pMiserPerk]);fwrite(hFile, var);
                
format(var, 64"PainPerk=%d\n",PlayerInfo[playerid][pPainPerk]);fwrite(hFile, var);
                
format(var, 64"TraderPerk=%d\n",PlayerInfo[playerid][pTraderPerk]);fwrite(hFile, var);
                
format(var, 64"Play=%d\n",PlayerInfo[playerid][pTut]);fwrite(hFile, var);
                
format(var, 64"Avisos=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
                
format(var, 64"Married=%d\n",PlayerInfo[playerid][pMarried]);fwrite(hFile, var);
                
format(var, 64"Luta=%d\n",PlayerInfo[playerid][pLuta]);fwrite(hFile, var);
                
format(var, 64"Dorgado=%d\n",PlayerInfo[playerid][pDorgado]);fwrite(hFile, var);
                
format(var, 64"Dorgado2=%d\n",PlayerInfo[playerid][pDorgado]);fwrite(hFile, var);
                
format(var, 64"Doenca=%d\n",PlayerInfo[playerid][pDoenca]);fwrite(hFile, var);
                
format(var, 64"DiaLogin=%d\n",PlayerInfo[playerid][pLastDia]);fwrite(hFile, var);
                
format(var, 64"MesLogin=%d\n",PlayerInfo[playerid][pLastMes]);fwrite(hFile, var);
                
format(var, 64"AnoLogin=%d\n",PlayerInfo[playerid][pLastAno]);fwrite(hFile, var);
                
format(var, 64"HoraLogin=%d\n",PlayerInfo[playerid][pLastHora]);fwrite(hFile, var);
                
format(var, 64"MinutoLogin=%d\n",PlayerInfo[playerid][pLastMinuto]);fwrite(hFile, var);
                
format(var, 64"SegundoLogin=%d\n",PlayerInfo[playerid][pLastSegundo]);fwrite(hFile, var);
                
format(var, 64"On‌line=%d\n",PlayerInfo[playerid][pOnline]);fwrite(hFile, var);
                
format(var, 64"Votei=%d\n",PlayerInfo[playerid][pVotou]);fwrite(hFile, var);
                
format(var, 64"Hospital=%d\n",PlayerInfo[playerid][pHosp]);fwrite(hFile, var);
                
format(var, 64"HospitalTime=%d\n",PlayerInfo[playerid][pHospTime]);fwrite(hFile, var);
                
format(var, 64"MarriedTo=%s\n",PlayerInfo[playerid][pMarriedTo]);fwrite(hFile, var);
                
fclose(hFile);
            } 
Reply
#4

Isso aн nгo tб em Dini nгo!

Em DOF2 ficaria mais ou menos assim:

PHP код:
DOF2_SetString(StrConta,"Key",PlayerInfo[playerid][pKey]);
DOF2_SetInt(StrConta,"Level",PlayerInfo[playerid][pLevel]);
DOF2_SetInt(StrConta,"AdminLevel",PlayerInfo[playerid][pAdmin]);
DOF2_SaveFile(); 
Reply
#5

Muitos anos atrбs eu tive o mesmo problema.

Tente atualizar na include com o cуdigo abaixo e veja se funciona, nгo testei.
Код:
private DOF2::ParseLine (line [], key [], value [], keysize = sizeof (key), valuesize = sizeof (value))
{
	new
		pos,
		readpos;

	if ((pos = charfind (line, '=')) != -1)
	{
	    // Read key and value.
	    readpos = pos - 1;
		while (readpos >= 0 && line [readpos] == '=')
		    --readpos;

		if (readpos >= 0 && keysize > (readpos + 1))
		{
			key [readpos + 1] = '\0';
			while (readpos >= 0)
			{
				key [readpos] = line [readpos];
				--readpos;
			}
		}
		else
		    return 0;

		readpos = pos + 1;
		++pos;
		while (line [readpos] == '=')
		{
			++pos;
		    ++readpos;
		}

        if (line [readpos])
		{
		    while (readpos >= 0 && line [readpos] && valuesize > (readpos - pos + 1))
			{
				value [readpos - pos] = line [readpos];
				++readpos;
			}
			value [readpos - pos] = '\0';
		}
		else
		{
		    key [0] = value [0] = '\0';
		    return 0;
		}
		
		if (!strcmp (value, "(null)", true))
		    value [0] = '\0';
		return 1;
	}
	key [0] = value [0] = '\0';
	return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)