Cant login or server stops when connecting to a registered account
#1

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;
}
Reply
#2

Anyone?

EDIT: sorry for double post
Reply
#3

Do the dialogs have a response?
Reply
#4

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
Reply
#5

Bump ;(
Reply
#6

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.
Reply
#7

Doesnt work.
Reply
#8

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

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


Forum Jump:


Users browsing this thread: 3 Guest(s)