Lux Admin Login Problem
#1

I have a problem with login ... i need this login/register dialogue before player spawning... here is the code of the dialogue

PHP Code:
//==============================================================================
//-------------------------------------------------
// Player Spawn
//-------------------------------------------------
//==============================================================================
public OnPlayerSpawn(playerid)
{
//==============================================================================
// Request Register
//==============================================================================
    
if(AccInfo[playerid][Registered] == && 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,"WBTDM Register",rstring,"Register","Quit");
        
#endif
        
return 1;
    }
//==============================================================================
// Request Login
//==============================================================================
    
if(ServerInfo[MustLogin] == && AccInfo[playerid][Registered] == && AccInfo[playerid][LoggedIn] == 0)
    {
        
#if USE_DIALOGS == true
        
new lstring[256];
        
format(lstring,256,"That account '%s 'is Registered!\n\n Login to access your Account:",pName(playerid));
        
ShowPlayerDialog(playerid,DIALOGID+67,DIALOG_STYLE_INPUT,"WBTDM Login",lstring,"Login","Quit");
        
#endif
        
return 1;
    } 
When i change the this to underonplayerconnect i am getting 26 errors... please i need help with this

Thanks in Advance
YoUnG_KiD
Reply
#2

17 views still no comments?? C'mon guyz
Reply
#3

21/11/2011, 03:06 PM

21/11/2011, 03:55 PM


Don't bump, unless you don't get a reply in 48 hours.
Reply
#4

Quote:
Originally Posted by YoUnG_KiD
View Post
17 views still no comments?? C'mon guyz
Your original post was deleted for a reason. You are getting help, your just not listening.

Move the code to OnPlayerConnect. If you get errors, post them!
Reply
#5

1.Dont make bunch of topics about same thing
2.Just copy and paste these under OnPlayerConnect

pawn Code:
//==============================================================================
// 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,"WBTDM Register",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,256,"That account '%s 'is Registered!\n\n Login to access your Account:",pName(playerid));
        ShowPlayerDialog(playerid,DIALOGID+67,DIALOG_STYLE_INPUT,"WBTDM Login",lstring,"Login","Quit");
        #endif
        return 1;
    }
And delete it in OnPlayerSpawn (it will work if you dont delete it but why to check same thing twice?)
Reply
#6

When i search for onplayerconnect i get this ... now where should i paste this?[this?

PHP Code:
for(new 0MAX_PLAYERSi++)
    if(
IsPlayerConnected(i))
     
OnPlayerConnect(i);
    for(new 
1MAX_CHAT_LINESi++)
    
Chat[i] = "[NONE]"
Reply
#7

When i paste that login under this ... means under OnplayerConnect(i); I get 26 errors...
Reply
#8

Awwff/.... 26?? !
Reply
#9

I get 26 errors too
Reply
#10

Maybe is problem at your includes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)