SA-MP Forums Archive
Cant login or server stops when connecting to a registered account - 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: Cant login or server stops when connecting to a registered account (/showthread.php?tid=653563)



Cant login or server stops when connecting to a registered account - TaiRinsuru - 07.05.2018

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 Код:
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;
}



Re: Cant login or server stops when connecting to a registered account - TaiRinsuru - 07.05.2018

Anyone?

EDIT: sorry for double post


Re: Cant login or server stops when connecting to a registered account - Stev - 07.05.2018

Do the dialogs have a response?


Re: Cant login or server stops when connecting to a registered account - TaiRinsuru - 07.05.2018

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


Re: Cant login or server stops when connecting to a registered account - TaiRinsuru - 08.05.2018

Bump ;(


Re: Cant login or server stops when connecting to a registered account - TadePoleMG - 08.05.2018

PHP код:
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.


Re: Cant login or server stops when connecting to a registered account - TaiRinsuru - 08.05.2018

Doesnt work.


Re: Cant login or server stops when connecting to a registered account - Fairuz - 08.05.2018

Make sure the folder name "UserPath" is right,linux is case-sensitive.


Re: Cant login or server stops when connecting to a registered account - TaiRinsuru - 08.05.2018

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