11.05.2013, 22:33
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)
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.
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); } }
Help will be much appreciated! Thanks in advance.