SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 07/05/2018, 11:49 AM   #1
TaiRinsuru
Big Clucker
 
TaiRinsuru's Avatar
 
Join Date: Oct 2015
Location: Reputation : 100000
Posts: 137
Reputation: 12
Default Cant login or server stops when connecting to a registered account

So basically, while testing my server on localhost.
Everything works fine, login systems etc.
The time i upload it on my server host, login doesn't work.

Logging in (localhost)


Logging in to my real server


If i connect to my real server with an unregistered account, everything works fine but if I connect with a registered account now it doesnt show up login dialog and just restart the server.

My onplayerconnect:
pawn Code:
public OnPlayerConnect(playerid)
{
    ClanInvited[playerid] = 999;
    ClanInvitedBy[playerid] = 999;
    new string[128];
    gIncorrectPW[playerid] = 0;
    gLogged[playerid] = 0;
    format(string, sizeof(string), "%s (%d) has connected to the server. [%d/%d]", GetPlayerNameEx(playerid), playerid, Iter_Count(Player), MAX_PLAYERS);
    SendClientMessageToAll(COLOR_DONOR, string);
    SetPlayerCameraPos(playerid, 1058.593872, 1020.997863, 57.898475);
    SetPlayerCameraLookAt(playerid, 1055.358764, 1017.354858, 56.774765);
    XPtxtdraw[playerid] = CreatePlayerTextDraw(playerid, 504.000000, 80.640007, "$0000000");
    PlayerTextDrawLetterSize(playerid, XPtxtdraw[playerid], 0.645200, 1.988266);
    PlayerTextDrawAlignment(playerid, XPtxtdraw[playerid], 1);
    PlayerTextDrawColor(playerid, XPtxtdraw[playerid], -5963521);
    PlayerTextDrawSetShadow(playerid, XPtxtdraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, XPtxtdraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, XPtxtdraw[playerid], 255);
    PlayerTextDrawFont(playerid, XPtxtdraw[playerid], 3);
    PlayerTextDrawSetProportional(playerid, XPtxtdraw[playerid], 1);
    if(fexist(UserPath(playerid)))
    {
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        format(string, sizeof(string), "Welcome back %s, please input your password below to login.", GetPlayerNameEx(playerid));
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Login!",string,"Login","Quit");
    }
    else
    {
        format(string, sizeof(string), "Welcome %s to our server, please input your password below to register.", GetPlayerNameEx(playerid));
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Register!",string,"Register","Quit");
    }
    TextDrawShowForPlayer(playerid, Intro[0]);
    TextDrawShowForPlayer(playerid, Intro[1]);
    mk[playerid] = 0;
    ck[playerid] = 0;
    pk[playerid] = 0;
    return 1;
}
__________________
Come and join now

Discord : https://discord.gg/GRFeDvB

Last edited by TaiRinsuru; 08/05/2018 at 11:05 AM.
TaiRinsuru is offline   Reply With Quote
Old 07/05/2018, 12:49 PM   #2
TaiRinsuru
Big Clucker
 
TaiRinsuru's Avatar
 
Join Date: Oct 2015
Location: Reputation : 100000
Posts: 137
Reputation: 12
Default Re: Cant login or server stops when connecting to a registered account

Anyone?

EDIT: sorry for double post
__________________
Come and join now

Discord : https://discord.gg/GRFeDvB
TaiRinsuru is offline   Reply With Quote
Old 07/05/2018, 12:55 PM   #3
Stev
Big Clucker
 
Join Date: Oct 2013
Location: United Kingdom
Posts: 150
Reputation: 17
Default Re: Cant login or server stops when connecting to a registered account

Do the dialogs have a response?
Stev is offline   Reply With Quote
Old 07/05/2018, 01:01 PM   #4
TaiRinsuru
Big Clucker
 
TaiRinsuru's Avatar
 
Join Date: Oct 2015
Location: Reputation : 100000
Posts: 137
Reputation: 12
Default Re: Cant login or server stops when connecting to a registered account

Let me tell you, if i connect with the registered account, it doesnt even show up the dialog so it cant have any response. No insult
__________________
Come and join now

Discord : https://discord.gg/GRFeDvB
TaiRinsuru is offline   Reply With Quote
Old 08/05/2018, 03:16 AM   #5
TaiRinsuru
Big Clucker
 
TaiRinsuru's Avatar
 
Join Date: Oct 2015
Location: Reputation : 100000
Posts: 137
Reputation: 12
Default Re: Cant login or server stops when connecting to a registered account

Bump ;(
__________________
Come and join now

Discord : https://discord.gg/GRFeDvB
TaiRinsuru is offline   Reply With Quote
Old 08/05/2018, 10:29 AM   #6
TadePoleMG
Big Clucker
 
TadePoleMG's Avatar
 
Join Date: Apr 2018
Location: Uttar Pradesh, India
Posts: 164
Reputation: 2
Default Re: Cant login or server stops when connecting to a registered account

PHP Code:
public OnPlayerConnect(playerid)
{
    
ClanInvited[playerid] = 999;
    
ClanInvitedBy[playerid] = 999;
    new 
string[128];
    
gIncorrectPW[playerid] = 0;
    
gLogged[playerid] = 0;
    
format(stringsizeof(string), "%s (%d) has connected to the server. [%d/%d]"GetPlayerNameEx(playerid), playeridIter_Count(Player), MAX_PLAYERS);
    
SendClientMessageToAll(COLOR_DONORstring);
    
SetPlayerCameraPos(playerid1058.5938721020.99786357.898475);
    
SetPlayerCameraLookAt(playerid1055.3587641017.35485856.774765);
    
XPtxtdraw[playerid] = CreatePlayerTextDraw(playerid504.00000080.640007"$0000000");
    
PlayerTextDrawLetterSize(playeridXPtxtdraw[playerid], 0.6452001.988266);
    
PlayerTextDrawAlignment(playeridXPtxtdraw[playerid], 1);
    
PlayerTextDrawColor(playeridXPtxtdraw[playerid], -5963521);
    
PlayerTextDrawSetShadow(playeridXPtxtdraw[playerid], 0);
    
PlayerTextDrawSetOutline(playeridXPtxtdraw[playerid], 1);
    
PlayerTextDrawBackgroundColor(playeridXPtxtdraw[playerid], 255);
    
PlayerTextDrawFont(playeridXPtxtdraw[playerid], 3);
    
PlayerTextDrawSetProportional(playeridXPtxtdraw[playerid], 1);
  
       if(
fexist(UserPath(playerid)))
    {
        
//INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
                
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid);
        
format(stringsizeof(string), "Welcome back %s, please input your password below to login."GetPlayerNameEx(playerid));
          
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD,"Login!",string,"Login","Quit");
    }
    else
    {
        
format(stringsizeof(string), "Welcome %s to our server, please input your password below to register."GetPlayerNameEx(playerid));
         
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD,"Register!",string,"Register","Quit");
    }
    
TextDrawShowForPlayer(playeridIntro[0]);
    
TextDrawShowForPlayer(playeridIntro[1]);
    
mk[playerid] = 0;
    
ck[playerid] = 0;
    
pk[playerid] = 0;
    return 
1;

Try this.
__________________
-| Gaming 'N' Scripting |-
TadePoleMG is offline   Reply With Quote
Old 08/05/2018, 11:05 AM   #7
TaiRinsuru
Big Clucker
 
TaiRinsuru's Avatar
 
Join Date: Oct 2015
Location: Reputation : 100000
Posts: 137
Reputation: 12
Default Re: Cant login or server stops when connecting to a registered account

Doesnt work.
__________________
Come and join now

Discord : https://discord.gg/GRFeDvB
TaiRinsuru is offline   Reply With Quote
Old 08/05/2018, 11:17 AM   #8
Dice_
Huge Clucker
 
Dice_'s Avatar
 
Join Date: Sep 2015
Location: Indonesia
Posts: 450
Reputation: 57
Default Re: Cant login or server stops when connecting to a registered account

Make sure the folder name "UserPath" is right,linux is case-sensitive.
Dice_ is offline   Reply With Quote
Old 08/05/2018, 11:24 AM   #9
TaiRinsuru
Big Clucker
 
TaiRinsuru's Avatar
 
Join Date: Oct 2015
Location: Reputation : 100000
Posts: 137
Reputation: 12
Default Re: Cant login or server stops when connecting to a registered account

I double-checked and it still doesnt show up the login dialog, the register dialog works fine.
__________________
Come and join now

Discord : https://discord.gg/GRFeDvB
TaiRinsuru 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
Save last account name registered. Johnny_Ionut Scripting Help 7 15/01/2015 05:23 PM
All account Registered arlindi Scripting Help 12 18/11/2014 05:54 PM
Login Dialog stops working after server restart AndySedeyn Scripting Help 19 30/04/2014 07:10 AM
How could I make an account registered? slimshady Server Support 12 17/11/2011 09:11 PM
Registered account Face9000 Help Archive 5 18/12/2010 06:04 PM


All times are GMT. The time now is 05:28 AM.


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