Server closed the connection - gamemode
#1

Hello guys. I need help. I've downloaded prrp gamemode, but everytime I register ingame, it says ''Server closed the connection''..
How to fix that?

Thanks!
Reply
#2

Bump
Reply
#3

Show us the register dialog (It should be at "OnDialogResponse" ..)
Reply
#4

Код:
	}
		case 37: // Register dialog
		{
		    switch(response)
	        {
	            case 0: SendClientMessage(playerid,COLOR_WHITE,"This name is not registered, please create an account /register [password].");
	            case 1: // Registering password
	            {
	                if(!strlen(inputtext)) return ShowPlayerDialog(playerid,37,DIALOG_STYLE_PASSWORD,"Server Account","There is no existing account using your playername, please create a new account.\nIf you can't support this dialog select the (next) option.","Register", "Next");
	                if(strlen(inputtext) >= 31)
	                {
					    SendClientMessage(playerid, COLOR_WHITE, "Password is too long (30 Chars max).");
					    ShowPlayerDialog(playerid,37,DIALOG_STYLE_PASSWORD,"Server Account","There is no existing account using your playername, please create a new account.\nIf you can't support this dialog select the (next) option.","Register", "Next");
					    return 1;
					}
	                OnPlayerRegister(playerid,inputtext);
	            }
	        }
Reply
#5

Please show "OnPlayerRegister" too...
Reply
#6

Here you go
Код:
public OnPlayerRegister(playerid, password[])
{
	if(IsPlayerConnected(playerid))
	{
	    new string[128], passwordex[128];
	    format(string, sizeof(string), "users/%s.ini", PlayerName(playerid));
		if(!DOF2_FileExists(string))
		{
		    DOF2_CreateFile(string);
		    format(passwordex, 128, "%s", password);
		    Hash(passwordex);
		    DOF2_SetString(string, "Key", passwordex);
		    DOF2_SetInt(string, "Convert", 5);
		    DOF2_SetInt(string, "Hashed", 1);
		    DOF2_SetFloat(string, "PosX", 1642.7285);
    		DOF2_SetFloat(string, "PosY", -2240.5591);
    		DOF2_SetFloat(string, "PosZ", 13.4945);
    		DOF2_WriteFile();
		    CallRemoteFunction("OnPlayerLogin","is",playerid,password);
		}
		else
		{
		    SendClientMessage(playerid, COLOR_WHITE, "Unable to register, account exists.");
		    KickEx(playerid);
		}
	}
	return 1;
}
Reply
#7

This ''Server closed the connection'' even happens when I try to login, not just register..
Help please..
Reply
#8

No one can help me?
Reply
#9

Heeey, heelp?
Reply
#10

Stop Bumping the Threads Insanely,
Make sure the Players Account Folder is in its right place. and check if the accounts are saving on registering.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)