Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DLL PING WARN1.1
#1
NEED A PLUGIN.
LIMIT ESTABLISHED WITH MAXIMUM PING 4OO.
PLEASE, DO NOT DO IT BY MYSELF
Reply

#2
Hello,

You can configure the max ping allowed.
You can configure if you want to warn or kick the player.

Add those lines to the sv_config.ini:
Code:
[MaxPingKick]
MaxPing=400
// (int) Max Ping allowed
Mode=0
// 0 = Kick the client, 1 = send a chat message to the client with a warning

I'm not sure if that's what you wanted, but that's what i did lol Wink

Csharp source code:
Code:
using System;
using Addon;
  
namespace MaxPingKick
{
    public class MaxPingKick : CPlugin
    {
        // Store max ping allowed
        private int max_ping = 0;
        // Store plugin mode
        private int mode = 0;

        public override void OnServerLoad()
        {
            // Get max ping allowed from the sv_config.ini
            max_ping = Int32.Parse(GetServerCFG("MaxPingKick", "MaxPing", "400"));
            // Get max ping allowed from the sv_config.ini
            mode = Int32.Parse(GetServerCFG("MaxPingKick", "Mode", "0"));
        }

        public override void OnPlayerConnect(ServerClient Client)
        {
            // Call Check Ping
            CheckPing(Client);
        }

        public override void OnPlayerDisconnect(ServerClient Client)
        {
            // Call Check Ping
            CheckPing(Client);
        }

        public override void OnPlayerSpawned(ServerClient Client)
        {
            // Call Check Ping
            CheckPing(Client);
        }

        private void CheckPing(ServerClient Client)
        {
            // Check Ping
            if (Client.Ping > max_ping)
            {
                // Ping to high
                // Check plugin mode
                if (mode == 1)
                {
                    // warn client ;(
                    iPrintLnBold("Your ping is too high (" + Client.Ping + ")", Client);
                }
                else
                {
                    // Ping to high => kick client ;(
                    ServerCommand("kickclient " + Client.ClientNum);
                }
            }
        }
    }
}


Attached Files
.zip   MaxPingKick.zip (Size: 1.98 KB / Downloads: 104)
Reply

#3
(07-15-2012, 19:18)narkos Wrote: Hello,

You can configure the max ping allowed.
You can configure if you want to warn or kick the player.

Add those lines to the sv_config.ini:
Code:
[MaxPingKick]
MaxPing=400
// (int) Max Ping allowed
Mode=0
// 0 = Kick the client, 1 = send a chat message to the client with a warning

I'm not sure if that's what you wanted, but that's what i did lol Wink

Csharp source code:
Code:
using System;
using Addon;
  
namespace MaxPingKick
{
    public class MaxPingKick : CPlugin
    {
        // Store max ping allowed
        private int max_ping = 0;
        // Store plugin mode
        private int mode = 0;

        public override void OnServerLoad()
        {
            // Get max ping allowed from the sv_config.ini
            max_ping = Int32.Parse(GetServerCFG("MaxPingKick", "MaxPing", "400"));
            // Get max ping allowed from the sv_config.ini
            mode = Int32.Parse(GetServerCFG("MaxPingKick", "Mode", "0"));
        }

        public override void OnPlayerConnect(ServerClient Client)
        {
            // Call Check Ping
            CheckPing(Client);
        }

        public override void OnPlayerDisconnect(ServerClient Client)
        {
            // Call Check Ping
            CheckPing(Client);
        }

        public override void OnPlayerSpawned(ServerClient Client)
        {
            // Call Check Ping
            CheckPing(Client);
        }

        private void CheckPing(ServerClient Client)
        {
            // Check Ping
            if (Client.Ping > max_ping)
            {
                // Ping to high
                // Check plugin mode
                if (mode == 1)
                {
                    // warn client ;(
                    iPrintLnBold("Your ping is too high (" + Client.Ping + ")", Client);
                }
                else
                {
                    // Ping to high => kick client ;(
                    ServerCommand("kickclient " + Client.ClientNum);
                }
            }
        }
    }
}


GREAT JOB.
BUT I DO NOT UNDERSTAND WHY THE SERVER me out.
MY PING IS "32".
IS THE SAME PROBLEM I HAVE WITH PINGWARN 1.1
HOW COULD SOLVE IT?
Reply

#4
If you have a ping of "32", this plugin shoulden't kick you out....

I need more infos (tests) to understand what happened to you.

Can you test again with "Mode=1" in your sv_config.ini.
With this settings you will not be kicked out but you will have a message in the center HUD with you ping.

I need those informations:
- The ping that you get in the center HUD message (need 3 or 4 different ping to be ok).
- When it happened?...when you connect to the server? when you respawn? how many people are on the server? Is the server on your computer?...

Give me all the informations you can, more i have, faster the problem is solved...
Reply

#5
server: computer pc (I have 1 pc)
happens every 30 seconds, I ejected ....
but it does not just tell me it did. (and becomes annoying)
is free for all mode (16 players)
pingo limit of 350.
I hesitate between 32-50 ping

(07-17-2012, 02:01)kpoviv Wrote: server: computer pc (I have 1 pc)
happens every 30 seconds, I ejected ....
but it does not just tell me it did. (and becomes annoying)
is free for all mode (16 players)
pingo limit of 350.
I hesitate between 32-50 ping

use tecknomw3
Reply

#6
With the settings i told you in last post, my plugin can not kick you...
But sorry i'll not help anymore because i do not support teknomw3 users...

Maybe teknomw3 is a great tool, but if you like a game, buy it and support developers...
Good luck.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] Ping Warn Plugin v1.1 master131 28 23,878 07-10-2013, 09:34
Last Post: spike17
  ping warn 1.1, I passed from the server kpoviv 1 2,401 12-13-2012, 09:47
Last Post: XxBRxX
  [Release] Ping block 1.3 archit 17 10,703 10-07-2012, 02:48
Last Post: archit
  High Ping block still badly needed here choobie 6 4,303 10-01-2012, 12:22
Last Post: archit
  High ping blocker choobie 5 4,189 08-21-2012, 15:16
Last Post: choobie
  DLL PING WARN1.1 kpoviv 2 2,242 07-07-2012, 23:39
Last Post: JariZ
  [Request] Ping Text visible plugin b00mmolo 2 2,908 05-14-2012, 16:23
Last Post: b00mmolo
Lightbulb [Release] Core Ping plugin [updated to v1.0.2] Nerus 11 8,728 04-18-2012, 11:29
Last Post: Nerus
  [Release] Ping viewer Pozzuh 13 13,819 03-22-2012, 13:15
Last Post: zxz0O0
  [Request] Scoreboard with ping showing Radec 1 2,141 03-13-2012, 20:44
Last Post: kraze1994

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.