24/10/2023 03:33
eu queria converter este codigo todo de dof2 para mysql por onde posso comecar?
Código:
SalvarPlayer(playerid)
{
if(!Player[playerid][pLogged])
return 0;
new file[60];
format(file, sizeof(file), CONTAS, GetPlayerNameEx(playerid));
Player[playerid][pSkin] = GetPlayerSkin(playerid);
if(fexist(file))
{
DOF2_SetInt(file, "Dinheiro", Player[playerid][pDinheiro]);
DOF2_SetInt(file, "2014_Coins", Player[playerid][Coins]);
DOF2_SetInt(file, "Matou", Player[playerid][pMatou]);
DOF2_SetInt(file, "Morreu", Player[playerid][pMorreu]);
DOF2_SetInt(file, "MatouDM", Player[playerid][pMatouDM]);
DOF2_SetInt(file, "MatouVIP", Player[playerid][pMatouVIP]);
DOF2_SetInt(file, "MorreuDM", Player[playerid][pMorreuDM]);
DOF2_SetInt(file, "MorreuVip", Player[playerid][pMorreuVIP]);
DOF2_SetInt(file, "RandomNumber", Player[playerid][pPegae]);
DOF2_SetInt(file, "Logou", Player[playerid][pVezesLogadas]);
DOF2_SetInt(file, "2014_Admin", Player[playerid][pAdmin]);
DOF2_SetInt(file, "XOneWin", Player[playerid][pXOneWin]);
DOF2_SetInt(file, "Gerente", Player[playerid][pGerente]);
DOF2_SetInt(file, "2015_vPRES", Player[playerid][pvPres]);
DOF2_SetInt(file, "Novato", novatofila[playerid]);
DOF2_SetInt(file, "DonodoMorro", Player[playerid][pDonodoMorro]);
DOF2_SetInt(file, "Frente", Player[playerid][pFrente]);
DOF2_SetInt(file, "Iniciante", Player[playerid][pIniciante]);
DOF2_SetInt(file, "Sultan", Player[playerid][pSultan][0]);
DOF2_SetInt(file, "Infernus1", Player[playerid][pSultan][1]);
DOF2_SetInt(file, "Infernus2", Player[playerid][pSultan][2]);
DOF2_SetInt(file, "Infernus3", Player[playerid][pSultan][3]);
DOF2_SetInt(file, "Infernus4", Player[playerid][pSultan][4]);
DOF2_SetInt(file, "Infernus5", Player[playerid][pSultan][5]);
DOF2_SetInt(file, "Infernus6", Player[playerid][pSultan][6]);
DOF2_SetInt(file, "Infernus7", Player[playerid][pSultan][7]);
DOF2_SetInt(file, "Infernus8", Player[playerid][pSultan][8]);
DOF2_SetInt(file, "Infernus9", Player[playerid][pSultan][9]);
DOF2_SetInt(file, "Infernus10", Player[playerid][pSultan][10]);
DOF2_SetInt(file, "Infernus11", Player[playerid][pSultan][11]);
DOF2_SetInt(file, "Infernus12", Player[playerid][pSultan][12]);
DOF2_SetInt(file, "Infernus13", Player[playerid][pSultan][13]);
DOF2_SetInt(file, "Infernus14", Player[playerid][pSultan][14]);
DOF2_SetInt(file, "Infernus15", Player[playerid][pSultan][15]);
DOF2_SetInt(file, "Infernus16", Player[playerid][pSultan][16]);
DOF2_SetInt(file, "Infernus17", Player[playerid][pSultan][17]);
DOF2_SetInt(file, "Infernus18", Player[playerid][pSultan][18]);
DOF2_SetInt(file, "Infernus19", Player[playerid][pSultan][19]);
DOF2_SetInt(file, "2014_Choque", Player[playerid][pPM]);
DOF2_SetInt(file, "2014_GDE", Player[playerid][pEXT]);
DOF2_SetInt(file, "2014_BOPE", Player[playerid][pBOPE]);
DOF2_SetInt(file, "2014_rSGNT", Player[playerid][pRGT]);
DOF2_SetInt(file, "2015_TRAF", Player[playerid][pVapor]);
DOF2_SetInt(file, "2014_Helper", Player[playerid][pHelper]);
DOF2_SetInt(file, "2015_DJ", Player[playerid][pDJ]);
DOF2_SetInt(file, "Vapor", Player[playerid][pVapor]);
DOF2_SetInt(file, "Fogueteiro", Player[playerid][pFogueteiro]);
DOF2_SetInt(file, "2014_Ajudas",Player[playerid][pAHelper]);
DOF2_SetInt(file, "2014_AjudasN", Player[playerid][pANHelper]);
DOF2_SetInt(file, "2014_Duvidas", Player[playerid][pDHelper]);
DOF2_SetInt(file, "UltimoDiaPresente", UltimoDia[playerid]);
DOF2_SetInt(file, "PegouPresente", PegouPresente[playerid]);
DOF2_SetInt(file, "DrogaM_Trafico", DrogaMaconha[playerid]);
DOF2_SetInt(file, "DrogaC_Trafico", DrogaCocaina[playerid]);
DOF2_SetInt(file, "Matou_Trafico", ContagemTraf[playerid]);
DOF2_SetInt(file, "Morreu_Trafico", MortesTrafico[playerid]);
DOF2_SetInt(file, "Skin", Player[playerid][pSkin]);
DOF2_SetInt(file, "HorasJogadas", Player[playerid][pScore]);
DOF2_SetInt(file,"Modelo", Player[playerid][JFSModelo]);
DOF2_SetInt(file, "XP", Player[playerid][pXP]);
DOF2_SetInt(file, "2014_Torcidas", Player[playerid][pFaccoes]);
DOF2_SetInt(file, "Banco", Player[playerid][pBanco]);
DOF2_SetInt(file, "TintaP", Player[playerid][pTinta][0]);
DOF2_SetInt(file, "TintaM", Player[playerid][pTinta][1]);
DOF2_SetInt(file, "TintaGr", Player[playerid][pTinta][2]);
DOF2_SetInt(file, "TintaGi", Player[playerid][pTinta][3]);
DOF2_SetInt(file, "Maconha", Player[playerid][pMaconha]);
DOF2_SetInt(file, "Cocaina", Player[playerid][pCocaina]);
DOF2_SetInt(file, "2014_Reports", Player[playerid][Reportslidos]);
DOF2_SetInt(file, "MP3", Player[playerid][pMP3]);
DOF2_SetInt(file, "StatusPM", Player[playerid][BlockPM]);
DOF2_SetInt(file, "StatusIr", Player[playerid][IrBlock]);
DOF2_SetInt(file, "BlockKick", Player[playerid][pBlockKick]);
DOF2_SetInt(file, "BlockIr", Player[playerid][pBlockIr]);
DOF2_SetInt(file, "TempoPreso", Player[playerid][pTempoPreso]);
DOF2_SetInt(file, "PresoSF", Player[playerid][pPreso][0]);
DOF2_SetInt(file, "PresoLS", Player[playerid][pPreso][1]);
DOF2_SetInt(file, "PresoLV", Player[playerid][pPreso][2]);
DOF2_SetInt(file, "PresoADM", Player[playerid][pPreso][3]);
DOF2_SetInt(file, "Penitenciaria", Player[playerid][Penitenciaria]);
DOF2_SetInt(file, "Vip", Player[playerid][pVip]);
DOF2_SetInt(file, "Matuto", Player[playerid][pMatuto]);
DOF2_SetInt(file, "LiderdaFaccao", Player[playerid][pLiderdaFaccao]);
DOF2_SetInt(file, "TituloAtual", Player[playerid][pTitulo]);
DOF2_SetInt(file, "Fogos", Player[playerid][Fogos]);
DOF2_SetInt(file, "NivelProcurado", Player[playerid][pProcurado]);
DOF2_SetInt(file, "Pacotes", Player[playerid][pPacotes]);
DOF2_SetInt(file, "Materiais", Player[playerid][pMateriais]);
DOF2_SetInt(file, "2014_PrisaoVeicular", PrisaoVeicular[playerid]);
DOF2_SetInt(file, "2014_Abatimentos", AbatimentoContagem[playerid]);
DOF2_SetInt(file, "MatouTrf", MatouTrf[playerid]);
DOF2_SetInt(file, "2014_DrogasPresas", DrogasPresas[playerid]);
DOF2_SetInt(file, "2016_TintasPresas", TintasPresas[playerid]);
DOF2_SetInt(file, "2014_SuProcurados", SuProcurados[playerid]);
DOF2_SetInt(file, "pBlockChat", Player[playerid][pBlockChat]);
DOF2_SetInt(file, "Sinalizador", Player[playerid][pSinalizadores]);
DOF2_SetInt(file, "TempoOnline", Player[playerid][pOnlineTime]);
DOF2_SetInt(file, "2014_WeaponCoin", Player[playerid][WeaponCoin]);
DOF2_SetInt(file, "2014_Vehicle", Player[playerid][Vehicle]);
DOF2_SetInt(file, "FilaAtendida", FilaAtendida[playerid]);
DOF2_SetInt(file, "EntrevistasRg", EntrevistasRg[playerid]);
DOF2_SetInt(file, "2015_Dominios", Player[playerid][RankDominiosOrg]);
DOF2_SetInt(file, "2015_DominiosPlayer", Player[playerid][RankDominiolsP]);
DOF2_SetInt(file, "Built", GM_BUILT);
DOF2_SetInt(file, "Skill_1", Player[playerid][Skill][0]);
DOF2_SetInt(file, "Skill_2", Player[playerid][Skill][1]);
DOF2_SetInt(file, "Skill_3", Player[playerid][Skill][2]);
DOF2_SetInt(file, "Skill_4", Player[playerid][Skill][3]);
DOF2_SetInt(file, "Skill_5", Player[playerid][Skill][4]);
DOF2_SetInt(file, "Skill_6", Player[playerid][Skill][5]);
new date[60], datex[6];
gettime(datex[0], datex[1], datex[2]),
getdate(datex[3], datex[4], datex[5]);
format(date, sizeof(date),"%02d/%02d/%d ás %02d:%02d:%02d", datex[5], datex[4], datex[3], datex[0], datex[1], datex[2]);
DOF2_SetString(file, "LastLogin", date);
DOF2_SetInt(file, "LastLoginTick", Now());
DOF2_SaveFile();
if(fexist(VIP_FILE(GetPlayerNameEx(playerid))))//BENEFICIOS VIP
{
DOF2_SetInt(VIP_FILE(GetPlayerNameEx(playerid)), "2015_NitroInfinito", Player[playerid][NitroInfinito]);
DOF2_SetInt(VIP_FILE(GetPlayerNameEx(playerid)), "2015_Colisao", Player[playerid][Colisao]);
DOF2_SaveFile();
}
}
return true;
}