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] == 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;
}
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
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 i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i))
OnPlayerConnect(i);
for(new i = 1; i < MAX_CHAT_LINES; i++)
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.