02.05.2012, 15:46
Pega esse e edita:
Vocк me pediu pra fazer em DOF2 pra vocк, aн peguei esse daн que estб num FS meu (http://pastebin.com/yUFiEGQw).
Sу editar
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");
}
}
Sу editar