22.07.2012, 17:47
(
Последний раз редактировалось misho1; 24.07.2012 в 22:06.
)
EDITED
I Fixed The Errors And The Warnings But When I Use The Cmd It Say The Oldpass Is Incorrect And I Type The Correct Pass
I Fixed The Errors And The Warnings But When I Use The Cmd It Say The Oldpass Is Incorrect And I Type The Correct Pass
pawn Код:
YCMD:changepass(playerid, params[], help)
{
new string[200],newpass[200],oldpass[200],oldhashpass[200],newhashpass[200];
WP_Hash(newhashpass,sizeof(newhashpass),newpass);
WP_Hash(oldhashpass,sizeof(oldhashpass),oldpass);
if(sscanf(params,"s[128]s[128]",oldpass,newpass)) return SendClientMessage(playerid,RED,"USAGE:/ChangePass [OldPass] [Newpass]");
if(strcmp(oldhashpass,PInfo[playerid][Pass])) return SendClientMessage(playerid,RED,"The Old Password Is Incorrect");
format(string,sizeof(string),"You Have Changed Your Password From {FF0000}%s {008000}To {FF0000}%s",oldpass,newpass);
SendClientMessage(playerid,GREEN,string);
new INI:file = INI_Open(Path(playerid));
INI_SetTag(file,"Player's Data");
INI_WriteString(file,"Password",newhashpass);
INI_Close(file);
return 1;
}