SA-MP Forums Archive
dialog login problem - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: dialog login problem (/showthread.php?tid=167058)



dialog login problem - WardenCS - 10.08.2010

Hey,i have problem,i guess its common but im so tired right now that i dont know what to do,i used search but i didnt find anything,so if any one could find or help me please do that

anyways the problem is that im having a mysql login/registering system with dialogs,and uhm if anyone just clicks ESC the dialog will dissapear and you will get spawned.
uhm the code :

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	switch( dialogid )
	{
	    case 1:
	    {
			GetFromAccount( PlayerStatistics[ playerid ][ pDatabaseID ], "Password", PlayerStatistics[ playerid ][ pPassword ] );

			if( strcmp( inputtext, PlayerStatistics[ playerid ][ pPassword ], true ) == 0 )
			{
			    new String[ 128 ], Name[ MAX_PLAYER_NAME ];

			    GetPlayerName( playerid, Name, sizeof( Name ) );

			    format( String, sizeof( String ), "Thank you for logging in, %s.", Name );
			    SendClientMessage( playerid, WHITE, String );

			    PlayerStatistics[ playerid ][ pAuth ] = 1;
			    LoadAccountVariables( playerid );
			}
			else
			{
			    SendClientMessage( playerid, WHITE, "Incorrect password. Please try again!" );
			    ShowPlayerDialog( playerid, 1, DIALOG_STYLE_INPUT, "Login / Authentication Process", "Hello there!\n\nPlease enter your password to authenticate.", "Login", "Cancel" );
			}
	    }
	    case 2:
	    {
........................



Re: dialog login problem - WardenCS - 11.08.2010

iBump,i hate making dialogs:S