10.01.2012, 13:02
I do it with ZCMD and sscanf:
pawn Код:
CMD:changepassword(playerid, params[])
{
new pass[24];
if(sscanf(params, "s[24]", pass)) return SendClientMessage(playerid, -1, "USAGE: /changepassword <pass>");
new file[128], pName[24];
GetPlayerName(playerid, 24, pName);
format(file, 128, "folder/%s.ini", pName); // Insert the utents' folder. Example: Utents/%s.ini.
new File:INI_Open(file);
INI_WriteString(File, "Password", pass);
INI_Close(File);
SendClientMessage(playerid, -1, "Your password has been changed.");
return 1;
}