PDA

View Full Version : Max 2 Players on a Hosted Server??


CityWorld
17/09/2012, 02:21 PM
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?)

dennissk
17/09/2012, 03:37 PM
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

iggy1
17/09/2012, 03:50 PM
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.

CityWorld
17/09/2012, 04:10 PM
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

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?

Roko_foko
17/09/2012, 04:15 PM
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.

CityWorld
17/09/2012, 04:58 PM
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_PASSW ORD,"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);
...........

Seven_of_Nine
17/09/2012, 05:14 PM
use
fopen(string2,io_readwrite);

CityWorld
18/09/2012, 12:18 PM
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

CityWorld
20/09/2012, 10:57 AM
bump(i must)

catal4n
22/11/2016, 10:44 PM
Any fix for your problem? Exactly the same problem here.