PDA

View Full Version : Lux Admin Login Problem


YoUnG_KiD
21/11/2011, 02:06 PM
I have a problem with login ... i need this login/register dialogue before player spawning... here is the code of the dialogue

//================================================== ============================
//-------------------------------------------------
// 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

YoUnG_KiD
21/11/2011, 02:55 PM
17 views still no comments?? C'mon guyz

=WoR=G4M3Ov3r
21/11/2011, 02:59 PM
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.

Psymetrix
21/11/2011, 03:00 PM
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!

DRIFT_HUNTER
21/11/2011, 03:01 PM
1.Dont make bunch of topics about same thing
2.Just copy and paste these under OnPlayerConnect


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

YoUnG_KiD
21/11/2011, 04:28 PM
When i search for onplayerconnect i get this ... now where should i paste this?[this?

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

YoUnG_KiD
22/11/2011, 03:49 AM
When i paste that login under this ... means under OnplayerConnect(i); I get 26 errors...

Game_Over
22/11/2011, 04:09 AM
Awwff/.... 26?? !

Alexica721
09/12/2012, 02:54 PM
I get 26 errors too

The_Asker
09/12/2012, 05:50 PM
Maybe is problem at your includes.

Devilxz97
09/12/2012, 05:52 PM
Maybe is problem at your includes.

just can say "lol"

MBilal
21/09/2013, 08:43 AM
Guyz i also Have Have Big Problem With LuxAdmin That When Player Spawn After Login It Freeze Players who Using Skins of Luxadmin Every Time i Login i have to Do /Move off to unfreeze me and some time other admin use /slap to Unfreeze I change Nothing in Luxadmin i am Using LuxAmin 1.6 but when i Unload LuxAdmin No Budy Freeze and Every thing Work Fine.. Can Any Budy Solve it Because it abuse so Much Thanks I Hope You GUyz Help me

DanishHaq
21/09/2013, 08:45 AM
Guyz i also Have Have Big Problem With LuxAdmin That When Player Spawn After Login It Freeze Players who Using Skins of Luxadmin Every Time i Login i have to Do /Move off to unfreeze me and some time other admin use /slap to Unfreeze I change Nothing in Luxadmin i am Using LuxAmin 1.6 but when i Unload LuxAdmin No Budy Freeze and Every thing Work Fine.. Can Any Budy Solve it Because it abuse so Much Thanks I Hope You GUyz Help me

Congrats for bumping a year old topic. Make a NEW topic here: http://forum.sa-mp.com/forumdisplay.php?f=12.