PHP код:
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register","You have entered an invalid password.\nType your password below to register a new account.","Register","Quit");
if(strlen(inputtext) <= 5 || strlen(inputtext) >= 16)
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register","You have entered an invalid password.\nType your password below to register a new account.","Register","Quit");
SendClientMessage(playerid,COLOR_RED,"Passwords must be between 6 - 15 characters in length. Please type your password correctly to continue");
return 1;
}
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",2500);
INI_WriteInt(File,"BankCash",PlayerInfo[playerid][pBankCash]);
INI_WriteInt(File,"Score",0);
INI_WriteInt(File,"Admin",0);
new Year, Month, Day;
getdate(Year, Month, Day);
format(string,sizeof(string),"%02d/%02d/%d", Day, Month, Year);
INI_WriteString(File,"DateJoined",string);
INI_Close(File);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,"Success!","You have successfully registed","Ok","");
}
}
This is Under OnDialogResponse