Pass
[data]
Pass
CMD:changepass(playerid, params[])
{
new newpass[50], oldpass[50], string[128];
format(oldpass, 50, "%s", pInfo[playerid][Pass]);
new INI:file = INI_Open(PlayerPath(playerid));
if(sscanf(params, "s[50]s[50]", oldpass, newpass)) return SendClientMessage(playerid, COLOR_GREY, "SYNTAX: /changepass [oldpass] [newpass]");
if(strval(pInfo[playerid][Pass]) < 0) return SendClientMessage(playerid, COLOR_GREY, "Don't leave the line called 'oldpass' blank!");
if(strval(newpass) < 0) return SendClientMessage(playerid, COLOR_GREY, "Don't leave the line called 'newpass' blank!");
if(udb_hash(oldpass) != pInfo[playerid][Pass]) return SendClientMessage(playerid, COLOR_GREY, "That is not your oldpassword!");
if(udb_hash(oldpass) == udb_hash(newpass)) return SendClientMessage(playerid, COLOR_GREY, "You are trying to set your old password to be new password!");
INI_WriteInt(file, "Pass", udb_hash(newpass));
INI_Close(file);
format(string, sizeof(string), "Your password '%s' has been now replace with your new password '%s'", oldpass, newpass);
SendClientMessage(playerid, COLOR_GREY, string);
return 1;
}
MarryTo = Manuel_Smith
There is no "INI_SetTag" in that code. I'm guessing there was first time (well, there had to be). "INI_SetTag" is used to separate different sets of data with possibly the same keys, so as far as y_ini is concerned, that is a different piece of data with the same name.
|
MarryTo = Firstname_Lastname