ItsMods
DLL PING WARN1.1 - Printable Version

+- ItsMods (https://www.itsmods.com)
+-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html)
+--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html)
+--- Thread: DLL PING WARN1.1 (/Thread-DLL-PING-WARN1-1.html)



DLL PING WARN1.1 - kpoviv - 07-07-2012

NEED A PLUGIN.
LIMIT ESTABLISHED WITH MAXIMUM PING 4OO.
PLEASE, DO NOT DO IT BY MYSELF


RE: DLL PING WARN1.1 - narkos - 07-15-2012

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); } } } } }



RE: DLL PING WARN1.1 - kpoviv - 07-15-2012

(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?


RE: DLL PING WARN1.1 - narkos - 07-16-2012

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...


RE: DLL PING WARN1.1 - kpoviv - 07-17-2012

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


RE: DLL PING WARN1.1 - narkos - 07-17-2012

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.