Editing a file using djSon? - 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: Editing a file using djSon? (
/showthread.php?tid=160757)
Editing a file using djSon? -
(.Aztec); - 17.07.2010
At the moment all I have is:
pawn Код:
COMMAND:unban(playerid, params[])
{
new Name[128], string[128];
if(!sscanf(params, "s", Name))
{
if(File[playerid][Administrator] >= 3)
{
format(string, sizeof(string), "[SYSTEM] User Account %s unbanned.");
SendClientMessageToAdmins(1, yellow, string);
}
else return notauth;
}
else return SendClientMessage(playerid, grey, "[USAGE] /Unban [FirstName_LastName]");
return 1;
}
How would I go about editing a user-file in djson? I want it to edit the variable "Banned" and turn it into "0".
Basically, like this:
in the file before I typed this command it would be "Banned: 1", after I type the command I want it to read "Banned: 0"
Any idea?