how to overwrite only 1 line with dini in users file - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to overwrite only 1 line with dini in users file (
/showthread.php?tid=257303)
how to overwrite only 1 line with dini in users file -
andruz99 - 25.05.2011
im using dini to store my users, but i need a code that will write only 1 certain line over, not all the lines what are in user file.
Re: how to overwrite only 1 line with dini in users file -
Seven_of_Nine - 25.05.2011
dini_Set(file, "NameOfSetting", "StringToBeSet");
or
dini_IntSet(file, "NumberofSetting", NumberToSet);
Re: how to overwrite only 1 line with dini in users file -
ViperSniper - 25.05.2011
Edit: Nvm
Re: how to overwrite only 1 line with dini in users file -
andruz99 - 25.05.2011
i dont really understand, i have like
Код:
new string3[256];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "files/users/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if (hFile)
{
new var[32];
format(var, 32, "Activated=%1\n",PlayerInfo[playerid][pActivated]);fwrite(hFile, var);
but, then it will only write into a file that line, or if i io_append then it adds the line at the end not overwrites the line :S
Re: how to overwrite only 1 line with dini in users file -
andruz99 - 25.05.2011
anybody please?
Re: how to overwrite only 1 line with dini in users file -
andruz99 - 26.05.2011
bump, anyone?