SA-MP Forums Archive
I have a question? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I have a question? (/showthread.php?tid=345438)



I have a question? - sampmark05 - 25.05.2012

How do I get this work cuz when i select the male its not responding and dialog will close.



Код:
if(PlayerInfo[playerid][pTut] == 0)
		{
			gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
			TogglePlayerControllable(playerid,0);
			SetPlayerColor(playerid,TEAM_HIT_COLOR);
			SetPlayerPos(playerid, 766.50, -1684.32, -6.86);
			SetPlayerCameraPos(playerid, 751.93, -1673.95, 16.01);
		   	SetPlayerCameraLookAt(playerid, 699.55, -1628.93, 5.88);
   			RegistrationStep[playerid] = 1;
   			ShowPlayerDialog(playerid, REGISTER, DIALOG_STYLE_LIST,"Are you a Male or Female?","Male\nFemale","Next", "");
			SetPlayerVirtualWorld(playerid, 1);
			return 1;
		}
if(RegistrationStep[playerid] > 0)
	{
		if(RegistrationStep[playerid] == 1)
		{
			if (strcmp("male", text, true) == 0)
			{
				PlayerInfo[playerid][pSex] = 1;
				SendClientMessageEx(playerid, COLOR_YELLOW2, "Alright, so you're a male.");
				ShowPlayerDialog(playerid, REGISTER1, DIALOG_STYLE_LIST,"What is your age?","18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40","Done", "");
				RegistrationStep[playerid] = 2;
				return 0;
			}
			else if (strcmp("female", text, true) == 0)
			{
				PlayerInfo[playerid][pSex] = 2;
				SendClientMessageEx(playerid, COLOR_YELLOW2, "Alright, so you're a female.");
				ShowPlayerDialog(playerid, REGISTER1, DIALOG_STYLE_LIST,"What is your age?","18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40","Done", "");
				RegistrationStep[playerid] = 2;
				return 0;
			}
			return 0;
		}
		else if(RegistrationStep[playerid] == 2)
		{
			new year, month,day;
			getdate(year, month, day);
			new DateInfo[3][20];
			splits(text, DateInfo, '/');
			if(year - strval(DateInfo[2]) > 100 || strval(DateInfo[2]) < 1 || strval(DateInfo[2]) >= year)
			{
				ShowPlayerDialog(playerid, REGISTER1, DIALOG_STYLE_LIST,"What is your age?","18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40","Done", "");
				return 0;
			}
			new check = year - strval(DateInfo[2]);
			if(check == year)
			{
				ShowPlayerDialog(playerid, REGISTER1, DIALOG_STYLE_LIST,"What is your age?","18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40","Done", "");
				return 0;
			}
			if(strval(DateInfo[1]) > month)
			{
				check -= 1;
			}
			else if(strval(DateInfo[1]) == month && strval(DateInfo[0]) > day)
			{
				check -= 1;
			}



Re: I have a question? - sampmark05 - 25.05.2012

I will give Rep who will help me.


Re: I have a question? - Ajez - 25.05.2012

wait for someone else to help you, don't double post

pawn Код:
if (strcmp("male", text, true) == 0)
{

else if (strcmp("female", text, true) == 0)
{
Dialog can't use, else if (strcmp("female", text, true) == 0)
but i do not have any suggestion for that


Re: I have a question? - sampmark05 - 25.05.2012

Quote:
Originally Posted by Ajez
Посмотреть сообщение
wait for someone else to help you, don't double post

pawn Код:
if (strcmp("male", text, true) == 0)
{

else if (strcmp("female", text, true) == 0)
{
Dialog can't use, else if (strcmp("female", text, true) == 0)
but i do not have any suggestion for that
ok sorry for bumping.


Re: I have a question? - sampmark05 - 25.05.2012

anyone?