Accounts not working
#1

Hi i am using dini and making a saving system but nothing is saving when i set it in the file..

The skin spawns as CJ too.


pawn Код:
stock SavePlayerStats(playerid)
{
 pName = GetPlayerNameEx(playerid);
 new file[128];
 format(file, sizeof(file), "%s.ini", pName);
 if(dini_Exists(file))
 PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
 PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
 dini_IntSet(file,"Cash",PlayerInfo[playerid][pCash]);
 dini_IntSet(file,"Kills",PlayerInfo[playerid][pKills]);
 dini_IntSet(file,"Deaths",PlayerInfo[playerid][pDeaths]);
 dini_IntSet(file,"AdminLevel",PlayerInfo[playerid][pAdmin]);
 dini_IntSet(file,"Phone",PlayerInfo[playerid][pPhone]);
 dini_IntSet(file,"Phonebook",PlayerInfo[playerid][pPhonebook]);
 dini_IntSet(file,"Suicides",PlayerInfo[playerid][pSuicides]);
 dini_IntSet(file,"Skin",PlayerInfo[playerid][pSkin]);
 dini_IntSet(file,"Team",PlayerInfo[playerid][pTeam]);
 dini_IntSet(file,"Drugs",PlayerInfo[playerid][pDrugs]);
 dini_IntSet(file,"Rank",PlayerInfo[playerid][pRank]);
 dini_IntSet(file,"Muted",PlayerInfo[playerid][pMuted]);
 dini_IntSet(file,"Cked",PlayerInfo[playerid][pCked]);
 return 1;
}

stock SaveAllPlayerStats()
{
 for(new i = 0; i < MAX_PLAYERS; i++)
 {
  pName = GetPlayerNameEx(i);
  new file[128];
  format(file, sizeof(file), "%s.ini", pName);
  if(dini_Exists(file))
  PlayerInfo[i][pSkin] = GetPlayerSkin(i);
  PlayerInfo[i][pCash] = GetPlayerMoney(i);
  dini_IntSet(file,"Cash",PlayerInfo[i][pCash]);
  dini_IntSet(file,"Kills",PlayerInfo[i][pKills]);
  dini_IntSet(file,"Deaths",PlayerInfo[i][pDeaths]);
  dini_IntSet(file,"AdminLevel",PlayerInfo[i][pAdmin]);
  dini_IntSet(file,"Phone",PlayerInfo[i][pPhone]);
  dini_IntSet(file,"Phonebook",PlayerInfo[i][pPhonebook]);
  dini_IntSet(file,"Suicides",PlayerInfo[i][pSuicides]);
  dini_IntSet(file,"Skin",PlayerInfo[i][pSkin]);
  dini_IntSet(file,"Team",PlayerInfo[i][pTeam]);
  dini_IntSet(file,"Drugs",PlayerInfo[i][pDrugs]);
  dini_IntSet(file,"Rank",PlayerInfo[i][pRank]);
  dini_IntSet(file,"Muted",PlayerInfo[i][pMuted]);
  dini_IntSet(file,"Cked",PlayerInfo[i][pCked]);
  return 1;
 }
}
If you need more code just let me know.
Reply


Messages In This Thread
Accounts not working - by |CrippinBloodDrippin| - 09.05.2009, 15:50
Re: Accounts not working - by Luka P. - 09.05.2009, 15:51
Re: Accounts not working - by |CrippinBloodDrippin| - 09.05.2009, 15:53
Re: Accounts not working - by Luka P. - 09.05.2009, 15:54
Re: Accounts not working - by |CrippinBloodDrippin| - 09.05.2009, 15:55
Re: Accounts not working - by James_Alex - 09.05.2009, 15:57
Re: Accounts not working - by Luka P. - 09.05.2009, 16:00
Re: Accounts not working - by |CrippinBloodDrippin| - 09.05.2009, 16:03

Forum Jump:


Users browsing this thread: 1 Guest(s)