SA-MP Forums Archive
Lux Admin registering instead of logging in. - 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: Lux Admin registering instead of logging in. (/showthread.php?tid=425423)



Lux Admin registering instead of logging in. - Eminem 2ka9 - 25.03.2013

I moved Lux Admin login/register system to OnPlayerConnect.

Now, if i was a new player and i went to register, then the register dialog would work fine. If the player /q starts the server again, the login dialog will appear fine and the player can login fine.

But, if i restart the server (using my host control panel) and if i player who already registered before has joined, the register dialog appears, but the register dialog does not work, for reasons (1) the player is already registered, and (2) when the player types a password and presses enter, nothing happens.


This is what i have under OnPlayerConnect.
pawn Код:
public OnPlayerConnect(playerid)
{
    //==============================================================================
// Request Register
//==============================================================================
 if(AccInfo[playerid][Registered] == 0 && ServerInfo[MustRegister] == 1)
    {
        #if USE_DIALOGS == true
        new rstring[256];
        format(rstring,256,"{15FF00}Welcome to {FF0000}%s\n{15FF00}\n{15FF00}Account '%s' is not registred!\n{FFFFFF}\n{FFFFFF}Enter 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,"{15FF00}That account '%s 'is Registered!\n{15FF00}\n{FFFFFF} Login to access your Account:",pName(playerid));
        ShowPlayerDialog(playerid,DIALOGID+67,DIALOG_STYLE_INPUT, "Login Account",lstring,"Login","Quit");
        #endif

        return 1;
    }


This is my Lux Admin Config.ini File:
PHP код:
MaxPing=1000
ReadPMs
=1
ReadCmds
=1
MaxAdminLevel
=10
AdminOnlySkins
=0
AdminSkin
=217
AdminSkin2
=214
AntiBot
=1
AntiSpam
=1
AntiSwear
=0
NameKick
=1
PartNameKick
=1
NoCaps
=0
Locked
=0
SaveWeap
=1
SaveMoney
=1
ConnectMessages
=1
AdminCmdMessages
=1
AutoLogin
=0
MaxMuteWarnings
=3
MustLogin
=1
MustRegister
=1
ForbiddenWeapons
=0
AntiAdvertisements
=1
Announcements
=
Help would be VERY VERY appreciated, thank you very much for reading.


Re: Lux Admin registering instead of logging in. - Eminem 2ka9 - 25.03.2013

Just changed title .


Re: Lux Admin registering instead of logging in. - Eminem 2ka9 - 25.03.2013

Anyone familiar with Luxxy?


Re: Lux Admin registering instead of logging in. - park4bmx - 25.03.2013

the problem is not in the shown code.
what basickly happends is probably before the user reguster a file is created(ready to wright) when they reconnect Un-Registered the server checks if theyer name exists which it does it takes them as registered.

A bad way to do this kind of system.
i cant direct u to mine: mREG
i haven't support it from quite some time now but all good.


Re: Lux Admin registering instead of logging in. - Slix_ - 25.03.2013

Refer to the script itself than opening a new thread and the author will be helping you out if he/she provides any support.


Re: Lux Admin registering instead of logging in. - Eminem 2ka9 - 25.03.2013

But there has to be a way to fix my system!