SA-MP Forums Archive
Skin does not save - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Skin does not save (/showthread.php?tid=440743)



Skin does not save - vitorvlv - 31.05.2013

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