Server closes connection on everyone after banning someone
#1

The title may not be as specific as I wanted it to be but it partly describes my problem.

I recently developed a script to ban players. Once I ban a player (for debug purposes, myself) the server kicks me showing me a dialog, up on this point everything is working correctly. The same player (for debug purposes, myself) reconnects to the server and gets kicked immediately after connecting (Not wrong) but it shows no dialog. I then reconnect using another name and the same thing happens. The only thing that fixes the problem is by removing my kick function but that's not an option for obvious reasons.

NOTE: after banning someone, nobody is able to connect (same issue).

So, I think the problem lays with my Kick function:
pawn Код:
public KickEx(playerid)
{
    if(Session[playerid][Kicked])
        return false;

    Session[playerid][Kicked] = true;
    SetTimerEx("Delay_Kick", false, 1000, "i", playerid);
    return true;
}

public Delay_Kick(playerid)
{
    if(Session[playerid][Kicked])
    {
        return Kick(playerid);
    }
    return false;
}
I've tried to remove the IF statement. I've tried removing the whole kick function and only use a SetTimerEx on the places where a player had to be kicked, that didn't work either. I tried raising the timer count, that didn't work. I ran out of possible solutions and therefor requesting help on the forum.


Thanks in advance.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)