Register 'n Login
#3

Do something like this (this is what I do in my script)

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;
    }
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.
Reply


Messages In This Thread
Register 'n Login - by SampStunta - 07.10.2010, 12:28
Re: Register 'n Login - by [UG]Scripter - 07.10.2010, 12:34
Re: Register 'n Login - by LarzI - 07.10.2010, 12:34
Re: Register 'n Login - by SampStunta - 07.10.2010, 12:38

Forum Jump:


Users browsing this thread: 1 Guest(s)