Portal SAMP
[Ajuda] alguem me ajuda converter isso para mysql - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: [Ajuda] alguem me ajuda converter isso para mysql (/showthread.php?tid=4121)



alguem me ajuda converter isso para mysql - AngolaDev1 - 24/10/2023

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;
}



RE: alguem me ajuda converter isso para mysql - pushline - 24/10/2023

jesus q código imenso, fiz o basico p vc aqui

Código PHP:
SalvarPlayer(playerid)
{
    if(!
Player[playerid][pLogged])
        return 
0;

    
Player[playerid][pSkin] = GetPlayerSkin(playerid);

    new 
querySQL[2048]

    
mysql_format(MYSQL_DEFAULT_HANDLEquerySQLsizeof(querySQL),
        
"UPDATE players SET dinheiro = %d, 2014_coins = %d, matou = %d, morreu = %d, matoudm = %d, morreudm = %d, \
        matouvip = %d, morreuvip = %d, randomnumber = %d, logou = %d, 2014_admin = %d, xonewin = %d, gerente = %d, \
        2015_vpres = %d, novato = %d, donodomorro = %d, frente = %d, iniciante = %d"
,
        
Player[playerid][pDinheiro], Player[playerid][Coins], Player[playerid][pMatou], Player[playerid][pMorreu],
        
Player[playerid][pMatouDM], Player[playerid][pMorreuDM], Player[playerid][pMatouVIP], Player[playerid][pMorreuVIP],
        
Player[playerid][pPegae], Player[playerid][pVezesLogadas], Player[playerid][pAdmin], Player[playerid][pXOneWin],
        
Player[playerid][pGerente], Player[playerid][pvPres], novatofila[playerid], Player[playerid][pDonodoMorro],
        
Player[playerid][pFrente], Player[playerid][pIniciante]
    );

    
mysql_tquery(MYSQL_DEFAULT_HANDLEquerySQL);

    for(new 
1<= 19i++)
    {
        
mysql_format(MYSQL_DEFAULT_HANDLEquerySQLsizeof(querySQL),
            
"UPDATE players set sultan = %d, infernus%d = %d"
            
Player[playerid][pSultan][0], iPlayer[playerid][pSultan][i]
        );

        
mysql_tquery(MYSQL_DEFAULT_HANDLEquerySQL);
    }

    for(new 
icont 16i++, cont++)
    {
        
mysql_format(MYSQL_DEFAULT_HANDLEquerySQLsizeof(querySQL),
            
"UPDATE players set skill_%d = %d"
            
contPlayer[playerid][Skill][i]
        );

        
mysql_tquery(MYSQL_DEFAULT_HANDLEquerySQL);
    }

    
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);

    new 
date[60], datex[6];
    
gettime(datex[0], datex[1], datex[2]),
    
getdate(datex[3], datex[4], datex[5]);

    
format(datesizeof(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;




RE: alguem me ajuda converter isso para mysql - leonardos08bt - 24/10/2023

Parecia que eu estava convertendo a Gamemode kkkkk (ironia)

Código:
SalvarPlayer(playerid)
{
    if(!Player[playerid][pLogged])
        return 0;

    new query[728], nomep[MAX_PLAYER_NAME+1];
    GetPlayerName(playerid, nomep, sizeof(nomep));
    mysql_format(MYSQL_DEFAULT_HANDLE, query, sizeof(query), "UPDATE players SET dinheiro=%d, \
    2014_Coins=%d, Matou=%d, Morreu=%d, MatouDM=%d, MatouVIP=%d, MorreuDM=%d, MorreuVip=%d, RandomNumber=%d, Logou=%d, \
    2014_Admin=%d, XOneWin=%d, Gerente=%d, 2015_vPRES=%d, Novato=%d, DonodoMorro=%d, Frente=%d, Iniciante=%d, Sultan=%d, Infernus1=\
    %d, Infernus2=%d, Infernus3=%d, Infernus4=%d, Infernus5=%d, Infernus6=%d, Infernus7=%d, Infernus8=%d, Infernus9=%d, Infernus10=%d, \
    Infernus11=%d, Infernus12=%d, Infernus13=%d, Infernus14=%d, Infernus15=%d, Infernus16=%d, Infernus17=%d, Infernus18=%d, Infernus19=%d,\
    2014_Choque=%d, 2014_GDE=%d, 2014_BOPE=%d, 2014_rSGNT=%d, 2015_TRAF=%d, 2014_Helper=%d, 2015_DJ=%d, Vapor=%d, Fogueteiro=\
    %d, 2014_Ajudas=%d, 2014_AjudasN=%d, 2014_Duvidas=%d, UltimoDiaPresente=%d, PegouPresente=%d, DrogaM_Trafico=%d, DrogaC_Trafico=\
    %d, Matou_Trafico=%d, Morreu_Trafico=%d, Skin=%d, HorasJogadas=%d, Modelo=%d, XP=%d, 2014_Torcidas=%d, Banco=%d, TintaP=%d, TintaM=\
    %d, TintaGr=%d, TintaGi=%d, Maconha=%d, Cocaina=%d, 2014_Reports=%d, MP3=%d, StatusPM=%d, StatusIr=%d, BlockKick=%d, BlockIr=%d,\
    TempoPreso=%d, PresoSF=%d, PresoLS=%d, PresoLV=%d, PresoADM=%d, Penitenciaria=%d, Vip=%d, Matuto=%d, LiderdaFaccao=%d, TituloAtual=\
    %d, Fogos=%d, NivelProcurado=%d, Pacotes=%d, Materiais=%d, 2014_PrisaoVeicular=%d, 2014_Abatimentos=%d, MatouTrf=%d,\
    2014_DrogasPresas=%d, 2016_TintasPresas=%d, 2014_SuProcurados=%d, pBlockChat=%d, Sinalizador=%d, TempoOnline=%d, 2014_WeaponCoin=\
    %d, Vehicle=%d, FilaAtendida=%d, EntrevistasRg=%d, 2015_Dominios=%d, 2015_DominiosPlayer=%d, Built=%d, Skill_1=%d, Skill_2=%d, Skill_3=%d,\
    Skill_4=%d, Skill_5=%d, Skill_6=%d, LastLogin='%s', LastLoginTick=%d WHERE nome=%s",
    Player[playerid][pDinheiro], Player[playerid][Coins], Player[playerid][pMatou], Player[playerid][pMorreu], Player[playerid][pMatouDM], \
    Player[playerid][pMatouVIP], Player[playerid][pMorreuDM], Player[playerid][pMorreuVIP], Player[playerid][pPegae], Player[playerid][pVezesLogadas], \
    Player[playerid][pAdmin], Player[playerid][pXOneWin], Player[playerid][pGerente], Player[playerid][pvPres], novatofila[playerid], \
    Player[playerid][pDonodoMorro], Player[playerid][pFrente], Player[playerid][pIniciante], Player[playerid][pSultan][0], Player[playerid][pSultan][1],\
    Player[playerid][pSultan][2], Player[playerid][pSultan][3], Player[playerid][pSultan][4], Player[playerid][pSultan][5], Player[playerid][pSultan][6], \
    Player[playerid][pSultan][7], Player[playerid][pSultan][8], Player[playerid][pSultan][9], Player[playerid][pSultan][10], Player[playerid][pSultan][11], \
    Player[playerid][pSultan][12], Player[playerid][pSultan][13], Player[playerid][pSultan][14], Player[playerid][pSultan][15], Player[playerid][pSultan][16],\
    Player[playerid][pSultan][17], Player[playerid][pSultan][18], Player[playerid][pSultan][19], Player[playerid][pPM], Player[playerid][pEXT], \
    Player[playerid][pBOPE], Player[playerid][pRGT], Player[playerid][pVapor], Player[playerid][pHelper], Player[playerid][pDJ], Player[playerid][pVapor], \
    Player[playerid][pFogueteiro], Player[playerid][pAHelper], Player[playerid][pANHelper], Player[playerid][pDHelper], UltimoDia[playerid], \
    PegouPresente[playerid], DrogaMaconha[playerid], DrogaCocaina[playerid], ContagemTraf[playerid], MortesTrafico[playerid], Player[playerid][pSkin],\
    Player[playerid][pScore], Player[playerid][JFSModelo], Player[playerid][pXP], Player[playerid][pFaccoes], Player[playerid][pBanco], \
    Player[playerid][pTinta][0], Player[playerid][pTinta][1], Player[playerid][pTinta][2], Player[playerid][pTinta][3], Player[playerid][pMaconha], \
    Player[playerid][pCocaina], Player[playerid][Reportslidos], Player[playerid][pMP3], Player[playerid][BlockPM], Player[playerid][IrBlock], \
    Player[playerid][pBlockKick], Player[playerid][pBlockIr], Player[playerid][pTempoPreso], Player[playerid][pPreso][0], Player[playerid][pPreso][1], \
    Player[playerid][pPreso][2], Player[playerid][pPreso][3], Player[playerid][Penitenciaria], Player[playerid][pVip], Player[playerid][pMatuto], \
    Player[playerid][pLiderdaFaccao], Player[playerid][pTitulo], Player[playerid][Fogos], Player[playerid][pProcurado], Player[playerid][pPacotes], \
    Player[playerid][pMateriais], PrisaoVeicular[playerid], AbatimentoContagem[playerid], MatouTrf[playerid], DrogasPresas[playerid], \
    TintasPresas[playerid], SuProcurados[playerid], Player[playerid][pBlockChat], Player[playerid][pSinalizadores], Player[playerid][pOnlineTime], \
    Player[playerid][WeaponCoin], Player[playerid][Vehicle], FilaAtendida[playerid], EntrevistasRg[playerid], RankDominiosOrg[playerid], \
    RankDominiolsP[playerid], GM_BUILT, Player[playerid][Skill][0], Player[playerid][Skill][1], Player[playerid][Skill][2], Player[playerid][Skill][3], \
    Player[playerid][Skill][4], Player[playerid][Skill][5], date, Now(), nomep);
    mysql_tquery(mysql, query);
    return true;
}

Não foi da melhor forma mas converti.


RE: alguem me ajuda converter isso para mysql - pushline - 24/10/2023

eu so mudaria esse playerid pro nome do usuario, pq playerids são pegos novamente por outros players ao logar/deslogar


RE: alguem me ajuda converter isso para mysql - leonardos08bt - 24/10/2023

Sim sim, vacilei nessa parte.
O código está corrigido.

Eu errei essa parte pois estou acostumado a tratar com ID's Únicos kkk