28.01.2018, 15:19
Quote:
one method is to check their IP and then set a limit,
lets suppose Code:
#define MAX_CONNECTIONS_FROM_IP 5 public OnPlayerConnect(playerid) { new num_players_on_ip = GetNumberOfPlayersOnThisIP(gPlayerInfo[playerid][pIp]); if(num_players_on_ip > MAX_CONNECTIONS_FROM_IP) { Kick( playerid ); return 1; } } stock GetNumberOfPlayersOnThisIP(test_ip[]) { new ip_count; foreach(Player,i) if(!strcmp(gPlayerInfo[i][pIp],test_ip)) ip_count++; return ip_count; } |
It connects real quickly, you can see the log with the timestamp at this link, 50 bots can connect at the same time.