Jump to content

[REL] Pingkicker v0.2 *UPDATED*


Mount

Recommended Posts

Pingkicker v0.2 by Patrick "Mount" Rombouts

==========================================

Functions:

- Pingkicker

- Configurable ping warning

- FPS kicker

- getClientFPS

- Automaticly saves/loads config

==========================================

Usage:

- How to set the maxping to 150:

/maxping 150

- Disabling the Pingkicker

/maxping 0 OR /maxping off

- Enabling the Pingkicker

/maxping on

- How to set the Pingwarning to 100:

/pingwarning 100

- Disabling the Pingwarning

/pingwarning 0 OR /pingwarning off

- Enabling the Pingwarning

/pingwarning on

- How to set the minimal fps to 10:

/minfps 10

- Disabling the minimal fps checker

/minfps 0 OR /minfps off

- Enabling the minimal fps checker

/minfps on

- Calling getPlayerFPS from your script

local playerFPS = call(getResourceFromName("pingkicker"), "getClientFPS") 

Note: Returns nil when the ping is unknown, or the player doesnt exist

==========================================

Changelog:

08/01/2008 - v0.2

- You can get the playerFPS from the script with getClientFPS (See usage)

- Added FPS Kicker

- Added an delay before kicking the player

- Added ASE tags

- Using get() and set() for settings now, command.xmlLoadFile as right is not needed anymore

- Added some debug messages

- Changed checkPings() to check for a pingwarning even if the maxping is turned off

- Pingwarning now depends on the ACL of maxping, everybody who can do maxping, can do pingwarning

05/01/2008 - v0.1

- Inital release

==========================================

DO NOT FORGET THIS!!!!

The script needs the following right(s):

command.kickPlayer

Command(s) you need to protect with ACL:

command.maxping

command.pingwarning

command.minfps

==========================================

Credits:

#mta.scripting and users for helping me

AlienX for looking at my stupid bugs

Ping Warning picture by [sG]Duckje

Greets to:

Rachel :D

MTA Team

SeriousGamers

Download: http://www.sitebar.nl/releases/mtadm/pingkicker.zip

Screenshot of the pingwarner: http://www.sitebar.nl/releases/mtadm/pingkicker-warning.png

Have fun,

Mount

Edited by Guest
Link to comment

ping kicker have no acces to kick player. from what i read i have to create group in acl... if im not wrong somethin like this:

and then it messed for me with these rights, could you post how should look the next parts:

ACL rights needed:

command.kickPlayer

command.xmlLoadFile

Commands you need to protect with ACL:

command.maxping

command.pingwarning

Thanks

Link to comment

   <group name="Pingkicker"> 
      <acl name="Pingkicker"/> 
      <object name="resource.pingkicker"/> 
   </group> 

      <acl name="Pingkicker"> 
      <right name="function.kickPlayer" access="true"/> 
      <right name="function.xmlLoadFile" access="true"/> 
   </acl> 

Link to comment

Remember to restrict the maxping and the pingwarning commands.

Add this to the Everyone group:

  
      <right name="command.maxping" access="false"/> 
      <right name="command.pingwarning" access="false"/> 
  

And this to the group you want to have access to it:

  
      <right name="command.maxping" access="true"/> 
      <right name="command.pingwarning" access="true"/> 
  

Mount: For safetyness, you can add a "true" argument at the end of addCommandHandler. Will make it restricted and disabled by default unless allowed by ACL.

Link to comment
Mount: For safetyness, you can add a "true" argument at the end of addCommandHandler. Will make it restricted and disabled by default unless allowed by ACL.

Thank you for the tip, adding it in version 0.2

I'd suggest you could use settings instead of custom commands too.

I have planned that already, im just waiting till the bug is fixed (viewtopic.php?f=90&t=21024)

Link to comment

Thanks alot, this will be usefull on a server of my friend, though it kicks straight away when the ping comes above the max isnt it? and it isnt kicking over the average ping some1 has... That would be better because some people have a little ping "SPIKE" as i will call it that the ping will be high for 1 fraction and after that it will go back down, but the ping was a moment above the max and ppl get kicked by than as i understood

Link to comment

i have done this......

Remember to restrict the maxping and the pingwarning commands.

Add this to the Everyone group:

  
      <right name="command.maxping" access="false"/> 
      <right name="command.pingwarning" access="false"/> 
  

And this to the group you want to have access to it:

  
      <right name="command.maxping" access="true"/> 
      <right name="command.pingwarning" access="true"/> 
  

Mount: For safetyness, you can add a "true" argument at the end of addCommandHandler. Will make it restricted and disabled by default unless allowed by ACL.

And this.....

   <group name="Pingkicker"> 
      <acl name="Pingkicker"/> 
      <object name="resource.pingkicker"/> 
   </group> 

      <acl name="Pingkicker"> 
      <right name="function.kickPlayer" access="true"/> 
      <right name="function.xmlLoadFile" access="true"/> 
   </acl> 

and still any random can adjust the ping kikcer settings.

and also, another thing i just discovered.....

if i go into the admin panel in game, and try to stop the pingkicker resource.... the server window says "Stopping pingkicker"

then the allmighty windows "MTA Server.exe has encountered a problem and needs to close" box appears.

Error Signature:

AppName: mta server.exe AppVer: 0.0.0.0 ModName: deathmatch.dll

ModVer: 0.0.0.0 Offset: 0004a5ea

Link to comment

Also, i have a suggestion for it.

a "warning" of some kind to say that the clients FPS is low.

and also...

i have found a small issue with it.

If in a server like mine, where there is about 1MB of recources to give out, as soon as a player joins, and starts reciving the recources, his ping skyrockets till he has recived it, and often gets kicked before he can recive the recources.

so i recomend a Settable timer or "Grace Period" where a player will not be checked for ping untill being in the game for 30 seconds. also, same on other recource loads.

Link to comment
Also, i have a suggestion for it.

a "warning" of some kind to say that the clients FPS is low.

and also...

i have found a small issue with it.

If in a server like mine, where there is about 1MB of recources to give out, as soon as a player joins, and starts reciving the recources, his ping skyrockets till he has recived it, and often gets kicked before he can recive the recources.

so i recomend a Settable timer or "Grace Period" where a player will not be checked for ping untill being in the game for 30 seconds. also, same on other recource loads.

30 seconds? hah, i take 2 mins to download 1 mb on a bad day.

Just make the pingkicker start onPlayerSpawn

Link to comment
  • 4 months later...

Change the kickPlayerWithDelay time from 3000 (3 seconds) to whatever you want i guess.

Server.LUA

setTimer (kickPlayerWithDelay, 3000, 1, thePlayer, "Too high ping (Max: " .. maxPingValue .. ")") 
                    outputChatBox ("Pingkicker: You will be kicked in 3 seconds, reason: Ping too high (Max: " .. maxPingValue .. ")", thePlayer, 255, 0, 0) 

Also, a chamnge i reccomend for EVERYONE using this script:

In the client.lua

Change Line 14 to this:

        pingwarning = guiCreateStaticImage( 0.38, 0.71, 0.26, 0.097, 'pingwarning.png', true, nil) 

This will make sure the image does not appear MASSIVE on Low Res (such as 640x480) and also that it wont appear Tiny on Rez's such as 1600X1200

with that line it will Scale the image to fit on every rez.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...