Editing a file using djSon?
#1

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:
Код:
/unban jake_colby
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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)