[Help] Dialog Login System
#1

Hello

I'm editing the Carlitos roleplay. For the server to get a better look, decided it would be for the login dialog.

However, if a person leave the password field blank and click in the Enter key, he/she logs-in.

Help me please.

I'll leave here the code:

Код:
	    new PassData[256];
	    new keytmp[256], valtmp[256];
	    fread( UserFile , PassData , sizeof( PassData ) );
	    keytmp = ini_GetKey( PassData );
	    if( strcmp( keytmp , "Key" , true ) == 0 )
		{
			valtmp = ini_GetValue( PassData );
			strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
		}
		if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
                {
                  // I donґt put in hear this code, but it will get the player infos

Thank you very much.
Reply
#2

you can add something like this before that code (underneath the response check)
pawn Код:
if(!strlen(inputtext))
{
  //show dialog again and send message to enter the correct pass
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)