SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 21/11/2011, 02:06 PM   #1
YoUnG_KiD
Little Clucker
 
YoUnG_KiD's Avatar
 
Join Date: Aug 2011
Location: On Top Of your head!!
Posts: 48
Reputation: 0
Question Lux Admin Login Problem

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
__________________
The YOUNG KID.
YoUnG_KiD is offline   Reply With Quote
Old 21/11/2011, 02:55 PM   #2
YoUnG_KiD
Little Clucker
 
YoUnG_KiD's Avatar
 
Join Date: Aug 2011
Location: On Top Of your head!!
Posts: 48
Reputation: 0
Default Re: Lux Admin Login Problem

17 views still no comments?? C'mon guyz
__________________
The YOUNG KID.
YoUnG_KiD is offline   Reply With Quote
Old 21/11/2011, 02:59 PM   #3
=WoR=G4M3Ov3r
High-roller
 
Join Date: Nov 2010
Location: www.Ambrosia-Servers.com
Posts: 1,751
Reputation: 329
Default Re: Lux Admin Login Problem

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.
=WoR=G4M3Ov3r is offline   Reply With Quote
Old 21/11/2011, 03:00 PM   #4
Psymetrix
Huge Clucker
 
Join Date: Oct 2011
Posts: 292
Reputation: 104
Default Re: Lux Admin Login Problem

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!
Psymetrix is offline   Reply With Quote
Old 21/11/2011, 03:01 PM   #5
DRIFT_HUNTER
High-roller
 
Join Date: Oct 2009
Posts: 2,151
Reputation: 215
Default Re: Lux Admin Login Problem

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?)
DRIFT_HUNTER is offline   Reply With Quote
Old 21/11/2011, 04:28 PM   #6
YoUnG_KiD
Little Clucker
 
YoUnG_KiD's Avatar
 
Join Date: Aug 2011
Location: On Top Of your head!!
Posts: 48
Reputation: 0
Default Re: Lux Admin Login Problem

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]"
__________________
The YOUNG KID.
YoUnG_KiD is offline   Reply With Quote
Old 22/11/2011, 03:49 AM   #7
YoUnG_KiD
Little Clucker
 
YoUnG_KiD's Avatar
 
Join Date: Aug 2011
Location: On Top Of your head!!
Posts: 48
Reputation: 0
Default Re: Lux Admin Login Problem

When i paste that login under this ... means under OnplayerConnect(i); I get 26 errors...
__________________
The YOUNG KID.
YoUnG_KiD is offline   Reply With Quote
Old 22/11/2011, 04:09 AM   #8
Game_Over
Little Clucker
 
Join Date: Nov 2011
Location: America
Posts: 5
Reputation: 0
Default Re: Lux Admin Login Problem

Awwff/.... 26?? !
__________________


HELP ME GET A REP!

=
Game_Over is offline   Reply With Quote
Old 09/12/2012, 02:54 PM   #9
Alexica721
Big Clucker
 
Join Date: Dec 2012
Posts: 55
Reputation: -2
Default Re: Lux Admin Login Problem

I get 26 errors too
Alexica721 is offline   Reply With Quote
Old 09/12/2012, 05:50 PM   #10
The_Asker
Little Clucker
 
Join Date: Jun 2012
Location: Israel
Posts: 22
Reputation: 0
Default Re: Lux Admin Login Problem

Maybe is problem at your includes.
__________________
The_Asker is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Admin Login Help wilko1995 Help Archive 4 03/01/2011 01:22 PM
Login - V-Admin iShady Português/Portuguese 18 21/12/2010 10:55 PM
V-ADMIN LOGIN HELP: NO REPLY IN V-ADMIN TOPIC: PLEASE HELP RE-OPEN MY SERVER!!!! wilcock33 Help Archive 1 19/08/2009 02:19 PM
How to login like admin.. HeOe3BuM Help Archive 5 20/02/2009 07:25 PM


All times are GMT. The time now is 05:09 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.