Доступ к готовым решениям

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

Урок РП Тест

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

-WorcOut-

«I'am WorcOut» ♫
Автор:
Мод: National State RP
Время работы 1.5 - 2 ч

Для начало создадим переменную.
PHP:
new PlayerText:name_rp_text				[MAX_PLAYERS][12]; // колл TextDraw
Далее в последней стадий регистраций мы изменяем ид диалога
PHP:
case 87:
		{
		    if(response)
		    {
			    for ( new i = 0 ; i < 12 ; i++ )
				{
				    SetPVarInt(playerid, "true_playertextid", _:name_rp_text[playerid][6]);
					PlayerTextDrawShow (
										 playerid , name_rp_text [ playerid ] [ i ] )
				 	;// Показываем TextDraw Игроку.
	  			}
			}
			SelectTextDraw(playerid, 0xFFFFFF44);
   		}
После в OnPlayerClickPlayerTextDraw мы добавляем сами тесты
- Тест стоит из 4 варианта ответа
PHP:
if(playertextid == name_rp_text[playerid][5] || playertextid == name_rp_text[playerid][6] || playertextid == name_rp_text[playerid][7]|| playertextid == name_rp_text[playerid][8])
	{
    	if(GetPVarInt(playerid, "true_playertextid") == _:playertextid)
		{
		    new string[128];
		    switch(GetPVarInt(playerid, "questid"))
			{
                case 1:
				{
				    SetPVarInt(playerid, "true_playertextid", _:name_rp_text[playerid][6]);
				    SetPVarInt(playerid, "questid", 2);

                    SCM(playerid , COLOR_RED , "* Ответ верный.");
                    format(string,sizeof(string),TranslateText("2 Вопрос"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][1],string);
					
					format(string,sizeof(string),TranslateText("Mo›®o ћњ њcЈoћ©џoўa¦© ЈpЁ›kњ c ‰eћ©«"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][3],string);

					format(string,sizeof(string),TranslateText("быстрого перемещения?"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][4],string);

					format(string,sizeof(string),TranslateText("- Да, это же игра."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][9],string);

					format(string,sizeof(string),TranslateText("- He¦, ®a PЊ cepўepax ЈpЁ›kњ џaЈpeЎe®Ё."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][10],string);

					format(string,sizeof(string),TranslateText("- Ecћњ ®њko™o p¬љoЇ ®e¦y, ¦o Їo›®o."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][11],string);
				}
				case 2:
				{
				    SetPVarInt(playerid, "true_playertextid", _:name_rp_text[playerid][6]);
				    SetPVarInt(playerid, "questid", 3);

                    SCM(playerid , COLOR_RED , "* Ответ верный.");
                    format(string,sizeof(string),TranslateText("3 Вопрос"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][1],string);
					
					format(string,sizeof(string),TranslateText("Можно ли передавать деньги или имущество"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][3],string);

					format(string,sizeof(string),TranslateText("между своими аккаунтами?"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][4],string);

					format(string,sizeof(string),TranslateText("- да,ведь это мои аккаунты."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][9],string);

					format(string,sizeof(string),TranslateText("- нет, это запрещено."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][10],string);

					format(string,sizeof(string),TranslateText("- Їo›®o ecћњ Є¦o ®њk¦o ®e yџ®ae¦."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][11],string);
                }
                case 3:
				{
				    SetPVarInt(playerid, "true_playertextid", _:name_rp_text[playerid][7]);
				    SetPVarInt(playerid, "questid", 4);
				
				    SCM(playerid , COLOR_RED , "* Ответ верный.");
				    format(string,sizeof(string),TranslateText("4 Вопрос"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][1],string);
					
					format(string,sizeof(string),TranslateText("¤¦o љeћa¦©, ecћњ ўЁ ўњљњ¦e ®apyҐe®њe њ™poka?"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][3],string);

					format(string,sizeof(string),TranslateText(""));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][4],string);

					format(string,sizeof(string),TranslateText("- Убью его."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][9],string);

					format(string,sizeof(string),TranslateText("- Проигнарирую."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][10],string);

					format(string,sizeof(string),TranslateText("- Cљeћa« ckpњ®Ґo¦ њ Јoџoўy aЇњ®њc¦pa‰њ«."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][11],string);
                }
                case 4:
				{
				    SetPVarInt(playerid, "true_playertextid", _:name_rp_text[playerid][6]);
				    SetPVarInt(playerid, "questid", 5);

                    SCM(playerid , COLOR_RED , "* Ответ верный.");
                    format(string,sizeof(string),TranslateText("5 Вопрос"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][1],string);
					
					format(string,sizeof(string),TranslateText("- Mo›®o ћњ ўЁxoљњ¦© ў AЃK ўo ўpeЇ¬ PЊ cњ¦ya‰њњ?"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][3],string);

					format(string,sizeof(string),TranslateText(""));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][4],string);

					format(string,sizeof(string),TranslateText("- Да, если нужно."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][9],string);

					format(string,sizeof(string),TranslateText("- ѓa, ®o ®y›®o ЈpeљyЈpeљњ¦© ўce c¦opo®Ё o— o¦xoљe."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][10],string);

					format(string,sizeof(string),TranslateText("- ѓa, Јpoc¦o Їo›®o yќ¦њ њћњ ўoo—Ўe ўЁќ¦њ њџ њ™pЁ."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][11],string);
				}
				case 5:
				{
				    SetPVarInt(playerid, "true_playertextid", _:name_rp_text[playerid][6]);
				    SetPVarInt(playerid, "questid", 6);

                    SCM(playerid , COLOR_RED , "* Ответ верный.");
                    format(string,sizeof(string),TranslateText("6 Вопрос"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][1],string);
					
					format(string,sizeof(string),TranslateText("Ќ¦o ¦akoe IC њ®ЃopЇa‰њ¬?"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][3],string);

					format(string,sizeof(string),TranslateText(""));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][4],string);

					format(string,sizeof(string),TranslateText("- O—Ўa¬ њ®ЃopЇa‰њ¬."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][9],string);

					format(string,sizeof(string),TranslateText("- …™poўa¬ њ®ЃopЇa‰њ¬."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][10],string);

					format(string,sizeof(string),TranslateText("- ‹®eњ™poўa¬ њ®ЃopЇa‰њ¬."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][11],string);
				}
				case 6:
				{
				    SetPVarInt(playerid, "true_playertextid", _:name_rp_text[playerid][7]);
				    SetPVarInt(playerid, "questid", 7);

                    SCM(playerid , COLOR_RED , "* Ответ верный.");
                    format(string,sizeof(string),TranslateText("7 Вопрос"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][1],string);
					
					format(string,sizeof(string),TranslateText("Что такое ООС информация?"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][3],string);

					format(string,sizeof(string),TranslateText(""));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][4],string);

                    format(string,sizeof(string),TranslateText("- Общая информация."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][9],string);

					format(string,sizeof(string),TranslateText("- Игровая информация."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][10],string);

					format(string,sizeof(string),TranslateText("- Внеигровая информация."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][11],string);
				}
				case 7:
				{
				    SetPVarInt(playerid, "true_playertextid", _:name_rp_text[playerid][6]);
				    SetPVarInt(playerid, "questid", 8);

                    SCM(playerid , COLOR_RED , "* Ответ верный.");
                    format(string,sizeof(string),TranslateText("8 Вопрос"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][1],string);
					
					format(string,sizeof(string),TranslateText("Что такое MG?"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][3],string);

					format(string,sizeof(string),TranslateText(""));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][4],string);

					format(string,sizeof(string),TranslateText("- Метательная граната."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][9],string);

					format(string,sizeof(string),TranslateText("- Использование ООС в IC."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][10],string);

					format(string,sizeof(string),TranslateText("- Убийство без причины."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][11],string);
				}
				case 8:
				{
				    SetPVarInt(playerid, "true_playertextid", _:name_rp_text[playerid][5]);
				    SetPVarInt(playerid, "questid", 9);

                    SCM(playerid , COLOR_RED , "* Ответ верный.");
                    format(string,sizeof(string),TranslateText("9 Вопрос"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][1],string);
					
					format(string,sizeof(string),TranslateText("Что такое RP?"));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][3],string);

					format(string,sizeof(string),TranslateText(""));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][4],string);

					format(string,sizeof(string),TranslateText("- Игра по ролям."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][9],string);

					format(string,sizeof(string),TranslateText("- Бег с прижком."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][10],string);

					format(string,sizeof(string),TranslateText("- Игра с чит программами."));
					PlayerTextDrawSetString(playerid, name_rp_text[playerid][11],string);
				}
				case 9:
				{
			         // Переход на авторизацию или следующий диалог....
				}
			}
    	}
    	else  SCM(playerid , COLOR_RED , "* Ответ не верный."), KickFix(playerid); // не верный ответ из 4 вариантов кик
	}
Далее в OnPlayerConnect добавим TextDraw
PHP:
//==========================================================================
  	name_rp_text[playerid][0] = CreatePlayerTextDraw(playerid, 198.235015, 184.083328, "usebox");
	PlayerTextDrawLetterSize(playerid, name_rp_text[playerid][0], 0.000000, 1.328536);
	PlayerTextDrawTextSize(playerid, name_rp_text[playerid][0], -0.588235, 0.000000);
	PlayerTextDrawUseBox(playerid, name_rp_text[playerid][0], true);
	PlayerTextDrawBoxColor(playerid, name_rp_text[playerid][0], 4617727);

	name_rp_text[playerid][1] = CreatePlayerTextDraw(playerid, 96.941184, 183.166732, "1 ‹oЈpoc");
	PlayerTextDrawLetterSize(playerid, name_rp_text[playerid][1], 0.307410, 1.261667);
	PlayerTextDrawAlignment(playerid, name_rp_text[playerid][1], 2);
	PlayerTextDrawSetShadow(playerid, name_rp_text[playerid][1], 0);
	PlayerTextDrawBackgroundColor(playerid, name_rp_text[playerid][1], 51);
	PlayerTextDrawFont(playerid, name_rp_text[playerid][1], 2);

	name_rp_text[playerid][2] = CreatePlayerTextDraw(playerid, 198.764694, 200.249954, "usebox");
	PlayerTextDrawLetterSize(playerid, name_rp_text[playerid][2], 0.000000, 12.199137);
	PlayerTextDrawTextSize(playerid, name_rp_text[playerid][2], -0.117646, 0.000000);
	PlayerTextDrawUseBox(playerid, name_rp_text[playerid][2], true);
	PlayerTextDrawBoxColor(playerid, name_rp_text[playerid][2], 421075455);

	name_rp_text[playerid][3] = CreatePlayerTextDraw(playerid, 97.882385, 201.249954 , "- –O„мO_‡…_ЊPO‹O‰…PO‹AЏ’_ЊO‡…‰…«_мA_ЊO‚Oм«,");
	PlayerTextDrawLetterSize(playerid, name_rp_text[playerid][3], 0.154469, 0.993332);
	PlayerTextDrawAlignment(playerid, name_rp_text[playerid][3], 2);
	PlayerTextDrawSetShadow(playerid, name_rp_text[playerid][3], 0);
	PlayerTextDrawBackgroundColor(playerid, name_rp_text[playerid][3], 51);
	PlayerTextDrawFont(playerid, name_rp_text[playerid][3], 2);

	name_rp_text[playerid][4] = CreatePlayerTextDraw(playerid, 99.350898, 215.083343, "ecћњ ®e ¤e™o љeћa¦© њ ‹Ё xo¦њ¦e Јopaџўћe¤©c¬?");
	PlayerTextDrawLetterSize(playerid, name_rp_text[playerid][4], 0.154467, 0.993332);
	PlayerTextDrawAlignment(playerid, name_rp_text[playerid][4], 2);
	PlayerTextDrawSetShadow(playerid, name_rp_text[playerid][4], 0);
	PlayerTextDrawBackgroundColor(playerid, name_rp_text[playerid][4], 51);
	PlayerTextDrawFont(playerid, name_rp_text[playerid][4], 2);

	name_rp_text[playerid][5] = CreatePlayerTextDraw(playerid, 1.882352, 239.166671, "LD_SPAC:white");
	name_rp_text[playerid][6] = CreatePlayerTextDraw(playerid, 1.470587, 257.666625, "LD_SPAC:white");
	name_rp_text[playerid][7] = CreatePlayerTextDraw(playerid, 1.529412, 276.166656, "LD_SPAC:white");
	name_rp_text[playerid][8] = CreatePlayerTextDraw(playerid, 1.588235, 294.083404, "LD_SPAC:white");
	for(new i = 5; i < 9; i++)
	{
		PlayerTextDrawLetterSize(playerid, name_rp_text[playerid][i], 0.000000, 0.000000);
		PlayerTextDrawTextSize(playerid, name_rp_text[playerid][i], 195.294113, 13.416655);
		PlayerTextDrawAlignment(playerid, name_rp_text[playerid][i], 1);
		PlayerTextDrawColor(playerid, name_rp_text[playerid][i], 4617727);
		PlayerTextDrawUseBox(playerid, name_rp_text[playerid][i], true);
		PlayerTextDrawBoxColor(playerid, name_rp_text[playerid][i], 255);
		PlayerTextDrawSetShadow(playerid, name_rp_text[playerid][i], 0);
		PlayerTextDrawSetOutline(playerid, name_rp_text[playerid][i], 0);
		PlayerTextDrawFont(playerid, name_rp_text[playerid][i], 4);
		PlayerTextDrawSetSelectable(playerid, name_rp_text[playerid][i], true);
	}
	name_rp_text[playerid][9] = CreatePlayerTextDraw(playerid, 95.588264, 240.749954, "- ѓa, Є¦o ›e koЈЁ.");
	name_rp_text[playerid][10] = CreatePlayerTextDraw(playerid, 98.943275, 259.249938, "- He¦, ®y›®o ўec¦њ ce—¬ aљekўa¦®o«.");
	name_rp_text[playerid][11] = CreatePlayerTextDraw(playerid, 99.472686, 278.333282, "- “¦o њ™pa ¤¦o xo¤y ¦o њ љeћa«.");
    for(new i = 9; i < 12; i++)
	{
		PlayerTextDrawLetterSize(playerid, name_rp_text[playerid][i], 0.154469, 0.993332);
		PlayerTextDrawAlignment(playerid, name_rp_text[playerid][i], 2);
		PlayerTextDrawSetShadow(playerid, name_rp_text[playerid][i], 0);
		PlayerTextDrawBackgroundColor(playerid, name_rp_text[playerid][i], 51);
		PlayerTextDrawFont(playerid, name_rp_text[playerid][i], 2);
	}
​
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу