09.01.2012, 18:15
I need help how to make command changepassword I use y_ini system for save data
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;
}
CMD:changepassword(playerid, params[]) { new passtring[24]; if(sscanf(params, "s[24]", passtring)) return SendClientMessage(playerid, -1, "USAGE: /changepassword <pass>"); new File:INI_Open(UserPath); INI_WriteString(File, "Password", udb_hash(passtring)); INI_Close(File); SendClientMessage(playerid, -1, "Your password has been changed."); return 1; }