Need /Changepass Cmd
#5

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

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;
   }
Reply


Messages In This Thread
Need /Changepass Cmd - by misho1 - 17.07.2012, 02:12
Re: Need /Changepass Cmd - by StrangeLove - 17.07.2012, 02:22
Re: Need /Changepass Cmd - by misho1 - 21.07.2012, 00:03
Re : Need /Changepass Cmd - by Sandiel - 21.07.2012, 00:43
Re: Need /Changepass Cmd - by misho1 - 22.07.2012, 17:47
Re: Need /Changepass Cmd - by misho1 - 24.07.2012, 22:07
Re: Need /Changepass Cmd - by FUNExtreme - 24.07.2012, 22:10
Re: Need /Changepass Cmd - by misho1 - 24.07.2012, 22:34
Re: Need /Changepass Cmd - by FUNExtreme - 25.07.2012, 10:41
Re: Need /Changepass Cmd - by misho1 - 25.07.2012, 17:44

Forum Jump:


Users browsing this thread: 1 Guest(s)