• Уважаемый Гость.
    - Прежде чем создать свою тему, пожалуйста, попробуй воспользоваться этим -> ПОИСКОМ !!!
    - После решения Вашего вопроса (проблемы) - нажмите "Лучший ответ", на сообщении, которое его решило. За игнорирование этого действия - Вы получите соответствующее предупреждение. Мы - стараемся Вам помочь. Уделите 10 секунд - чтобы нажать кнопку. (Если у Вас нет такой возможности - укажите в последнем своем сообщении какой ответ Вы считаете лучшим. Наши модераторы сделают это за Вас)
    ЗАПРЕЩЕНО:
    - Cоздавать темы с названиями "Помогите", "Плиз", "Ошибка", "Не могу найти", "Хелп" и тому подобное;
    - Cоздавать темы без детального описания того, что нужно исправить.
    - Cоздавать темы из одного скриншота.
    За игнор правил форума - Ваша тема будет удалена, а Вы получите системное предупреждение.

Не могу найти дыру.Поможете?

Статус
В этой теме нельзя размещать новые ответы.

Claim

Нуль
Регистрация
8 Апр 2019
Сообщения
3
Лучшие ответы
0
Репутация
0
Я недавно начал заниматься созданием серверов, поэтому не отзывайтесь что я дебил и как-то наподобие этому.Начну с описания самой ситуации:
При попытке активировать код безопасности ничего не выходит - вводишь код, а потом тебя кикает с причиной типа у тебя уже поставлен код.Ошибок при компиляции нет.
Вот видео:
Я предполагаю, что дыра кроется тут:

PHP:
else if(playertextid >= Captcha[2] && playertextid <= Captcha[11])
	{
		for(new i = 2; i < sizeof(Captcha); i++)
		{
			if(playertextid == Captcha[i])
			{
				new sstring[96];
				GetPVarString(playerid, "CaptchaText", sstring, sizeof(sstring));
				switch(GetPVarInt(playerid, "CaptchaStep"))
				{
				case 0: format(sstring, sizeof(sstring), "%c", TextArray[i - 2]), strcat(sstring, "----"), SetPVarString(playerid, "CaptchaText", sstring);
				case 1: format(sstring, sizeof(sstring), "%s%c", sstring, TextArray[i - 2]), strdel(sstring, 1, 5), strcat(sstring, "---"), SetPVarString(playerid, "CaptchaText", sstring);
				case 2: format(sstring, sizeof(sstring), "%s%c", sstring, TextArray[i - 2]), strdel(sstring, 2, 5), strcat(sstring, "--"), SetPVarString(playerid, "CaptchaText", sstring);
				case 3: format(sstring, sizeof(sstring), "%s%c", sstring, TextArray[i - 2]), strdel(sstring, 3, 5), strcat(sstring, "-"), SetPVarString(playerid, "CaptchaText", sstring);
				case 4:
					{
						strdel(sstring, 4, 5);
						format(sstring, sizeof(sstring), "%s%c", sstring, TextArray[i - 2]);
						PlayerTextDrawSetString(playerid, Captcha[1], sstring);
						if(!strcmp(PlayerInfo[playerid][pSuperKey], "None", true))
						{
							for(new l = 0; l < sizeof(Captcha); l++)PlayerTextDrawHide(playerid, Captcha[l]);
							DeletePVar(playerid, "CaptchaStep");
							DeletePVar(playerid, "CaptchaText");
							strmid(PlayerInfo[playerid][pSuperKey], sstring, 0, strlen(sstring), 96);
							string = "";
							format(string, 256, "{17D4AE}[Система безопасности]"WHITE" Код безопасности: {14E5F8}%s"WHITE" - успешно установлен.", PlayerInfo[playerid][pSuperKey]);
							SendClientMessage(playerid, 0x17D4AEFF, string);
							SendClientMessage(playerid, 0x17D4AEFF, "{17D4AE}[Система безопасности]"WHITE" Чтобы не забыть код безопасности, сделайте скриншот. (Клавиша: F8)");
							CancelSelectTextDraw(playerid);
							TogglePlayerControllable(playerid, 1);
							PlayerInfo[playerid][pKeylog] = 1;
							UpdatePlayerData(playerid, "pKeylog", PlayerInfo[playerid][pKeylog]);
							UpdatePlayerDataEx(playerid, "pSuperKey", PlayerInfo[playerid][pSuperKey]);
							return 1;
						}
						else
						{
							if(strcmp(PlayerInfo[playerid][pSuperKey], sstring) != 0)
							{
								new playerip[16], data2[64], day, month, year;
								getdate(day, month, year);
								format(data2, 64, "%d-%d-%d", day, month, year);
								GetPlayerIp(playerid, playerip, sizeof(playerip));
								mysql_format(1, string, 200, "INSERT INTO `captchalog` (`clName`, `clIP`, `clDate`, `clStatus`) VALUES ('%e', '%e', '%e', '0')", PlayerInfo[playerid][pNames], playerip, data2);
								mysql_tquery(1, string);
								for(new l = 0; l < sizeof(Captcha); l++) PlayerTextDrawHide(playerid, Captcha[l]);
								DeletePVar(playerid, "CaptchaStep"); DeletePVar(playerid, "CaptchaText");
								SendClientMessage(playerid, 0x17D4AEFF, "{17D4AE}[Система безопасности]"WHITE" Код безопасности введен неверно.");
								SendClientMessage(playerid, 0x17D4AEFF, "{17D4AE}[Система безопасности]"WHITE" Информация о попытке ввода капчи отправлена владельцу аккаунта.");
								KickEx(playerid);
								return 1;
							}
							else
							{
								new playerip[16], data2[64],day, month, year;
								getdate(day, month, year);
								format(data2, 64, "%d-%d-%d", day, month, year);
								GetPlayerIp(playerid, playerip, sizeof(playerip));
								mysql_format(1, string, 200, "INSERT INTO `captchalog` (`clName`, `clIP`, `clDate`, `clStatus`) VALUES ('%e', '%e', '%e', '1')", PlayerInfo[playerid][pNames], playerip, data2);
								mysql_tquery(1, string);
								for(new l = 0; l < sizeof(Captcha); l++) PlayerTextDrawHide(playerid, Captcha[l]);
								DeletePVar(playerid, "CaptchaStep"); DeletePVar(playerid, "CaptchaText"), DeletePVar(playerid, "ShowKey");
								CancelSelectTextDraw(playerid);
								TogglePlayerControllable(playerid, true);
								LoadPlayerAccount(playerid);
								return 1;
							}
						}
					}
				}
				SetPVarInt(playerid, "CaptchaStep", GetPVarInt(playerid, "CaptchaStep") + 1);
				PlayerTextDrawSetString(playerid, Captcha[1], sstring);
			}
		}
	}
	return 1;
}
Это был отрывок из
PHP:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
.
Если кто знает причину или сталкивался уже с таким, то помогите пожалуйста!
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу