[Ajuda]Salvamento
#6

Pega esse e edita:
pawn Код:
#define FileUsers       "Contas/%s.ini"
stock ReturnFileUser(playerid)
{
    new File[156],Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Name,sizeof(Name));
    format(File,sizeof(File),FileUsers,Name);
    return File;
}
stock SalvarPlayer(playerid)
{
        if(DOF2_FileExists(ReturnFileUser(playerid)))
        {
            DOF2_SetInt(ReturnFileUser(playerid),"Level",GetPlayerScore(playerid));
            DOF2_SetInt(ReturnFileUser(playerid),"Dinheiro",GetPlayerMoney(playerid));
            DOF2_SetInt(ReturnFileUser(playerid),"Admin Level",PlayerDados[playerid][pAdmin]);
            DOF2_SetInt(ReturnFileUser(playerid),"Skin",GetPlayerSkin(playerid));
            DOF2_SetInt(ReturnFileUser(playerid),"VIP", PlayerDados[playerid][pVIP]);
            DOF2_SaveFile();
        }
}              
 
stock CarregarPlayer(playerid)
{
        if(DOF2_FileExists(ReturnFileUser(playerid)))
        {
            SetPlayerScore(playerid, DOF2_GetInt(ReturnFileUser(playerid), "Level"));
                SetPlayerMoney(playerid, DOF2_GetInt(ReturnFileUser(playerid), "Dinheiro"));
                PlayerDados[playerid][pAdmin] = DOF2_GetInt(ReturnFileUser(playerid),"Admin Level");
                SetPlayerSkin(playerid, DOF2_GetInt(ReturnFileUser(playerid),"Skin"));
                PlayerDados[playerid][pVIP] = DOF2_GetInt(ReturnFileUser(playerid),"VIP");
        }
}
Vocк me pediu pra fazer em DOF2 pra vocк, aн peguei esse daн que estб num FS meu (http://pastebin.com/yUFiEGQw).
Sу editar
Reply


Messages In This Thread
[Ajuda]Salvamento - by Mteck - 02.05.2012, 14:50
Re: [Ajuda]Salvamento - by RoacH` - 02.05.2012, 14:53
Re: [Ajuda]Salvamento - by mau.tito - 02.05.2012, 14:54
Re: [Ajuda]Salvamento - by Mteck - 02.05.2012, 14:57
Re: [Ajuda]Salvamento - by Mteck - 02.05.2012, 15:16
Re: [Ajuda]Salvamento - by humildadeforever - 02.05.2012, 15:46
Re: [Ajuda]Salvamento - by Djair_Black - 02.05.2012, 19:51

Forum Jump:


Users browsing this thread: 1 Guest(s)