Server Closed the Connection -
Walkie - 11.12.2013
When a player connect to the server receives Server Closed the Connection , why ? my server doesn't have any kick publics or problem on connection , that player is not banned , just he get server closed the connection ( sorry for my bad english)
Re: Server Closed the Connection -
MahdiGames - 11.12.2013
Quote:
Originally Posted by Walkie
When a player connect to the server receives Server Closed the Connection , why ? my server doesn't have any kick publics or problem on connection , that player is not banned , just he get server closed the connection ( sorry for my bad english)
|
Show to us , OnPlayerConnect in all ur scripts and gm.
Re: Server Closed the Connection -
Walkie - 11.12.2013
pawn Code:
public OnPlayerConnect(playerid)
{
AccountReset(playerid);
ResetStats(playerid);
ResetCharacters(playerid);
ConfigPlayer(playerid);
if(server_restarting) { SendClientMessage(playerid,COLOR_OOC,"SERVERUL SE RESTARTEAZA. RECONECTEAZA-TE!"); print("SERVER RESTART SEQUENCE");Kick(playerid); }
if(!IsPlayerNPC(playerid))
{
CheckAccountInuse(playerid);
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
AccountExists(name,playerid);
AccountExists2(name,playerid);
CreatePlayerTextDraws(playerid);
active_players ++;
LogConnection(playerid);
}
new ConnIP[16];
GetPlayerIp(playerid,ConnIP,16);
new compare_IP[16];
new number_IP = 0;
for(new i=0; i<MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
GetPlayerIp(i,compare_IP,16);
if(!strcmp(compare_IP,ConnIP)) number_IP++;
}
}
new playername[24];
new string[64];
GetPlayerName(playerid, playername, sizeof(playername));
if((GetTickCount() - Join_Stamp) < Time_Limit)
exceed=1;
else
exceed=0;
if(strcmp(ban_s, ConnIP, false) == 0 && exceed == 1 )
{
Same_IP++;
if(Same_IP > SAME_IP_CONNECT)
{
Ban(playerid);
Same_IP=0;
format(string, sizeof(string), "%s a primit ban pentru bot flood!", playername);
SendAdminBroadcast(string);
}
}
else
{
Same_IP=0;
}
if(number_IP > IP_LIMIT)
Kick(playerid);
print("IPLIMIT");
GetStampIP(playerid);
return 1;
}
Re: Server Closed the Connection -
EmilLykke - 11.12.2013
Do you have any filterscripts enabled when you are turning on your server?
Re: Server Closed the Connection -
StuartD - 11.12.2013
Does anything show in the server_log.txt?
Re: Server Closed the Connection -
MahdiGames - 11.12.2013
Quote:
Originally Posted by Walkie
pawn Code:
public OnPlayerConnect(playerid) {
AccountReset(playerid); ResetStats(playerid); ResetCharacters(playerid); ConfigPlayer(playerid); if(server_restarting) { SendClientMessage(playerid,COLOR_OOC,"SERVERUL SE RESTARTEAZA. RECONECTEAZA-TE!"); print("SERVER RESTART SEQUENCE");Kick(playerid); } if(!IsPlayerNPC(playerid)) {
CheckAccountInuse(playerid); new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); AccountExists(name,playerid); AccountExists2(name,playerid); CreatePlayerTextDraws(playerid); active_players ++; LogConnection(playerid);
} new ConnIP[16]; GetPlayerIp(playerid,ConnIP,16); new compare_IP[16]; new number_IP = 0; for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { GetPlayerIp(i,compare_IP,16); if(!strcmp(compare_IP,ConnIP)) number_IP++; } } new playername[24]; new string[64]; GetPlayerName(playerid, playername, sizeof(playername)); if((GetTickCount() - Join_Stamp) < Time_Limit) exceed=1; else exceed=0; if(strcmp(ban_s, ConnIP, false) == 0 && exceed == 1 ) { Same_IP++; if(Same_IP > SAME_IP_CONNECT) { Ban(playerid); Same_IP=0; format(string, sizeof(string), "%s a primit ban pentru bot flood!", playername); SendAdminBroadcast(string); } } else { Same_IP=0; } if(number_IP > IP_LIMIT) Kick(playerid); print("IPLIMIT"); GetStampIP(playerid); return 1;
}
|
I think there is problem with that just remove this anti bot system and try again.
Re: Server Closed the Connection -
StuartD - 11.12.2013
Wait, Try removing the Kick(playerid); and the whole little IP Limit bit, then tell me what happens...
Re: Server Closed the Connection -
Walkie - 12.12.2013
pawn Code:
[13:10:43] Incoming connection: 188.27.76.58:64530
[13:10:43] [join] justin has joined the server (0:188.27.76.58)
[13:10:43] SELECT * FROM rp_regapp WHERE name = 'justin' AND status = '1' LIMIT 1
[13:10:43] Textdraw Player Distrus
[13:10:43] [part] justin has left the server (0:2)
Re: Server Closed the Connection -
Walkie - 12.12.2013
the script is OK ! I don't know why give's kick ! i remove kick from public and give same problem ..
Re: Server Closed the Connection -
Deduction - 12.12.2013
Remove the following and tell me what you get.
Commenting them out with /* and */ will be safer instead of actually removing them.
pawn Code:
if(strcmp(ban_s, ConnIP, false) == 0 && exceed == 1 )
{
Same_IP++;
if(Same_IP > SAME_IP_CONNECT)
{
Ban(playerid);
Same_IP=0;
format(string, sizeof(string), "%s a primit ban pentru bot flood!", playername);
SendAdminBroadcast(string);
}
}
else
{
Same_IP=0;
}