Max 2 Players on a Hosted Server??
#1

Hello i am new here, and this is my problem:

I have a hosted server with 50 slots, but when 2 player connect's is ok but when 3 connect the server shut's down, can anoyone help me please

(I haved the same problem before this, but it was if you login then the server shut's down(in a home server there is no problem) i changed the login without dialog now and it's working, but now can connect only 2 players, Why?)
Reply
#2

Let us have, have a limit of players, MAX_PLAYERS,

# undef MAX_PLAYERS
# define MAX_PLAYERS (50)


When connecting a 3 Player the server crashes? you? , Either update your Plugins and Pawn Includes the "CompuPhase". Greetings
Reply
#3

This problem is usually caused by to much inefficient code inside the OnPlayerUpdate callback.

Check to make sure you have little or no loops inside OnPlayerUpdate.

Try to remember OnPlayerUpdate is called several times per second for each player that is connected.
Reply
#4

Quote:
Originally Posted by dennissk
Посмотреть сообщение
Let us have, have a limit of players, MAX_PLAYERS,

# undef MAX_PLAYERS
# define MAX_PLAYERS (50)


When connecting a 3 Player the server crashes? you? , Either update your Plugins and Pawn Includes the "CompuPhase". Greetings
i added only this in my gamemode is this right?
#define MAX_PLAYERS 50

Quote:

When connecting a 3 Player the server crashes? you? , Either update your Plugins and Pawn Includes the "CompuPhase". Greetings

Yes the 2 players can play but when connect a player 3 to the server when she types /login [pass] it crashes and i must restart the server
"CompuPhase" what is this?
Reply
#5

Quote:
Originally Posted by CityWorld
Посмотреть сообщение

Yes the 2 players can play but when connect a player 3 to the server when she types /login [pass] it crashes and i must restart the server
"CompuPhase" what is this?
Are you sure there is file which you want to open? fread( EDIT: not fread but io_read in fopen) crashes the server if there is no file.
Reply
#6

Quote:
Originally Posted by Roko_foko
Посмотреть сообщение
Are you sure there is file which you want to open? fread( EDIT: not fread but io_read in fopen) crashes the server if there is no file.
Код:
	new File: UserFile = fopen(string2, io_read);
	if ( UserFile )
	{
.... and at the end
                }//end while
                fclose(UserFile);//close the file after everything has been read in the while
		}
		else
		{
			////new loginstring[512];
			////new loginname[64];
			////GetPlayerName(playerid,loginname,sizeof(loginname));
			////format(loginstring,sizeof(loginstring),"GRESKA\nVnesete tocna lozinka:",loginname);
			////ShowPlayerDialog(playerid,12347,DIALOG_STYLE_PASSWORD,"Login",loginstring,"Logiranje","Izlez");
	        ////fclose(UserFile);
	        SCM(playerid, UC, "GRESKA:{FFFFFF}Vnesovte pogresna lozinka!");
	        gPlayerLogTries[playerid] += 1;
	        if(gPlayerLogTries[playerid] == 6) { Kick(playerid); }
	        return 1;
		}
		PlayerInfo[playerid][pAdjustable] = 0;
		ResetPlayerMoney(playerid);
                      ...........
Reply
#7

use
Код:
fopen(string2,io_readwrite);
Reply
#8

Quote:
Originally Posted by Seven_of_Nine
Посмотреть сообщение
use
Код:
fopen(string2,io_readwrite);
didn't worked : /



But before this I haved the same problem, but it was if you login then the server shut's down in a in home server there is no problem it's working fine but when i connected there and dyped my password in the dialog the server shutted down, i changed the login without dialog now(with command /login) and it's working now


But now when somebady connect and 2 login and 1 is only waiting and not login the server is working but when he types /login [pass] (the third player) then it shuts down please help me
Reply
#9

bump(i must)
Reply
#10

Any fix for your problem? Exactly the same problem here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)