13.06.2009, 15:18
I'm using dini.inc functions in my roleplay script to save user data from global variables but it doesn't.
I have a function SaveStats which is called OnPlayerDisconnect
Variables:
The func SaveStats:
Everything compiles and no errors. It also loads data from userfiles but it doesn't save.
Somebody has any ideas why?
I have a function SaveStats which is called OnPlayerDisconnect
Variables:
Код:
enum PlayerInfo { pLogin, pAdmin, pMoney, pBankMoney, pTeam, }; new pInfo[MAX_PLAYERS][PlayerInfo];
Код:
public SaveStats(playerid) { new pfilename[128]; format(pfilename, sizeof(pfilename), "/Users/%s.ini", ReturnPlayerName(playerid)); dini_Set(pfilename, "Admin", pInfo[playerid][pAdmin]); pInfo[playerid][pMoney] = GetPlayerMoney(playerid); dini_Set(pfilename, "Money", pInfo[playerid][pMoney]); dini_Set(pfilename, "BankMoney", pInfo[playerid][pBankMoney]); dini_Set(pfilename, "Team", pInfo[playerid][pTeam]); return 1; }
Somebody has any ideas why?