How to write in to another players INI file
#1

Okay so each user who registers to my server has an INI file where I store all of their data such as there cash, weapons etc so that when they log back in they still have all this stuff (pretty basic I know). I understand how to write into the playerid's INI file but how do I write into another players INI file that isn't the playerid.

For example I want to make a set hit command so I'll start it like this (I'm using ZCMD and sscanf)

Код:
CMD:sethit(playerid, params[])
{
     new receiver, amount;
     if (!sscanf(params, "ii", receiver, amount)
     {
          new INI:File = INI_Open(UserPath(playerid));
          INI_WriteInt(File,"Hit",amount);
          INI_Close(File);
     }
}
But this would write into the player who typed the commands INI file instead of the targets INI file. So where do I put the "receiver" variable so that I can make it write to the receivers file? Do I replace the UserPath(playerid) with UserPath(receiver) or how does it work?

Help will be much appreciated! Thanks in advance.
Reply


Messages In This Thread
How to write in to another players INI file - by Spikmun - 11.05.2013, 22:33
Re: How to write in to another players INI file - by Frede - 11.05.2013, 22:40
Re: How to write in to another players INI file - by Spikmun - 11.05.2013, 23:23
Re: How to write in to another players INI file - by JJB562 - 12.05.2013, 00:06
Re: How to write in to another players INI file - by Chenko - 12.05.2013, 01:06
Re: How to write in to another players INI file - by Spikmun - 12.05.2013, 01:48

Forum Jump:


Users browsing this thread: 1 Guest(s)