Server Closed the Connection
#1

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)
Reply
#2

Quote:
Originally Posted by Walkie
View Post
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.
Reply
#3

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;

}
Reply
#4

Do you have any filterscripts enabled when you are turning on your server?
Reply
#5

Does anything show in the server_log.txt?
Reply
#6

Quote:
Originally Posted by Walkie
View Post
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.
Reply
#7

Wait, Try removing the Kick(playerid); and the whole little IP Limit bit, then tell me what happens...
Reply
#8

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)
Reply
#9

the script is OK ! I don't know why give's kick ! i remove kick from public and give same problem ..
Reply
#10

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;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)