How to add Questions before spawn?
#10

So look..

Here is the questions where i added.

Код:
//---------------------------<[ OnDialogResponse ]>--------------------------------------------------------

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	new sendername[MAX_PLAYER_NAME];
	new string[128];
	if(response)
	{
		if(dialogid == 12346 || dialogid == 12347)
		{
		    if(strlen(inputtext))
		    {
				new tmppass[64];
				strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
				//Encrypt(tmppass);
				OnPlayerLogin(playerid,tmppass);
			}
			else
			{
				new loginstring[128];
				new loginname[64];
				GetPlayerName(playerid,loginname,sizeof(loginname));
				format(loginstring,sizeof(loginstring),"WRONG PASSWORD\nPlease enter the correct password:",loginname);
				ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
				gPlayerLogTries[playerid] += 1;
				if(gPlayerLogTries[playerid] == 5) { Ban(playerid); }
			}
		}
		if(dialogid == 12345)
		{
		    if(strlen(inputtext))
		    {
				GetPlayerName(playerid, sendername, sizeof(sendername));
				format(string, sizeof(string), "%s.ini", sendername);
				new File: hFile = fopen(string, io_read);
				if (hFile)
				{
					SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
					fclose(hFile);
					return 1;
				}
				new tmppass[64];
				strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
				//Encrypt(tmppass);
				OnPlayerRegister(playerid,tmppass);
                SendClientMessage(playerid, COLOR_RED,"Morate odgovoriti tacno na sljedeca pitanja kako bi pristupili igri");
		        ShowPlayerDialog(playerid, 1249, DIALOG_STYLE_LIST, "Sta je RolePlay?", "Gluma stvarnog zivota\nUbijanje sto vise ljudi je moguce\nDa se ponasamo onako kako se ne bi ponasali u RL"," .", " .");
			}
			else
			{
 				new regstring[128];
				new regname[64];
				GetPlayerName(playerid,regname,sizeof(regname));
				format(regstring,sizeof(regstring),"Welcome, %s\nYou dont have an account.\nPlease register:",regname);
				ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
			}
		}
	}
	else
	{
		Kick(playerid);
	}
	if(dialogid == 1249)
		{
		    if(response)
		    {
		        if(listitem == 0)
		        {
		            ShowPlayerDialog(playerid, 1248, DIALOG_STYLE_LIST, "Sta je SpawnKill?", "Ubijanje na mjestu spawna i to je nedozvoljeno\nUbijanje na mjestu spawna i to je dozvoljeno\nPljacka banke"," .", " .");
		            SendClientMessage(playerid, COLOR_GREY,"* Tacan odgovor");
				}
				else if(listitem == 1)
		        {
		            SendClientMessage(playerid, COLOR_GREY,"* Netacan odgovor");
		            Kick(playerid);
				}
				else if(listitem == 2)
		        {
		            SendClientMessage(playerid, COLOR_GREY,"* Netanac odgovor");
		            Kick(playerid);
				}
			}
			else
			{
			    Kick(playerid);
			}
		}
		if(dialogid == 1248)
		{
		    if(response)
		    {
		        if(listitem == 0)
		        {
		            ShowPlayerDialog(playerid, 1251, DIALOG_STYLE_LIST, "Sta je DeathMatch?", "Ubijanje bez razloga i to je dozvoljeno\nUbijanje bez razloga i to je dozvoljeno\nUbijanje i nije dozvoljeno,ide se u zatvor"," .", " .");
		            SendClientMessage(playerid, COLOR_GREY,"* Tacan odgovor");
				}
				else if(listitem == 1)
		        {
		            SendClientMessage(playerid, COLOR_GREY,"* Netacan odgovor");
		            Kick(playerid);
				}
				else if(listitem == 2)
		        {
		            SendClientMessage(playerid, COLOR_GREY,"* Netanac odgovor");
		            Kick(playerid);
				}
			}
			else
			{
			    Kick(playerid);
			}
		}
		if(dialogid == 1251)
		{
		    if(response)
		    {
		        if(listitem == 0)
		        {
		            SendClientMessage(playerid, COLOR_GREY,"* NETacan odgovor");
		            Kick(playerid);
				}
				else if(listitem == 1)
		        {
		            SendClientMessage(playerid, COLOR_GREY,"* Netacan odgovor");
		            Kick(playerid);
				}
				else if(listitem == 2)
		        {
		            SendClientMessage(playerid, COLOR_GREY,"* Tacan odgovor");
				}
			}
			else
			{
			    Kick(playerid);
			}
		}
			return 1;
}
and down on other line is tutorial:

Код:
			if(TutTime[i] >= 1)
			{
			    TutTime[i] += 1;
                if(TutTime[i] == 3)
			    {
			        ClearChatbox(i, 10);
			        SetPlayerCameraPos(i, 2247.0215,-1655.0173,17.2856);
					SetPlayerCameraLookAt(i, 2244.6536,-1663.9304,15.4766);
					SetPlayerInterior(i, 0);
					SetPlayerVirtualWorld(i, 0);
					SetPlayerPos(i, 2256.3555,-1646.6377,-5.00);
			        SendClientMessage(i, COLOR_GREEN, "~ CLOTHES SHOP ~");
			        SendClientMessage(i, COLOR_WHITE, " ");
			        SendClientMessage(i, COLOR_WHITE, "First of all you'll need some clothes, you can buy them at any clothes shop.");
			        SendClientMessage(i, COLOR_WHITE, "When you're in the shop type /clothes and then type next untill you find the clothes that you like.");
			        ClearChatbox(i, 2);
			    }
			    else if(TutTime[i] == 16)
			    {
			        ClearChatbox(i, 10);
			        SetPlayerPos(i, 2089.6624,-1901.7891,-5.00);
			        SetPlayerCameraPos(i, 2070.8093,-1914.6747,18.5469);
					SetPlayerCameraLookAt(i, 2055.2405,-1906.4608,13.5469);
					SetPlayerInterior(i, 0);
			        SendClientMessage(i, COLOR_GREEN, "~ LICENSES CENTER ~");
			        SendClientMessage(i, COLOR_WHITE, " ");
			        SendClientMessage(i, COLOR_WHITE, "You still have no driving/flying/sailing licenses? Shame on you!");
			        SendClientMessage(i, COLOR_WHITE, "You must first buy any of a kind licenses to get a license.");
			        SendClientMessage(i, COLOR_WHITE, "You can see the list of buyable licenses by just typing /buylic.");
			        ClearChatbox(i, 2);
			    }
			    else if(TutTime[i] == 25)
			    {
			        ClearChatbox(i, 10);
			        SetPlayerPos(i, 1514.3059,-1667.8116,-5.00);
			        SetPlayerCameraPos(i, 1535.9584,-1676.1428,18.3828);
					SetPlayerCameraLookAt(i, 1553.7861,-1676.4270,16.1953);
					SetPlayerInterior(i, 0);
			        SendClientMessage(i, COLOR_GREEN, "~ POLICE DEPARTMENT ~");
			        SendClientMessage(i, COLOR_WHITE, " ");
			        SendClientMessage(i, COLOR_WHITE, "The Los Santos Police Department and FBI are in the city for your protection.");
			        SendClientMessage(i, COLOR_WHITE, "People who commit crimes will dealt with swiftly and with force if necessary.");
			        SendClientMessage(i, COLOR_WHITE, "To call a police officer, call the emergency hotline using /call 911.");
			        ClearChatbox(i, 2);
			    }
			    else if(TutTime[i] == 35)
			    {
			        ClearChatbox(i, 10);
			        SetPlayerPos(i, 1221.7010,-1328.6449,-5.00);
			        SetPlayerCameraPos(i, 1204.3781,-1313.3323,16.3984);
					SetPlayerCameraLookAt(i, 1174.7167,-1323.4485,14.5938);
					SetPlayerInterior(i, 0);
			        SendClientMessage(i, COLOR_GREEN, "~ ALL SAINTS GENERAL HOSPITAL ~");
			        SendClientMessage(i, COLOR_WHITE, " ");
			        SendClientMessage(i, COLOR_WHITE, "Feeling sick? You need to see the doctor of Los Santos.");
			        SendClientMessage(i, COLOR_WHITE, "To call a paramedic, call the emergency hotline using /call 911");
			        SendClientMessage(i, COLOR_WHITE, "You'll spawn here after death");
			        ClearChatbox(i, 2);
			    }
			    else if(TutTime[i] == 45)
			    {
			        ClearChatbox(i, 10);
			        SetPlayerPos(i, 1786.1758,-1258.4976,-5.00);
			        SetPlayerCameraPos(i, 1779.4259,-1275.1025,15.6328);
					SetPlayerCameraLookAt(i, 1785.7263,-1296.0200,13.4213);
					SetPlayerInterior(i, 0);
			        SendClientMessage(i, COLOR_GREEN, "~ ABC STUDIO ~");
			        SendClientMessage(i, COLOR_WHITE, " ");
			        SendClientMessage(i, COLOR_WHITE, "Got some fresh news to announce? Go to the ABC Studio reporters and ask them to do it.");
			        SendClientMessage(i, COLOR_WHITE, "You can also post your advertisment at local newspaper.");
			        ClearChatbox(i, 2);
			    }
			    else if(TutTime[i] == 53)
			    {
			        ClearChatbox(i, 10);
			        SetPlayerPos(i, 1475.7020,-1050.9489,-5.00);
			        SetPlayerCameraPos(i, 1458.3872,-1042.2423,24.8281);
					SetPlayerCameraLookAt(i, 1458.5930,-1019.9205,24.5264);
					SetPlayerInterior(i, 0);
			        SendClientMessage(i, COLOR_GREEN, "~ BANK OF THE STATE ~");
			        SendClientMessage(i, COLOR_WHITE, " ");
			        SendClientMessage(i, COLOR_WHITE, "You won't keep all your money in your pocket, someone will try to steal it.");
			        SendClientMessage(i, COLOR_WHITE, "You can /deposit, or /withdraw your money at the bank.");
			        SendClientMessage(i, COLOR_WHITE, "You'll get you payday at your bank account too.");
			        ClearChatbox(i, 2);
			    }
			    else if(TutTime[i] == 63)
			    {
			        ClearChatbox(i, 10);
			        SetPlayerInterior(i, 3);
			        SetPlayerPos(i, 1742.8252,-1861.2283,13.5778);
			        SetCameraBehindPlayer(i);
			        SetPlayerVirtualWorld(i, 0);
			        SendClientMessage(i, COLOR_GREEN, "~ END OF TUTORIAL ~");
			        SendClientMessage(i, COLOR_WHITE, " ");
			        SendClientMessage(i, COLOR_WHITE, "There are a lot of places in Los Santos, but you need to discover them on your own.");
			        SendClientMessage(i, COLOR_WHITE, "Don't forget Role-Play rules, because non-rping causes warns and bans!");
			        SendClientMessage(i, COLOR_WHITE, "  - Enjoy, GTA:RP Admin Team.");
			        ClearChatbox(i, 2);
			    }
			    else if(TutTime[i] == 73)
			    {
			        ClearChatbox(i, 10);
			        SendClientMessage(i, COLOR_YELLOW2, "Welcome to the Los Santos.");
			        SendClientMessage(i, COLOR_GRAD1, "To call a taxi use call 444");
			        SendClientMessage(i, COLOR_GRAD1, "To change your outfit you have to go to clothes shop");
					SendClientMessage(i, COLOR_GRAD1, " ");
					TextDrawHideForPlayer(i,lbt);
					TextDrawHideForPlayer(i,lbb);
			        TutTime[i] = 0; PlayerInfo[i][pTut] = 1;
					gOoc[i] = 0; gNews[i] = 0; gFam[i] = 0;
					TogglePlayerControllable(i, 1);
					MedicBill[i] = 0;
					AfterTutorial[i] = 1;
					SetTimerEx("UnsetAfterTutorial", 2500, false, "i", i);
					SetTimerEx("UnsetFirstSpawn", 5000, false, "i", i);
					SetPlayerSpawn(i);
			    }
			}
What i need to add when questions finish to start this tutorial?
Reply


Messages In This Thread
How to add Questions before spawn? - by GBLTeam - 06.01.2011, 14:45
Re: How to add Questions before spawn? - by HyperZ - 06.01.2011, 14:49
Re: How to add Questions before spawn? - by Riddick94 - 06.01.2011, 14:50
Re: How to add Questions before spawn? - by bartje01 - 06.01.2011, 14:52
Re: How to add Questions before spawn? - by GBLTeam - 06.01.2011, 16:07
Re: How to add Questions before spawn? - by bartje01 - 06.01.2011, 16:23
Re: How to add Questions before spawn? - by GBLTeam - 06.01.2011, 16:29
Re: How to add Questions before spawn? - by GBLTeam - 06.01.2011, 18:29
Re: How to add Questions before spawn? - by Riddick94 - 06.01.2011, 22:37
Re: How to add Questions before spawn? - by GBLTeam - 07.01.2011, 13:49

Forum Jump:


Users browsing this thread: 4 Guest(s)