4 As Max on 1 IP
#1

Title says it all, any way to change this into your script? Since it must be a protection for Bot spawning.
Reply
#2

Is Anyone able to solve this problem for me? I Dont know how a protection script like that looks like since i never heard about Spawning Bots Lol. But since i wanted to play with some friends into my server, it blocked the 4th one. So this must be scripted somewhere.
Reply
#3

you need to define ur max ip's first .. i will give you a simple example

PHP код:

#define MAX_CONNECTIONS_FROM_IP 25 // maximal connections from 1 ip .. u need to define it at ur top of your gamemod
public OnPlayerConnect(playerid)
// MAX IP'S are connecting ..
    
new connecting_ip[32+1];
    
GetPlayerIp(playerid,connecting_ip,32);
    new 
num_players_on_ip GetNumberOfPlayersOnThisIP(connecting_ip);
    if(
num_players_on_ip MAX_CONNECTIONS_FROM_IP) {
        
printf("MAXIPs: Connecting player(%d) exceded %d IP connections from %s."playerid,    MAX_CONNECTIONS_FROM_IPconnecting_ip);
        
SendClientMessage(playeridCOLOR_LIGHTRED"SERVER: {FFFFFF}You have exceeded the max IPs limiit.");
        
FixedKick(playerid);
        return 
1;
    }
    
// DONE 
PHP код:
Stock of GetNumberOfPlayersOnThisIP
stock GetNumberOfPlayersOnThisIP
(test_ip[])
{
    new 
against_ip[32+1];
    new 
0;
    new 
ip_count 0;
    for(
x=0x<MAX_PLAYERSx++) {
        if(
IsPlayerConnected(x)) {
            
GetPlayerIp(x,against_ip,32);
            if(!
strcmp(against_ip,test_ip)) ip_count++;
        }
    }
    return 
ip_count;

PHP код:
Stock of FixedKick
stock FixedKick
(playerid) {
    
KillTimer(kick_gTimer[playerid]);
    
kick_gTimer[playerid] = SetTimerEx("DelayedKick"500false"i"playerid);
    return 
1;

PHP код:
forward DelayedKick(playerid);
public 
DelayedKick(playerid) {
    if (!
IsPlayerConnected(playerid)) return 1;
    
Kick(playerid);
    return 
1;

Hope this helps you , i've just give you an idea how to do it , Good luck
Reply
#4

Just use the filterscript that comes with server.
Reply
#5

Yeah many thanks, but the thing is, i dont need a script like that. I've downloaded a script a while ago, and it must be located somewhere inside, so i asked for some examples to search on that. Sadly i had no results, so is there any other way to get rid of it?

EDIT: Nevermind, found it, +Rep for both.
Reply
#6

Or well, havent found it yet, LOL.
Reply
#7

http://ysi.wikia.com/wiki/Library:YSI%5Cy_flooding
Reply
#8

Still cant find it, i'm using the Zgaming gamemode so you guys know.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)