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

Set Player Rates


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
feren02
Senior Member
Join Date: Mar 2012
Old 05-12-2012 , 23:24   Set Player Rates
Reply With Quote #1

Hi,

Can I request an amx plugin that allows players to set rates so they can have better latency in-game?

I am thinking that when they type say:/cp - a menu will appear on the left side of the screen just like when buying or selecting teams. See below:

Optimize Connection:

1. Tunnel Server
1. Boost Ping
2. Good Recoil

------
A. When a player select Tunnel Server, this function will be read:

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <chatcolor>

new TunnelTimes[33];

public 
plugin_init()
    
register_clcmd("say /cp""CmdPing");

public 
CmdPing(id) {
    
TunnelTimes[id] = 0;
    new 
name[32]
    
get_user_name(idname31)
    
    
client_print_color(0print_chat"^3[^4o-cP` Battle Arena^3] ^4%s^1 find 3 tunnels."name);
    
    
set_task(0.1"CmdTunnel"id);
    
set_task(0.2"CmdTunnel"id);
    
set_task(0.3"CmdTunnel"id);
    return 
PLUGIN_HANDLED;
}

public 
CmdTunnel(id) {
    
TunnelTimes[id]++;
    
    new 
szPingszLoss;
    
get_user_ping(idszPingszLoss);

    
client_print_color(0print_chat"^3[^4o-cP` Battle Arena^3] ^1Tunnel: ^4%d"szPing);
    return 
PLUGIN_HANDLED;

B. When a player select Boost Ping, his rates will be set to:
Quote:
fastsprites 1
fps_max 999
fps_modem 999
gl_max_size 256
r_drawviewmodel 1
r_dynamic 0
r_mirroralpha 0
r_mmx 1
cl_rate 9999
cl_cmdrate 11
cl_updaterate 11
r_decals 0
mp_decals 0
sv_allowupload 0
sv_allowdownload 1
sv_download_ingame 0
cl_weather 0
cl_lc 1
cl_lw 1
rate 25000
cl_corpsestay 0
viewsize 0
sv_airaccelerate 200
mp_flashlight 0
sv_maxupdaterate 100
sv_maxrate 25000
sv_minrate 0
cl_upspeed 32000
cl_forwardspeed 32000
cl_sidespeed 32000
cl_backspeed 32000
gl_spriteblend 0
C. When a player select Good Recoil, his rates will be set to:
Quote:
rate 25000
cl_updaterate 100
cl_cmdrate 105
fps_max 100
cl_upspeed 32000
cl_forwardspeed 32000
cl_sidespeed 32000
cl_backspeed 32000
gl_spriteblend 0

Last edited by feren02; 05-12-2012 at 23:28.
feren02 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-13-2012 , 01:35   Re: Set Player Rates
Reply With Quote #2

Client rates are client-specific and should never be set by the server. If you want to force certain rates then you can use sv_minupdaterate, sv_maxupdaterate, sv_minrate, and sv_maxrate.
__________________
fysiks is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-13-2012 , 05:50   Re: Set Player Rates
Reply With Quote #3

You are confusing server rates and client rates in the code you gave.
Also :

cl_updaterate 100
cl_cmdrate 105

This is not a good recoil setting at all.



->
cl_updaterate 11
cl_cmdrate 11
This is a disaster for the game...


But main answer has been given already.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
feren02
Senior Member
Join Date: Mar 2012
Old 05-13-2012 , 06:23   Re: Set Player Rates
Reply With Quote #4

Hi, I am running my server only in a small computer shop with friends. We are having fun everyday, that is why I requested I just want to have it. Cause when we put those rates their latency becomes lower.

Hoping. Thanks looking forward.
feren02 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-13-2012 , 06:30   Re: Set Player Rates
Reply With Quote #5

Then, put in server.cfg :

sv_maxrate 9999
sv_minrate 2500
sv_maxupdaterate 40
sv_minupdaterate 10


Should be ok for your small server ;)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
feren02
Senior Member
Join Date: Mar 2012
Old 05-13-2012 , 06:31   Re: Set Player Rates
Reply With Quote #6

weeeeeee CONOR!!! (((
feren02 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-13-2012 , 16:25   Re: Set Player Rates
Reply With Quote #7

Quote:
Originally Posted by feren02 View Post
weeeeeee CONOR!!! (((
Huh?
__________________
fysiks 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 16:15.


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