[AJUDA] DOF2 Nгo estб salvando
#4

Tenta Ae
pawn Code:
#define MAXIMO_VIDA 100
#define MAXIMO_COLETE 100

enum pInfo {
    pAssassinatos
    pMortes
    pDinheiro
    pAdmin
};

new PlayerInfo[MAX_PLAYERS][pInfo];

public OnPlayerDisconnect(playerid, reason)
{
    SalvarConta(playerid);
    return 1;
}

public OnGameModeExit()
{
    DOF2_Exit();
    return 1;
}

SalvarConta(playerid)
{
    new file[64];
    new Float:Vida, Float:Colete;
    GetPlayerHealth(playerid, Vida);
    GetPlayerArmour(playerid, Colete);

    format(file, sizeof(file), d_CONTAS, PlayerInfo[playerid][pNome]);
    DOF2_SetInt(file, "Assassinatos",PlayerInfo[playerid][pAssassinatos]);
    DOF2_SetInt(file, "Mortes",PlayerInfo[playerid][pMortes]);
    DOF2_SetInt(file, "Dinheiro",PlayerInfo[playerid][pDinheiro]);
    DOF2_SetInt(file, "AdminLevel",PlayerInfo[playerid][pAdmin]);
    DOF2_SetFloat(file, "Vida",MAXIMO_VIDA);
    DOF2_SetFloat(file, "Colete",MAXIMO_COLETE);
    return DOF2_SaveFile();
}
@Edit '-'
Reply


Messages In This Thread
[AJUDA] DOF2 Nгo estб salvando - by Chis - 14.05.2012, 21:22
Re: [AJUDA] DOF2 Nгo estб salvando - by Lуs - 14.05.2012, 21:23
Respuesta: [AJUDA] DOF2 Nгo estб salvando - by Chis - 14.05.2012, 21:31
Re: [AJUDA] DOF2 Nгo estб salvando - by mau.tito - 14.05.2012, 21:57
Respuesta: [AJUDA] DOF2 Nгo estб salvando - by Chis - 14.05.2012, 21:59
Re: [AJUDA] DOF2 Nгo estб salvando - by ViictorDaay- - 14.05.2012, 22:11
Re: [AJUDA] DOF2 Nгo estб salvando - by paulor - 14.05.2012, 22:39
Respuesta: [AJUDA] DOF2 Nгo estб salvando - by Chis - 14.05.2012, 22:52
Re: [AJUDA] DOF2 Nгo estб salvando - by Joker_OutLock - 14.05.2012, 22:56
Re: [AJUDA] DOF2 Nгo estб salvando - by paulor - 14.05.2012, 23:08

Forum Jump:


Users browsing this thread: 2 Guest(s)