This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

mofoRates v0.01b


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management       
Spotty
Junior Member
Join Date: Apr 2005
Old 04-16-2005 , 14:41   mofoRates v0.01b
Reply With Quote #1

Original Author’s

Quote:
mofoRates v0.01b
Developed by Tilted Logic for
mofo and PUB Counter-Strike clans
www.tiltedlogic.com
www.mofo-cs.tk
www.pub-community.com


Test server > 217.146.91.170:27015 The Maggot Farm -<(omfg)> Clan www.omfgclan.co.uk

PUB Counter-Strike clans have given me permission to release this to the public.

It’s a simple Rate Checker to help keep a server balanced and fair . . It stop's players from setting there rates so low that you dont get any Bulit Reg when you shoot at them, it also helps with Choke and Loss to some degree

All I have done to the original is to change >

Quote:
#include <amxmodx> (so it will work with amxmodx and not the amx it was used for)
And ……

Quote:
register_cvar("mofo_min_rate", "18000")
register_cvar("mofo_min_updaterate", "80")
register_cvar("mofo_min_cmdrate", "80")
This means that the Min Rates allowed on the server 1800 / 80 / 80

Set the above settings to suit your needs

I’ve not included the Amxx file as your would be better setting the values in the hard code for a default setting . . then using the cvars below change as you need to . .

Quote:
* cvars
* mofo_auto_check - checks a players rates when they join the server
* also monitors the player, should the player change
* rates then it will validate them
* note: admins are not checked
* mofo_auto_fix - defines whether invalid rates are 'fixed'
* mofo_min_rate - minimum allowable rate
* mofo_min_updaterate - minimum allowable updaterate
* mofo_min_cmdrate - minimum allowable cmdrate
* mofo_silent - dont tell people about low rates or changed rates
*
* admin commands
* mofo_rates - perform a full rates check on all players, displays players with low rates
* mofo_list - displays a list of all players and their rates
*
* (c) Tilted Logic 2004
* You may use this script on your server providing all notices are unchanged
*
* This file is provided as is (no warranties).
*
Please feel free to develop this port . . but please take note of the original author’s above ^^^ note.

Thanks to PUB Clan

PS] If you like the Plugin I have a menu driven version of there latest version . .
the problem is that I can hack a script in the most basic form . . and the menu driven version is for amx . . .
and tbh well past my coding level to do it justice


Enjoy . .

**UPDATE

Ok Its makes the .amxx file . . .so READ the Post in full

**Note to Admin -
Ive read the forum post rules and have done my best to make sure Ive done what I can. To this end its my first post so please forgive and give feed back if the Code is not upto spec. I did not write the plugin only released it.


Thanks
Spotty
Attached Files
File Type: sma Get Plugin or Get Source (moforates.sma - 2610 views - 8.7 KB)
__________________
Spotty is offline
Cryonic
Senior Member
Join Date: Aug 2004
Location: Sweden..... (XCoder)
Old 04-17-2005 , 04:21  
Reply With Quote #2

Hi, I'm not so good ath the servercommands so I'll have to ask what differs from using the sv_minrate, sv_minupdaterate. I can see why the cmdrate, since I can't find any setting for that
Cryonic is offline
Spotty
Junior Member
Join Date: Apr 2005
Old 04-17-2005 , 05:21  
Reply With Quote #3

Ok you asked so please read on >

Quote:
Lifted from the excellent Summerblue report....

There are four commands which are configure the various aspects of client-server configuration;

cl_cmdrate is the number of times per second the client informs the server of its actions. Remember that the amount of data in an update depends on how much is going on.
cl_updaterate is the number of times per second the server tells the client what's been going on in the map. Likewise, more action, more data per update.
rate is the maximum limit of bytes per second the server can send to the client. sv_maxrate, the server specified limit, is used if rate is higher than sv_maxrate.
cl_rate sets a maxiumum limit of bytes per second the client can send the server. This value is necessary as the server cannot reliably determine the data transfer rate to the client. This value needs to be set to match the data upload rate of your connection to the server. NB Many sources say cl_rate is no longer used

Updates from the client to the server usually contain very little data - perhaps 20 bytes. Updates from the server to the client contain (relatively speaking) a lot of data, from say 30 bytes in a quiet area of a map to 175 bytes in combat.

For example, a 56k modem has a maximum upload rate of 33.6k, and a maximum download rate of 56k. The values here are bits per second (e.g. 33600 bits per second upload rate). However, these are signaling rates, not data payload rates. The signaling rate is the number of bits per second; but not all of these bits can be used for data. Some - roughly 10 percent - are used for control information. So a 33.6k bits per second connection can in fact only transfer about 30.2k bits per second of real data, which is 3780 bytes - and this is the value cl_rate should be set to (assuming a perfect upload connection - if the modem is connecting over a noisy line and the data transfer rate is reduced, the rate value must accordingly be reduced).

Likewise, with a perfect 56k connection, 56000 bits per second are available. Reducing this by ten percent gives 6300 bytes per second. This is the value rate should be set to.

rate equals download speed times .9 divided by 8
cl_rate equals upload speed times .9 divided by 8

By and large, clients don't have very much to tell the server; client to server communication rarely suffers from bottlenecks even on a 56k modem.

Note that the control information overheads differ depending on the type of connection between the client and ISP, but that this is basically irrelevent for higher bandwidth connections since such connection types will always have much more bandwidth available than the maximum value the server will permit a client to use.

Fractional values for cl_rate and rate make absolutely no difference whatsoever. It is an urban myth that fractional values improve performance.

As previously mentioned, client to server updates are typically very small, in the order of 20 bytes. On a 56k modem with a perfect connection, 3780 bytes are available per second for updates to the server, so cl_cmdrate can be set 189. As it is, Half-life has a hard coded internal maximum for this of about 60.

Updates from the server to the client shift more data. Large updates (e.g. combat situations) take something like 175 bytes. With 6300 bytes per second available on a perfect 56k modem connection, cl_updaterate should be set to 36.

cl_updaterate equals rate divided by 175
cl_cmdrate equals cl_rate divided by 20

Players with broadband connections will have configurations very different to the values derived so far. Firstly, a broadband connection will always have more bandwidth available than the server can provide. As such, rate and cl_rate both need to be set to their maximum values so that the client is using all available bandwidth.

The maximum value for both rate and cl_rate is 20,000.

The calculation for the correct setting of cl_cmdrate and cl_updaterate actually usually depends on the particular server the player is connected to, as it's sv_maxrate value will be the limiting factor for available bandwidth, and available bandwidth defines the correct update settings.

As previously mentioned, Half-life has an internal hard-coded maximum of about 60 for both update settings. The recommended setting is therefore 75 (to be on the safe side), which should be reduced in line with the sv_maxrate setting as necessary.

The net_graph command provides information about the state of the client-server connection in the bottom right hand corner of the screen.

The field we are interested in is choke.

Choke represents the number of updates not sent in either direction because the the communication link is saturated.

(Loss is rather different and rarely used, and represents the number of updates which were sent but never reached their destination. If a player experiences significant loss their is a technical problem with the network connection, which lies outside the scope of this report.)

Leave net_graph running and monitor the choke value. Gradually reduce the cl_updaterate and cl_cmdrate values if choke occurs, until choke no longer occurs during comabt.

The overall goal is to have cl_updaterate and cl_cmdrate as high as possible (to provide a better illusion of uniform motion) while still ensuring choke is low or zero during combat.



Rates

A lot of people always ask what rates are, what values to use, etc. I thought it would benefit a lot of people if a guide was written explaining what everything means. This is so people are not simply just told what values to use without understanding what they actually mean.



Definitions

Lets start with some definitions:

rate is the maximum limit of bytes per second the server can send to the client.

cl_rate sets a maxiumum limit of bytes per second the client can send the server. (You don't need to worry about this value)

cl_cmdrate is the number of times per second the client informs the server of its actions.

cl_updaterate is the number of times per second the server tells the client what's been going on in the map.



I'm assuming most people have ADSL or cable here I will use ADSL as an example and so I will assume everyone has a downstream of 512kb/s and an upstream of 256kb/s but you can do all this maths with cable and lower connection speeds as well (just need to sub in different values). I am going to tell you now that it is best to set the values for rate, cl_updaterate and cl_cmdrate as high as possible because this allows for a fairer game and more importantly it makes your bullets more likely to register on the other players. I?ll now show you why!



rate

In theory an ADSL connection should easily be able to support a rate of 25000. You can work this out my taking the value for rate, which is measured in bytes per second. This then needs to be converted in to kilobytes per second.

25000 /1024 = 24.4140625kB/s



In theory your connection runs at 512 kilobits per second (in reality it will actually run slower than this). I'll convert this in to kilobytes per second:

512 / 8 = 64kB/s



Now you can see that your connection could have 2.62 people running off it using a rate of 25000 (64 / 24.414 = 2.62). You can use the same calculations for cl_rate but there's no point, the default value of 9999 is good enough.



cl_updaterate

Next you want to set values for cl_updaterate and cl_cmdrate. updaterate defines how many updates per second you can get from the server. It is obviously best to get as many updates from the server as possible because this gives you a more accurate picture of where everyone one is and where their bullets are going. However, if you have a high updaterate and a low rate then you will not be able to send much data per update and any benefit of having a high updaterate will be minimised. Lets use an example to make it more clear.



If I set my cl_updaterate to 100 and my rate to 25000 in theory each update can contain up to 250bytes of data (25000 / 100 = 250). Again, the more data you get per update the more accurate your view of the gaming world (not that this will particularly affect what you see much but it will have some affect on where your bullets end up hitting). In version 1.3 it was estimated that when you have a lot of action on screen you can use as much as 175bytes per update. So if you have a high updaterate you need a high rate to match it.



Using the data from 1.3, if you have an updaterate of 100 you should have a rate of at least 17500 but it?s better to be safe than sorry and set this value a bit higher. I recommend 20000 as a minimum (to work out what value to use for you rate take your cl_updaterate and multiply it by 175 and then add at least another 2000 to it to be safe).



cl_cmdrate

cl_cmdrate works the same as cl_updaterate. Basically, it defines how many updates per second you send to the server. So again you want this value to be as high as possible. The more updates you send to the server the better information it has about what you are doing and where your bullets are going. This value is even more important than cl_updaterate in my eyes.



As with cl_updaterate and rate you can work out the maximum amount of data which each update can contain. So if you have a cl_cmdrate of 100 and your cl_rate is 9999 then each update can contain 99.99bytes of data (9999 / 100 = 99.99). This should be enough for your needs because you send less data to the server than it sends you.



Choke and loss

Now we will look at choke and lose. Choke tells you the number of updates not sent in either direction because the communication link is saturated. Loss tells you the number of updates which were sent but never reached their destination. Choke is more important than loss because you are flooding the connection and it can?t cope with all the data. This means that it is best to reduce the values of your rates. Loss is not so important and if you?re getting lots of loss then the connection between you and the server isn?t very good. Both choke and loss can be caused by using rates which are too high or too low.



I recommend you try using values of:

rate 25000

cl_updaterate 100

cl_cmdrate 100



If these values are causing you choke or a loss of loss then start to reduce the values. I would not venture below:

rate 14000

cl_updaterate 70

cl_cmdrate 70



You can check choke and lose with net_graph 3. Each server is different so if you?re really concerned about choke and loss just bring up net_graph and adjust your rates a bit if you?re suffering from either of these.



ex_interp

Another values which needs setting in 1.6 is ex_interp. I won?t bother explaining interp to you because I?ve written enough about rates. They have fixed interp in 1.6 and as a result it is wrong to use the default value of 0.1. You work out the correct value for ex_interp by dividing 1 by your cl_updaterate. Some examples:



cl_updaterate 100

1 / 100 = 0.01

ex_interp 0.01



cl_updaterate 70

1 / 70 = 0.014

ex_interp 0.014



You might find with using a lower value for ex_interp makes people appear to be a little jerky. To counter this affect raise your value of ex_interp but try and keep it as close to the correct value as possible.



I hope that?s cleared things up for most of you if not all of you



Thanks for reading,

McClane.



Credits

I used the following website just to make sure I didn't make a fool of myself by using incorrect definitions but it is all my own work otherwise - http://www.summerblue.net/games/cs_r...on_config.html
If this has not sorted out your question I will try to reanswer later . .
__________________
Spotty is offline
Cryonic
Senior Member
Join Date: Aug 2004
Location: Sweden..... (XCoder)
Old 04-17-2005 , 05:34  
Reply With Quote #4

Sorry for putting the question bad, I ment this plugin versus the built-in server commands mentioned
Cryonic is offline
Spotty
Junior Member
Join Date: Apr 2005
Old 04-17-2005 , 05:44  
Reply With Quote #5

Not a lot in the real world, It's a usfull tool to run with Amxmodx that will show In game admins who is not playing fair . . and adjust the client setting of players with a low settings . .

I dont want to get into the old rate hacking argument, but It gives the Admin a easy method to keep on top of this type of abuse . .


In game controls -
admin commands to type in consol >

mofo_rates - perform a full rates check on all players, displays players with low rates
mofo_list - displays a list of all players and their rates

I hope that answers your question . . .If not ...sorry I'm new to this

Our Clan use this to check player settings when playing league game's befor we turn amxmodx and the like off . . . And it keeps unwanted player types off the server . . . hence the server MOTD [bottom left of the image]>


__________________
Spotty is offline
Cryonic
Senior Member
Join Date: Aug 2004
Location: Sweden..... (XCoder)
Old 04-17-2005 , 06:19  
Reply With Quote #6

Yes that answers my question. Useful plugin. thx
Cryonic is offline
Spotty
Junior Member
Join Date: Apr 2005
Old 04-17-2005 , 06:54  
Reply With Quote #7

Quote:
Originally Posted by Cryonic
Yes that answers my question. Useful plugin. thx
No probs
As my Sig say's "We Aim To Please . . . If Not To Kill"
__________________
Spotty is offline
Spotty
Junior Member
Join Date: Apr 2005
Old 04-18-2005 , 16:43   I need help plz
Reply With Quote #8

Ok I would like to get this plugin approved but I have a problem . . well more than one . .

Quote:
It means that the plugin will work if you use amxmod.inc instead of amxmodx.inc

But we are trying to phase out the use of amxmod.inc so we won't approve plugins that use it.
I'm finding myself a little out of my depth . . .

Now this is the code and I'm unsure if the above quote means that this plugin wont be approved . .

any help would be nice . .
If it does then could someone point in the right direction of how to fix it . .

Thanks

Quote:
/* AMX Mod script
*
* mofoRates v0.01b
* ----------------
*
* Developed by Tilted Logic for
* *mofo* and PUB Counter-Strike clans
*
* www.tiltedlogic.com
* www.mofo-cs.tk
* www.pub-community.com
*
* test server - 82.38.180.214:27016
*
* cvars
* mofo_auto_check - checks a players rates when they join the server
* also monitors the player, should the player change
* rates then it will validate them
* note: admins are not checked
* mofo_auto_fix - defines whether invalid rates are 'fixed'
* mofo_min_rate - minimum allowable rate
* mofo_min_updaterate - minimum allowable updaterate
* mofo_min_cmdrate - minimum allowable cmdrate
* mofo_silent - dont tell people about low rates or changed rates
*
* admin commands
* mofo_rates - perform a full rates check on all players, displays players with low rates
* mofo_list - displays a list of all players and their rates
*
* (c) Tilted Logic 2004
* You may use this script on your server providing all notices are unchanged
*
* #include <stddisclaimer.h>
* This file is provided as is (no warranties).
*
*/

#include <amxmodx>

public plugin_init() {
register_plugin("mofoRates", "0.01", "Tilted Logic")

//register_clcmd("rate", "mofo_check_rate", ADMIN_USER)
//register_clcmd("cl_updaterate", "mofo_check_updaterate", ADMIN_USER)
//register_clcmd("cl_cmddaterate", "mofo_check_cmdrate", ADMIN_USER)

register_cvar("mofo_min_rate", "18000")
register_cvar("mofo_min_updaterate", "80")
register_cvar("mofo_min_cmdrate", "80")

register_cvar("mofo_auto_check", "1") // 1 = enabled, 0 = disabled
register_cvar("mofo_auto_fix", "1") // 1 = enabled, 0 = disabled
register_cvar("mofo_silent", "0") // 1 = enabled, 0 = disabled

register_concmd("mofo_rates", "mofo_rates", ADMIN_LEVEL_H, "List players with low rates.")
register_concmd("mofo_list", "mofo_list", ADMIN_LEVEL_H, "Display rates for all players.")

return PLUGIN_CONTINUE
}

public client_putinserver(id) {
client_cmd(id,"echo This server is running mofoRates by Tilted Logic (www.tiltedlogic.com)")

client_infochanged(id);

return PLUGIN_CONTINUE
}

public client_infochanged(id) {
new rate[32]
new updaterate[32]
new cmdrate[32]

if (mofo_check_user(id) == 0)
return PLUGIN_CONTINUE

get_user_info(id, "rate", rate, 31)
if (mofo_number_valid(rate) == 1) {
mofo_check_data(id, "rate", "mofo_min_rate", rate)
}

get_user_info(id, "cl_updaterate", updaterate, 31)
if (mofo_number_valid(updaterate) == 1) {
mofo_check_data(id, "cl_updaterate", "mofo_min_updaterate", updaterate)
}

get_user_info(id, "cl_cmdrate", cmdrate, 31)
if (mofo_number_valid(cmdrate) == 1) {
mofo_check_data(id, "cl_cmdrate", "mofo_min_cmdrate", cmdrate)
}

return PLUGIN_CONTINUE
}

public mofo_check_user(id) {
/* Do we do a check on this user? */

if (get_cvar_num("mofo_auto_check") == 0)
return 0

//if (get_user_flags(id) & ADMIN_IMMUNITY)
// return 0

if (is_user_bot(id))
return 0

if (is_user_hltv(id))
return 0

return 1
}

public mofo_number_valid(numstr[]) {
new num

num = str_to_num(numstr)

if (num == 0) {
if (!numstr[0]) {
return 0
}
}

return 1
}

/* player has manually changed rate */
public mofo_check_rate(id) {
new rate[50]

client_print(id, print_console, "You have just changed your rate")

read_args(rate, 49)

return mofo_check_data(id, "rate", "mofo_min_rate", rate)
}

/* player has manually changed updaterate */
public mofo_check_updaterate(id) {
new updaterate[50]

client_print(id, print_console, "You have just changed your cl_updaterate")

read_args(updaterate, 49)

return mofo_check_data(id, "cl_updaterate", "mofo_min_updaterate", updaterate)
}

/* player has manually changed updaterate */
public mofo_check_cmdrate(id) {
new cmdrate[50]

client_print(id, print_console, "You have just changed your cl_cmdrate")

read_args(cmdrate, 49)

return mofo_check_data(id, "cl_cmdrate", "mofo_min_cmdrate", cmdrate)
}

public mofo_check_data(id, desc[], cvar[], value[]) {
new user[32]

if (mofo_check_user(id) == 0)
return PLUGIN_CONTINUE

if (mofo_number_valid(value) == 0)
return PLUGIN_CONTINUE

if (get_cvar_num(cvar) > str_to_num(value)) {
/* bad rate detected */
/* what do we do now? */

get_user_name(id, user, 31)

/* tell player his rate is invalid for this server */
if (get_cvar_num("mofo_silent") == 0) {
set_hudmessage
client_print(0, print_console, "Invalid %s detected, %s has set his %s to %s", desc, user, desc, value)
client_print(0, print_console, "Minimum %s for this server is set to %d.", desc, get_cvar_num(cvar))
}

if (get_cvar_num("mofo_auto_fix") == 1) {
/* set players rate to a valid value - informing the player of this change */
if (get_cvar_num("mofo_silent") == 0) {
client_print(id, print_console, "Your %s has been changed to the minimum allowable setting.", desc)
}
client_cmd(id, "%s %d", desc, get_cvar_num(cvar))
}

return PLUGIN_HANDLED
}

return PLUGIN_CONTINUE
}

public mofo_list(id) {
new players[32]
new num
new name[32]
new rate[32]
new updaterate[32]
new cmdrate[32]
new steamid[35]

get_players(players,num,"a")

client_print(id, print_console, "Currently connected players...")
client_print(id, print_console, "ID SteamID Name rate cl_updaterate cl_cmdrate")

for (new i = 0; i < num; ++i) {
get_user_name(players[i], name, 31)
get_user_authid(players[i], steamid, 34);
get_user_info(players[i], "rate", rate, 31)
get_user_info(players[i], "cl_updaterate", updaterate, 31)
get_user_info(players[i], "cl_cmdrate", cmdrate, 31)

client_print(id, print_console, "%d %s %s %s %s %s", players[i], steamid, name, rate, updaterate, cmdrate)
}

if (num == 0) {
client_print(id, print_console, "The server is currently empty")
}
return PLUGIN_HANDLED
}

public mofo_rates(id) {
new players[32]
new num
new name[32]
new rate[32]
new updaterate[32]
new cmdrate[32]
new steamid[35]
new flag
new playerflag

get_players(players, num)

client_print(id, print_console, "Scanning currently connected players...")
client_print(id, print_console, "ID SteamID Name rate cl_updaterate cl_cmdrate")

playerflag = 0

for (new i = 0; i < num; ++i) {
get_user_name(players[i], name, 31)
get_user_authid(players[i], steamid, 34);
get_user_info(players[i], "rate", rate, 31)
get_user_info(players[i], "cl_updaterate", updaterate, 31)
get_user_info(players[i], "cl_cmdrate", cmdrate, 31)

flag = 0

if (mofo_number_valid(rate) == 1) {
if (get_cvar_num("mofo_min_rate") > str_to_num(rate)) {
flag = 1
playerflag = 1
}
}

if (flag == 0) {
if (mofo_number_valid(updaterate) == 1) {
if (get_cvar_num("mofo_min_updaterate") > str_to_num(updaterate)) {
flag = 1
playerflag = 1
}
}
}

if (flag == 0) {
if (mofo_number_valid(cmdrate) == 1) {
if (get_cvar_num("mofo_min_cmdrate") > str_to_num(cmdrate)) {
flag = 1
playerflag = 1
}
}
}

if (flag == 1) {
client_print(id, print_console, "%d %s %s %s %s %s", players[i], steamid, name, rate, updaterate, cmdrate)
}
}


if (num == 0) {
client_print(id, print_console, "The server is currently empty")
} else if (playerflag == 0) {
client_print(id, print_console, "There are no players on this server with low settings")
}

return PLUGIN_HANDLED
}
One more thing could any body using the plugin tell me if there low settings players are getting a HUD message . .

Thanks
__________________
Spotty is offline
Spotty
Junior Member
Join Date: Apr 2005
Old 04-29-2005 , 17:04  
Reply With Quote #9

76 Downloads . . . any feed back ????
__________________
Spotty is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 04-29-2005 , 17:44  
Reply With Quote #10

not every plugin get approved
and if you paste the coding pls use [small][/ small] and not [code] [/ code]
Quote:
Originally Posted by BAILOPAN
- If you didn't write the plugin: put the name of the author to the topic and to the post.
- If the original author requests that it be put under their control or removed, their request will be honored.
- You must not use amxmod.inc - only use amxmodx.inc instead.
- You must not use Vexd or XtraFun modules - use the AMX Mod X modules C-S/Engine/Fun instead.
- Don't hardcode paths like amxx/custom; use the get_customdir native instead
- Use log_amx instead of log_to_file
because it's a port from amx maybe you made it but it is still a port so make sure you did those things and then i could get approved
__________________
- Bye bye!
nightscreem 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 20:53.


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