SA-MP Forums Archive
Lux Admin Login Problem - 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 Login Problem (/showthread.php?tid=298570)



Lux Admin Login Problem - YoUnG_KiD - 21.11.2011

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


Re: Lux Admin Login Problem - YoUnG_KiD - 21.11.2011

17 views still no comments?? C'mon guyz


Re: Lux Admin Login Problem - =WoR=G4M3Ov3r - 21.11.2011

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.


Re: Lux Admin Login Problem - Psymetrix - 21.11.2011

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!


Re: Lux Admin Login Problem - DRIFT_HUNTER - 21.11.2011

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?)


Re: Lux Admin Login Problem - YoUnG_KiD - 21.11.2011

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]"



Re: Lux Admin Login Problem - YoUnG_KiD - 22.11.2011

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


Re: Lux Admin Login Problem - Game_Over - 22.11.2011

Awwff/.... 26?? !


Re: Lux Admin Login Problem - Alexica721 - 09.12.2012

I get 26 errors too


Re: Lux Admin Login Problem - The_Asker - 09.12.2012

Maybe is problem at your includes.