24/10/2023 08:43
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_HANDLE, querySQL, sizeof(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_HANDLE, querySQL);
for(new i = 1; i <= 19; i++)
{
mysql_format(MYSQL_DEFAULT_HANDLE, querySQL, sizeof(querySQL),
"UPDATE players set sultan = %d, infernus%d = %d",
Player[playerid][pSultan][0], i, Player[playerid][pSultan][i]
);
mysql_tquery(MYSQL_DEFAULT_HANDLE, querySQL);
}
for(new i, cont = 1; i < 6; i++, cont++)
{
mysql_format(MYSQL_DEFAULT_HANDLE, querySQL, sizeof(querySQL),
"UPDATE players set skill_%d = %d",
cont, Player[playerid][Skill][i]
);
mysql_tquery(MYSQL_DEFAULT_HANDLE, querySQL);
}
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(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;
}