Changepass command
#1

Hi guys! Im using SFCRRPG gamemode. I would like change /changepass command. I would like command is /changepass oldpass newpass but this command only /changepass newpass

This is changepass command
Код:
dcmd_changepass(playerid,params[])
{
	#pragma unused params
	
	ShowChangePassScreen(playerid);
	SendClientMessage(playerid,COLOR_LIGHTBLUE,"Enter your desired password into the box below and click ok.");
	return 1;
}

This is DIALOG_CHANGEPASS

Код:
     if(dialogid == DIALOG_CHANGEPASS)
    {
        if (response == 0)
	    {
			return 1;
	    }
	    if (response == 1)
	    {
            if (strlen(inputtext)==0)
			{
		        SendClientMessage(playerid,COLOR_ERROR,"Please enter your desired password in the box.");
                ShowChangePassScreen(playerid);
				return 1;
			}
            udb_UserSetInt(PlayerName(playerid),"password_hash",udb_hash(inputtext));
            format(string,sizeof(string),"You have successfully changed your password to '%s', use this to login from now on.",inputtext);
			SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
            return true;
	    }
	    return 1;
    }

And this is stock ShowChangePassScreen

Код:
stock ShowChangePassScreen(playerid)
{
    new string[128];
    format(string, sizeof(string), "Please make sure you enter your new password correctly.\nEnter your desired password below then click ok.",PlayerName(playerid));
    ShowPlayerDialog(playerid,DIALOG_CHANGEPASS,DIALOG_STYLE_INPUT,"Enter the new password.",string,"Change","Cancel");
}

I would like /changepass oldpass newpass

Please help me

Sorry for my bad english.
Reply
#2

on change pass you can put your register dialog!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)