07.05.2018, 10:49
(
Последний раз редактировалось TaiRinsuru; 08.05.2018 в 10:05.
)
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:
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;
}