28.12.2014, 13:38
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
This is DIALOG_CHANGEPASS
And this is stock ShowChangePassScreen
I would like /changepass oldpass newpass
Please help me
Sorry for my bad english.
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;
}
Код:
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;
}
Код:
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");
}
Please help me
Sorry for my bad english.

