[Ajuda] Problema com Salvamento de Contas.
#3

Nгo tem timer, salva em tempo real, se um player comprar um MP3 jб salva na hora.

PHP код:
SavePlayer(playerid)
{
    if(
DOF2_FileExists(GetPlayerArquivo(playerid)))
    {
        
DOF2_CreateFile(GetPlayerArquivo(playerid));
        new 
grana;
        
grana = GetPlayerGrana(playerid);
        
GetPlayerPos(playerid, pPosX[playerid], pPosY[playerid], pPosZ[playerid]);
        
GetPlayerFacingAngle(playerid, pPosA[playerid]);
        
PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
        
DOF2_SetInt(GetPlayerArquivo(playerid),"Level", PlayerInfo[playerid][pLevel]);
        
DOF2_SetInt(GetPlayerArquivo(playerid),"Dinheiro", grana);
        
DOF2_SetInt(GetPlayerArquivo(playerid),"Admin", pAdmin[playerid]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Plano", PlayerInfo[playerid][pPlano]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "EXP", PlayerInfo[playerid][pExpe]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Porte", PlayerInfo[playerid][pPorte]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "HabTrem", PlayerInfo[playerid][pTrem]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "HELG", PlayerInfo[playerid][pHELG]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "HEVG", PlayerInfo[playerid][pHEVG]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "HEAG", PlayerInfo[playerid][pHEAG]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "RelogioUP", PlayerInfo[playerid][pRelogioUP]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "MP3", PlayerInfo[playerid][pMP3]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Oculos", PlayerInfo[playerid][pOculos]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Gorro", PlayerInfo[playerid][pGorro]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Motos", PlayerInfo[playerid][pMotos]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Carros", PlayerInfo[playerid][pCarros]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Caminhoes", PlayerInfo[playerid][pCaminhoes]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Carretas", PlayerInfo[playerid][pCarretas]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Onibus", PlayerInfo[playerid][pOnibus]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Barcos", PlayerInfo[playerid][pBarcos]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Avioes", PlayerInfo[playerid][pAvioes]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Helicopteros", PlayerInfo[playerid][pHelicopeteros]);
        
DOF2_SetInt(GetPlayerArquivo(playerid),"Skin", PlayerInfo[playerid][pSkin]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Profissao", PlayerInfo[playerid][pProfissao]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "Tutorial", PlayerInfo[playerid][pTutorial]);
         
DOF2_SetInt(GetPlayerArquivo(playerid), "RelogioUPM",PlayerInfo[playerid][pminUP]);
        
DOF2_SetInt(GetPlayerArquivo(playerid), "RelogioUPS",PlayerInfo[playerid][psegUP]);
        
DOF2_SetFloat(GetPlayerArquivo(playerid), "PosX", pPosX[playerid]);
        
DOF2_SetFloat(GetPlayerArquivo(playerid), "PosY", pPosY[playerid]);
        
DOF2_SetFloat(GetPlayerArquivo(playerid), "PosZ", pPosZ[playerid]);
        
DOF2_SetFloat(GetPlayerArquivo(playerid), "PosA", pPosA[playerid]);
        
DOF2_SetInt(GetPlayerArquivo(playerid),"FOME", GetPVarInt(playerid,"FOME"));
        
DOF2_SetInt(GetPlayerArquivo(playerid),"SEDE", GetPVarInt(playerid,"SEDE"));
        
DOF2_SetInt(GetPlayerArquivo(playerid),"SONO", GetPVarInt(playerid,"SONO"));
        
DOF2_SetInt(GetPlayerArquivo(playerid),"SAUDE", GetPVarInt(playerid,"SAUDE"));
        
DOF2_SaveFile();
    }
    return 
1;
} 
Reply


Messages In This Thread
Problema com Salvamento de Contas.[RESOLVIDO] - by Poseidon4625 - 21.08.2018, 11:26
Re: Problema com Salvamento de Contas. - by F1N4L - 21.08.2018, 11:40
Re: Problema com Salvamento de Contas. - by Poseidon4625 - 21.08.2018, 11:52
Re: Problema com Salvamento de Contas. - by F1N4L - 21.08.2018, 13:14
Re: Problema com Salvamento de Contas. - by Poseidon4625 - 21.08.2018, 13:17
Re: Problema com Salvamento de Contas. - by F1N4L - 21.08.2018, 13:24
Re: Problema com Salvamento de Contas. - by humildadeforever - 21.08.2018, 13:24
Re: Problema com Salvamento de Contas. - by Poseidon4625 - 21.08.2018, 13:36

Forum Jump:


Users browsing this thread: 1 Guest(s)