Skin does not save
#1

pawn Код:
#define arquivo "Contas/%s.ini"
// -----
stock GetarConta(playerid)
{
    new arq[40];
    format(arq, sizeof(arq), arquivo, pName(playerid));
    return arq;
}


stock SalvarConta(playerid)
{
    DOF2_SetInt(GetarConta(playerid), "AdmLevel", pDados[playerid][Admin]);
    DOF2_SetInt(GetarConta(playerid), "Score", GetPlayerScore(playerid));
    DOF2_SetInt(GetarConta(playerid), "Skin", GetPlayerSkin(playerid));
    DOF2_SetInt(GetarConta(playerid), "Dinheiro", GetPlayerMoney(playerid));
    DOF2_SetBool(GetarConta(playerid), "Cadastro", pDados[playerid][Cadastrado]);
    DOF2_SaveFile();
    return 1;
}

stock CarregarConta(playerid)
{
    pDados[playerid][Admin] = DOF2_GetInt(GetarConta(playerid), "AdmLevel");
    SetPlayerScore(playerid, DOF2_GetInt(GetarConta(playerid), "Score"));
    GivePlayerMoney(playerid, DOF2_GetInt(GetarConta(playerid), "Dinheiro"));
    SetPlayerSkin(playerid,DOF2_GetInt(GetarConta(playerid),"Skin"));
    return 1;
}
The other parts of the code do not matter, only the part of the Skin, the code saves everything correctly, minus the skin, it always comes back to 0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)