Raised This Month: $32 Target: $400
 8% 

[Question] 3 Connection From 1 IP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Azeddine
Member
Join Date: Jul 2017
Location: ML_NOTFOUND
Old 07-19-2017 , 06:41   [Question] 3 Connection From 1 IP
Reply With Quote #1

in a cyber , my players want to play but if more than 3 players connection in my server, all player banned
i need solution and thanks!
Or i need plugin if the 4 player connect to the server
like this :
Kicked : Sorry , 3/3 Players Connect
Sorry for my bad english !
Azeddine is offline
0xBatuhan
Member
Join Date: Dec 2016
Location: Turkey
Old 07-19-2017 , 08:33   Re: [Question] 3 Connection From 1 IP
Reply With Quote #2

Try this but I couldn't test.


PHP Code:
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>



public Plugin:myinfo =
{
    
name "Multiple Connection Blocker",
    
description "Blocking multiple connections.",
    
author "0xBatuhan",
    
version "1.0",
    
url "http://steamcommunity.com/profiles/76561198363019199"
};

public 
OnPluginStart()
{
    
HookEvent("player_connect_full"Event_PlayerConnectFull); 
}

public 
Action:Event_PlayerConnectFull(Handle:event, const String:name[], bool:dontBroadcast
{
    new 
client GetClientOfUserId(GetEventInt(event,"userid"));
    new 
String:ClientIp[16];
    new 
String:TargetIp[16];
    new 
maxIPCount 3// How many player can connect to server with same ip?
    
new ipCount 0;
    
    
GetClientIP(clientClientIpsizeof(ClientIp));
    
    for(new 
1<= MaxClientsi++)
    {
        if(!
IsFakeClient(i) && IsClientInGame(i))
        {
                
GetClientIP(iTargetIpsizeof(TargetIp));
                if(
strcmp(TargetIpClientIp) == 0)
                {
                    
ipCount++;
                }
        }
    }
    
    if(
ipCount maxIPCount)
    {
        
KickClient(client"Max 3 players from same ip adress.");
    }


Last edited by 0xBatuhan; 07-19-2017 at 08:36.
0xBatuhan is offline
stephen473
Senior Member
Join Date: Jan 2017
Location: somewhere on earth
Old 07-19-2017 , 14:16   Re: [Question] 3 Connection From 1 IP
Reply With Quote #3

This is better than other one.

PHP Code:
#pragma semicolon 1 // always pramga semicolon!

#define DEBUG

#define PLUGIN_AUTHOR "stephen473(Hardy)"
#define PLUGIN_VERSION "1.00"

#include <sourcemod>
#include <sdktools>

#pragma newdecls required

#define maxip 3 // you can change this

public Plugin myinfo 
{
    
name "Multiple Connect Blocker",
    
author PLUGIN_AUTHOR,
    
description "Block join from same ip adress",
    
version PLUGIN_VERSION,
    
url "steamcommunity.com/id/kHardy"
};

public 
void OnClientPutInServer(int client)
{
    
char clip[16];
    
GetClientIP(clientclipsizeof(clip));
    
    
int sameip 0;
    
    for(
int i 1<= MaxClientsi++)
    {
        if(
IsClientInGame(i))
        {
            
char playersip[52];
            
GetClientIP(iplayersipsizeof(playersip));
            
            if (
StrEqual(clipplayersip))
            {
                
sameip++;
            }
        }
    }
    
    if(
sameip maxip)
    {
        
KickClient(client"Only %i players can join from same ip adress."maxip);
    }

__________________
Also known as Hardy`.

Feel free to contact me if you have a private plugin request!

My Steam Profile | Discord: Hardy`#3792
stephen473 is offline
Azeddine
Member
Join Date: Jul 2017
Location: ML_NOTFOUND
Old 08-08-2017 , 07:45   Re: [Question] 3 Connection From 1 IP
Reply With Quote #4

Sorry, but i use Cs 1.6 i think this only of Css ?
Azeddine is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 08-08-2017 , 07:50   Re: [Question] 3 Connection From 1 IP
Reply With Quote #5

It's for SourceMod
You need look from AMX section
__________________
Do not Private Message @me
Bacardi is offline
Azeddine
Member
Join Date: Jul 2017
Location: ML_NOTFOUND
Old 08-08-2017 , 15:34   Re: [Question] 3 Connection From 1 IP
Reply With Quote #6

aha sorry wrong section
Azeddine is offline
Ayman Khaled
Senior Member
Join Date: Mar 2017
Location: Palestine
Old 08-08-2017 , 17:19   Re: [Question] 3 Connection From 1 IP
Reply With Quote #7

i had this problem
if you are using banip_fakes.amxx
delete it and test.
__________________
Ayman Khaled is offline
Azeddine
Member
Join Date: Jul 2017
Location: ML_NOTFOUND
Old 08-08-2017 , 19:11   Re: [Question] 3 Connection From 1 IP
Reply With Quote #8

okay
Azeddine is offline
xExperienced
Member
Join Date: Jun 2017
Location: USA
Old 08-09-2017 , 09:57   Re: [Question] 3 Connection From 1 IP
Reply With Quote #9

Quote:
Originally Posted by Azeddine View Post
in a cyber , my players want to play but if more than 3 players connection in my server, all player banned
i need solution and thanks!
Or i need plugin if the 4 player connect to the server
like this :
Kicked : Sorry , 3/3 Players Connect
Sorry for my bad english !
Use ReAuthChecker. (meta plugin)
Download Link : http://www.dedicated-server.ru/vbb/s...ad.php?t=26787

P.S : You need Re-hlds to make Re-Authchecker work.

and set this cvar in reauthcheck.cfg

Code:
MaxIpNum = 3
PunishStringMaxIP = kick [userid]
**So whenever 4th player connect from same ip he/she will get kicked**

Last edited by xExperienced; 08-09-2017 at 10:00.
xExperienced is offline
Azeddine
Member
Join Date: Jul 2017
Location: ML_NOTFOUND
Old 08-09-2017 , 10:18   Re: [Question] 3 Connection From 1 IP
Reply With Quote #10

Thank you Su Much <3
Azeddine is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:50.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode