18.04.2013, 20:24
Quando eu estava no SAMP 0.3e estava salvando certinho todos os dados, depois que passei para o 0.3x nгo salva.
Me ajudem por favor, nem se quer os arquivos estгo sendo criados!
Me ajudem por favor, nem se quer os arquivos estгo sendo criados!
Code:
#define CONTAS "Players/%s.ini"
Code:
stock SalvarConta(playerid) { DOF2_SetInt(GetarConta(playerid), "AdminLevel", PlayerInfo[playerid][pAdmin]); DOF2_SetInt(GetarConta(playerid), "Org", PlayerInfo[playerid][pOrg]); DOF2_SetInt(GetarConta(playerid), "Level", PlayerInfo[playerid][pLevel]); DOF2_SetInt(GetarConta(playerid), "Morreu", PlayerInfo[playerid][Morreu]); DOF2_SetInt(GetarConta(playerid), "Matou", GetPlayerScore(playerid)); DOF2_SetInt(GetarConta(playerid), "Dinheiro", GetPlayerMoney(playerid)); DOF2_SetInt(GetarConta(playerid), "VIP", PlayerInfo[playerid][pVip]); DOF2_SetInt(GetarConta(playerid), "Logou", PlayerInfo[playerid][pLogou]); DOF2_SetInt(GetarConta(playerid), "TempoVip", PlayerInfo[playerid][pTimeV]); DOF2_SaveFile(); return 1; }
Code:
stock CarregarConta(playerid) { PlayerInfo[playerid][pAdmin] = DOF2_GetInt(GetarConta(playerid), "AdminLevel"); PlayerInfo[playerid][pOrg] = DOF2_GetInt(GetarConta(playerid), "Org"); PlayerInfo[playerid][pLevel] = DOF2_GetInt(GetarConta(playerid), "Level"); PlayerInfo[playerid][Morreu] = DOF2_GetInt(GetarConta(playerid), "Morreu"); SetPlayerScore(playerid, DOF2_GetInt(GetarConta(playerid), "Matou")); GivePlayerMoney(playerid, DOF2_GetInt(GetarConta(playerid), "Dinheiro")); PlayerInfo[playerid][pVip] = DOF2_GetInt(GetarConta(playerid), "VIP"); PlayerInfo[playerid][pLogou] = DOF2_GetInt(GetarConta(playerid), "Logou"); PlayerInfo[playerid][pTimeV] = DOF2_GetInt(GetarConta(playerid), "TempoVip"); return 1; }
Code:
stock GetarConta(playerid) { new arq[40]; format(arq, sizeof(arq), CONTAS, Nome(playerid)); return arq; }