In a way yes, but I am not sure about the performance while working with a big number of data inside the file. You could save player's authid as section and organize the data between the keys.
Code:
new const FILENAME[] = "player_data.ini";
SavePlayerData(this)
{
new szAuthId[MAX_AUTHID_LENGTH], iMoney;
get_user_authid(this, szAuthId, charsmax(szAuthId));
iMoney = cs_get_user_money(this); // e.g. 16000
ini_write_int(FILENAME, szAuthId, "Money", iMoney);
/* Result:
[STEAM_0:0:0000000]
Money = 16000
*/
}
LoadPlayerData(this)
{
new szAuthId[MAX_AUTHID_LENGTH], iMoney;
get_user_authid(this, szAuthId, charsmax(szAuthId));
iMoney = cs_get_user_money(this);
ini_read_int(FILENAME, szAuthId, "Money", iMoney);
cs_set_user_money(this, iMoney);
}
Update is already implemented. ini_write_* adds the key and value if the key does not already exists, otherwise it update.
__________________