SA-MP Forums Archive
Edit every user file in scriptfiles/accounts - 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)
+--- Thread: Edit every user file in scriptfiles/accounts (/showthread.php?tid=597342)



Edit every user file in scriptfiles/accounts - faff - 29.12.2015

How can I edit every userfile located in scriptfiles/accounts from IG using ZCMD?

As example I use this for unbanning players.
Код:
	if(!fexist(filestring)) return SendClientMessage(playerid,Lime, "The name you've chosen was not found in our database ");
	else
	{
		new INI:File = INI_Open(filestring);
		INI_SetTag(File, "data");
		INI_WriteInt(File, "Banned",0);
		INI_Close(File);
But I don't want to type the name where the Tag must be editted from.
I want to edit EVERY userfile in the accounts folder to be editted with the tag typed.

Can somebody help with that?


Re: Edit every user file in scriptfiles/accounts - jamesbond007 - 29.12.2015

i think u need to use a plugin or smthng unless u convert to a database system


Re: Edit every user file in scriptfiles/accounts - Gammix - 30.12.2015

The only way possible through PAWN is to create a separate file containing all usernames located in accounts folder.

When all are there, using fread you can do it with one command.