SA-MP Forums Archive
Move player login to OnPlayerConnect - 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: Move player login to OnPlayerConnect (/showthread.php?tid=422497)



Move player login to OnPlayerConnect - Eminem 2ka9 - 13.03.2013

I'm using LuxAdmin as an admin system. The login/register system is currently at OnPlayerSpawn. I moved the below from OnPlayerSpawn to OnPlayerConnect:

pawn Код:
//==============================================================================
// Request Register
//==============================================================================
 if(AccInfo[playerid][Registered] == 0 && ServerInfo[MustRegister] == 1)
    {
        #if USE_DIALOGS == true
        new rstring[256];
        format(rstring,256,"Welcome to the '%s'\n\nAccount '%s' is not registred!\n\nEnter the password to Register your Account:",GetServerHostName(),pName(playerid));
        ShowPlayerDialog(playerid,DIALOGID+66,DIALOG_STYLE_INPUT,"Register Account",rstring,"Register","Quit");
        #endif
        return 1;
    }
//==============================================================================
// Request Login
//==============================================================================
    if(ServerInfo[MustLogin] == 1 && AccInfo[playerid][Registered] == 1 && AccInfo[playerid][LoggedIn] == 0)
    {
        #if USE_DIALOGS == true
        new lstring[256];
        format(lstring,green,"That account '%s 'is Registered!\n\n Login to access your Account:",pName(playerid));
        ShowPlayerDialog(playerid,DIALOGID+67,DIALOG_STYLE_INPUT, "Login Account",lstring,"Login","Quit");
        #endif
        return 1;
    }
But this does not work. The server starts, and the dialog appears. But, when i type a password (anything - it doesn't check if it's right/wrong) then the dialog will just close, and NOTHING happens.

Can someone help me with this? If so, pm me and we'll go on Team Viewer. (Only people who know exactly what they're doing)


Re: Move player login to OnPlayerConnect - Eminem 2ka9 - 13.03.2013

Is ANYONE able to help? If so, pm me i will give you my viewer id + pass and we can do this shit! xP


Respuesta: Move player login to OnPlayerConnect - MiGu3X - 14.03.2013

Check y_ini register & login system .