03.01.2013, 13:31
pawn Код:
if(dialogid == dregister)
{
if(!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register","Welcome! This account is not registered.\nEnter your own password to create a new account.\nPlease enter the password!","Register","Quit");
return 1;
}
if(!dini_Exists(Path(playerid)))
{
new password[129];
dini_Create(Path(playerid));
WP_Hash(password,sizeof(password),inputtext);
dini_Set(Path(playerid),"Password",password);
ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_PASSWORD,"Login","Welcome back. This account is registered. \nInsert your password to login to your account.","Login","Quit");
}
return 1;
}
}