[Ajuda] carregamento
#1

Ola galera seguinte quando o player se registra ele salva todas as info.
ai eu pego e desligo o servidor . e ligo denovo , o player vai logar e perde tudo
dinheiro score tem que fazer o tutorial tudo denovo, e fica setado tudo zerado ¬¬.

code de carregamento do player.

pawn Код:
stock SalvarConta(playerid)
{
    new String[99];
    GetPlayerName(playerid, Nome,sizeof(Nome));
    format(String, sizeof(String), "Contas/%s.ini", Nome);

    DOF2_SetInt(String,  "Dinheiro", Dinheiro);
    DOF2_SetInt(String,  "Banco", TitoInfo[playerid][pBank]);
    DOF2_SetInt(String,  "Score", GetPlayerScore(playerid));
    DOF2_SetInt(String,  "AdiminLevel", TitoInfo[playerid][pAdmin]);
    DOF2_SetInt(String,  "Emprego", TitoInfo[playerid][pJob]);
    DOF2_SetBool(String,  "Tutorial", TitoInfo[playerid][pTut]);
    DOF2_SetInt(String,  "Cash", TitoInfo[playerid][pCash]);
    DOF2_SetInt(String,  "Respeito", TitoInfo[playerid][pRespeito]);
    DOF2_SetBool(String,  "Empresa", TitoInfo[playerid][Empresa]);
    DOF2_SetInt(String,  "Aviso", TitoInfo[playerid][pAviso]);
    DOF2_SetInt(String,  "Skin", GetPlayerSkin(playerid));
    DOF2_SetBool(String,  "Indentidade", TitoInfo[playerid][Indentidade]);
    DOF2_SetInt(String,  "Drogas", TitoInfo[playerid][pDrogas]);
    DOF2_SetInt(String,  "Dinamite", TitoInfo[playerid][pDinamite]);
    DOF2_SaveFile();
    return 1;
}
stock CarregarConta(playerid)
{
    new String[99];
    GetPlayerName(playerid, Nome,sizeof(Nome));
    format(String, sizeof(String), "Contas/%s.ini", Nome);
    if(!DOF2_FileExists(String))
    {
        TitoInfo[playerid][pDinheiro]  = DOF2_GetInt(String,   "Dinheiro");
        TitoInfo[playerid][pBank] = DOF2_GetInt(String,           "Banco");
        TitoInfo[playerid][pScore] = DOF2_GetInt(String,          "Score");
        TitoInfo[playerid][pAdmin] = DOF2_GetInt(String,    "AdiminLevel");
        TitoInfo[playerid][pJob] = DOF2_GetInt(String,          "Emprego");
        TitoInfo[playerid][pTut] = DOF2_GetBool(String,         "Tutorial");
        TitoInfo[playerid][pCash] = DOF2_GetInt(String,            "Cash");
        TitoInfo[playerid][pRespeito] = DOF2_GetInt(String,    "Respeito");
        TitoInfo[playerid][pAviso] = DOF2_GetInt(String,          "Aviso");
        TitoInfo[playerid][pSkin] =  DOF2_GetInt(String,  "Skin");
        TitoInfo[playerid][Empresa] = DOF2_GetBool(String,  "Empresa");
        TitoInfo[playerid][Indentidade] = DOF2_GetBool(String,  "Indentidade");
        TitoInfo[playerid][pDrogas] = DOF2_GetBool(String,  "Drogas");
        TitoInfo[playerid][pDinamite] = DOF2_GetInt(String,  "Dinamite");
    }
    return 1;
}
Reply


Messages In This Thread
carregamento - by mau.tito - 19.09.2012, 18:43
Re: carregamento - by .FuneraL. - 19.09.2012, 18:52
Re: carregamento - by mau.tito - 19.09.2012, 19:04
Re: carregamento - by CaioMiglioli - 19.09.2012, 19:05
Re: carregamento - by @Riichard - 19.09.2012, 19:09
Re: carregamento - by mau.tito - 19.09.2012, 19:10
Re: carregamento - by .FuneraL. - 19.09.2012, 19:11
Re: carregamento - by Jason` - 19.09.2012, 19:15
Re: carregamento - by mau.tito - 19.09.2012, 19:30
Re: carregamento - by paulor - 19.09.2012, 23:40

Forum Jump:


Users browsing this thread: 2 Guest(s)