20.01.2018, 06:53
PHP код:
if (dialogid == DIALOG_REGISTER)
{
if (response)
{
if (dini_Isset(AddDirFile(dir_datafiles, FILE_TOTALSTAT), "regdis"))
return SendClientMessage2(playerid, COLOR_RED, "Registration is currently disabled. Please try again later.");
temp1 = dini_Int(AddDirFile(dir_datafiles, FILE_TOTALSTAT), "users");
if (temp1 == 99999999)
return SendClientMessage2(playerid, COLOR_RED, "Max account limit reached.");
if (strlen(inputtext) < 6 || strlen(inputtext) > 18) {
ShowPlayerDialog2(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Register an account", "You must register an account to play in this server.\n\nType a password below to register an account.\n\n{E60026}Password length must be between 6-18 chars.", "Continue", "Cancel");
SendClientMessage2(playerid, COLOR_RED, "Your password must be between 6-18 characters.");
return 1;
}
SetPVarInt(playerid, "confirmpass", num_hash(inputtext));
ShowPlayerDialog2(playerid, DIALOG_REGISTER_CONFIRM, DIALOG_STYLE_PASSWORD, "Register an account", "Please confirm your password.", "Register", "Cancel");
}
else {
SendClientMessage2(playerid, COLOR_WHITE, "You must register to play! Type /register to continue.");
}
return 1;
}

