SA-MP Forums Archive
Full server but players can still connect - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Full server but players can still connect (/showthread.php?tid=604672)



Full server but players can still connect - mooman - 08.04.2016

I have kind of a strange problem. When my server is full with 32 players sometimes a few more players will join with ids 32, 33, even as high as 34 so that we have 35/32 slots used. I tried adding
Код:
public OnPlayerConnect(playerid)
{
	if(playerid > (MAX_PLAYERS-1)) return Kick(playerid);
but it has no effect. How do I prevent this? My server is still on 0.3.7 because my host is slow to update.


Re: Full server but players can still connect - iKevin - 08.04.2016

Do you use a VPS, dede or host. Post which and what company


Re: Full server but players can still connect - mooman - 08.04.2016

Evolution Host. Not VPS or dedicated, just game server hosting.


Re: Full server but players can still connect - connork - 08.04.2016

You're using NPCs? I had got the same problem a time ago, I think that is caused by FNPC plugin.

I have solved the problem with that:
pawn Код:
public OnIncomingConnection(playerid, ip_address[], port)
{
    if(!IsPlayerNPC(playerid) && playerid > MAX_PLAYERS-1) {
        Kick(playerid);
        BlockIpAddress(ip_address, 5000);
    }
    return 1;
}



Re: Full server but players can still connect - mooman - 09.04.2016

No NPCs. I will try to stop the connections in OnIncomingConnection.


Re: Full server but players can still connect - iKevin - 09.04.2016

Quote:
Originally Posted by mooman
Посмотреть сообщение
No NPCs. I will try to stop the connections in OnIncomingConnection.
Worked? Else, game servers are usually behind the real time for like 3 mins, when a players logs out, the host should automatically put one slots free less, but it needs some time.


Re: Full server but players can still connect - connork - 09.04.2016

Quote:
Originally Posted by mooman
Посмотреть сообщение
No NPCs. I will try to stop the connections in OnIncomingConnection.
So probably is a problem on SA-MP.
I think the code on Incoming Connection will solve that for you.


Re: Full server but players can still connect - xPhantom - 09.04.2016

I would recommend asking your host to update your server to R2-1. What operating system are they running?


Re: Full server but players can still connect - mooman - 10.04.2016

I'm back to report that connork's code worked.