07.10.2010, 12:34
Do something like this (this is what I do in my script)
Then do the login/register stuff in your OnDialogResponse callback 
By showing the dialogs before requesting class, you won't even see the class selection screen before you register/login.
pawn Код:
if( !yourLogInCheck[ playerid ] )
{
if( dini_Exists( pathToPlayerFile[ playerid ] )) //I'm using dini, so here I check if the file is existing, aka the player is registered
return ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Enter your password to continue", "login", "cancel" ), false;
else
return ShowPlayerDialog( playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register", "Enter the password you want for your user", "register", "cancel" ), false;
}

By showing the dialogs before requesting class, you won't even see the class selection screen before you register/login.

