SA-MP Forums Archive
Registration still bugged - 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: Registration still bugged (/showthread.php?tid=513621)



Registration still bugged - Yander - 17.05.2014

When players register and choose either Male/Female as their gender, the server will restart and a text will appear saying "You're banned from the server" can anyone help me out in here?

Selection to Male/Female
Код:
if(PlayerInfo[playerid][pTut] == 0)
	    {
	        gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
			TogglePlayerControllable(playerid,0);
			SetPlayerColor(playerid,TEAM_HIT_COLOR);
			SetPlayerPos(playerid, 1544.90, -1439.50, 13.38);
			SetPlayerCameraPos(playerid, 1544.88, -1440.98, 242.61);
		   	SetPlayerCameraLookAt(playerid, 699.55, -1628.93, 5.88);
   			RegistrationStep[playerid] = 1;
			SendClientMessage(playerid, COLOR_GREEN, "Welcome to "SERVER_NAME", please fill in some information to proceed.");
            SetPlayerVirtualWorld(playerid, 1984);
			ShowPlayerDialog(playerid, SEXMENU, DIALOG_STYLE_LIST, "Select your Gender","Male\nFemale ", "Select", "Cancel");
            ShowMainMenuGUI(playerid);
			return 1;
		}
Код:
if(dialogid == SEXMENU)
	{
		if(response)
		{
			if(listitem == 0) // Male
			{
        	    if(RegistrationStep[playerid] == 1)
         	    {
				 	PlayerInfo[playerid][pSex] = 1;
         	   		RegistrationStep[playerid] = 2;
         	   		ShowMainMenuGUI(playerid);
         	   		ShowPlayerDialog(playerid, AGEMENU, DIALOG_STYLE_LIST, "So you're a Male. Select Your In Character Age","18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60 ", "Select", "Cancel");
        		    return 1;
 			    }
			}
			if(listitem == 1) // Female
			{
        	    if(RegistrationStep[playerid] == 1)
         	    {

        		    PlayerInfo[playerid][pSex] = 2;
   		    	    RegistrationStep[playerid] = 2;
   		    	    ShowMainMenuGUI(playerid);
   		    	    ShowPlayerDialog(playerid, AGEMENU, DIALOG_STYLE_LIST, "So you're a Female. Select Your In Character Age","18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60 ", "Select", "Cancel");
			        return 1;
 			    }
			}
		}
		return 1;
	}



Re: Registration still bugged - Yander - 17.05.2014

Anyone? Please help me.


Re: Registration still bugged - Rittik - 17.05.2014

Try to make an input dialog for setting age.


Re: Registration still bugged - Yander - 17.05.2014

Nah. When we choose on either Male/Female that will happen.


Re: Registration still bugged - Rittik - 17.05.2014

Make sure that dialogid of the "SEXMENU" does not matches with other defines.


Re: Registration still bugged - Yander - 17.05.2014

I am not that pro on scripting can you check it?


Re: Registration still bugged - Rittik - 17.05.2014

Sure.


Re: Registration still bugged - Yander - 17.05.2014

How can I send it to you?


Re: Registration still bugged - Rittik - 17.05.2014

pm me.


Re: Registration still bugged - Rittik - 17.05.2014

Remove the GUI maybe that helps you.I think that the GUI crashes the game.