20.10.2018, 19:54
--------------------------
enum, new e define
enum pInfo{
Level,
Dinheiro,
Senha[24]
}
new PlayerInfo[MAX_PLAYERS][pInfo];
#define PASTA_CONTAS "Contas/%s.ini"
#define DIALOG_REGISTRO
---------------------------
these are the stock
stock PlayerName(playerid)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, sizeof(aname));
return aname;
}
stock CarregarContas(playerid)
{
new file[90];
format(file, sizeof(file),"Contas/%s.ini",PlayerName(playerid));
PlayerInfo[playerid][Level] = DOF2_GetInt(file,"Level");
PlayerInfo[playerid][Dinheiro] = DOF2_GetInt(file, "Dinheiro");
SendClientMessage(playerid, 0x86A857AA, "[SERVER] Seus dados foram carregados com sucesso!");
}
stock SalvarContas(playerid)
{
new file[90];
format(file, sizeof(file),"Contas/%s.ini",PlayerName(playerid));
DOF2_SetInfo(file, "Level", PlayerInfo[playerid][Level]);
DOF2_SetInfo(file, "Dinheiro",PlayerInfor[playerid][Dinheiro]);
DOF2_SaveFile();
}
enum, new e define
enum pInfo{
Level,
Dinheiro,
Senha[24]
}
new PlayerInfo[MAX_PLAYERS][pInfo];
#define PASTA_CONTAS "Contas/%s.ini"
#define DIALOG_REGISTRO
---------------------------
these are the stock
stock PlayerName(playerid)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, sizeof(aname));
return aname;
}
stock CarregarContas(playerid)
{
new file[90];
format(file, sizeof(file),"Contas/%s.ini",PlayerName(playerid));
PlayerInfo[playerid][Level] = DOF2_GetInt(file,"Level");
PlayerInfo[playerid][Dinheiro] = DOF2_GetInt(file, "Dinheiro");
SendClientMessage(playerid, 0x86A857AA, "[SERVER] Seus dados foram carregados com sucesso!");
}
stock SalvarContas(playerid)
{
new file[90];
format(file, sizeof(file),"Contas/%s.ini",PlayerName(playerid));
DOF2_SetInfo(file, "Level", PlayerInfo[playerid][Level]);
DOF2_SetInfo(file, "Dinheiro",PlayerInfor[playerid][Dinheiro]);
DOF2_SaveFile();
}