04.02.2011, 12:16
The score and money is not saving to the file but the levels are plz help heres code
pawn Код:
enum AccInfo
{
LoggedIn,
Registered,
VIP,
Score,
Money,
Level
};
new pInfo[MAX_PLAYERS][AccInfo];
public OnPlayerDisconnect(playerid, reason)
{
new name[MAX_PLAYER_NAME], file[256];
GetPlayerName(playerid,name,sizeof(name));
format(file,sizeof(file),"Admin/Accounts/%s.txt",name);
if(dini_Exists(file))
{
dini_IntSet(file,"LoggedIn",0);
dini_IntSet(file, "Score", pInfo[playerid][Score]);
dini_IntSet(file, "Money", pInfo[playerid][Money]);
dini_IntSet(file, "VIP", pInfo[playerid][VIP]);
dini_IntSet(file, "Level", pInfo[playerid][Level]);
return 1;
}
return 1;
}