sv_maxspeed and set_user_maxspeed
Hi, I'm trying to make a plugin that changes the spy's disguised class speed to whichever class's disguise they take on. All works fine, except if I raise sv_maxspeed to 400, everyone in the server's maxspeed raises. But I want it to only effect that one player. It seems that set_user_maxspeed seems to obey the sv_maxspeed cvar. Is there any way I can set the maxspeed for one player higher than sv_maxspeed so it doesn't effect other players? BTW: The default server maxspeed is set to 320, but when I did get_user_maxspeed on a scout, it reported 400. In the game programming it seems to override the default 320.
EDIT: I checked http://forums.alliedmods.net/showthr...axspeed&page=2 and I'm still wondering if setting a cl_blahblah would be considered slowhacking. I want to stay away from that. |
Re: sv_maxspeed and set_user_maxspeed
You can get client cvar like this :
Code:
I guess you shoud do it with only 1 cvar_result function but i don't want to search how to do it ;) So you can now store client's values, and set them back when you want. I think that you can't set client_maxspeed (set_user_maxspeed) higher than sv_maxspeed but i may be wrong.Please give feed back about this. |
Re: sv_maxspeed and set_user_maxspeed
That looks great! Is that considered slowhacking though?
EDIT: It still needs sv_maxspeed up for it to work (or so it seems). I'm stumped! +Karma for the help though! EDIT AGAIN: I just noticed that if I changed sv_maxspeed to 1000 WITHOUT my plugin running, no one goes any faster. In my plugin, I used "id" for the player index. Could it be that it doesn't know who's ID it really is? (I never did any get index thing) |
Re: sv_maxspeed and set_user_maxspeed
This will set the spys speed to the class they disguised as and reset their speed to normal when they undisguise. I think this is what you are trying to do? If so, none of that other code is needed. Also, the maxspeed doesn't need to be changed for this to work. 400 is default maxspeed in TFC.
Note: Maxspeed in TFC can go up to 2000. I saw the other thread said maxspeed is 1000, not sure if that's only CS or what. PHP Code:
|
Re: sv_maxspeed and set_user_maxspeed
Yeah I have that code already, except I didn't use engfunc
now i cant release this plugin :( |
Re: sv_maxspeed and set_user_maxspeed
In counter-strike, user maxspeed is set each time a player change weapons, make sure that it's not the same in TFC.
And in cs, CurrentWeapon is called when a player change weapon but also when the player is shooting. I have already made the code to filtering that so if you need it just ask. |
Re: sv_maxspeed and set_user_maxspeed
Quote:
Quote:
|
Re: sv_maxspeed and set_user_maxspeed
I have almost exactly what you had, I used engfunc as an alternative to set_user_maxspeed as a test. I could change it back but I don't want anything thinking I stole your code. Thanks for all the help guys!
PS: I give up on this maxspeed deal. Most servers are set to 320, scouts still go 400, and changing sv_maxspeed makes everyone go crazy, for some weeeeeiiiirrrrddd reason... |
Re: sv_maxspeed and set_user_maxspeed
I don't understand why everyone goes crazy. That's not happening in my server.
|
Re: sv_maxspeed and set_user_maxspeed
I have bots on my server, and when I disguise their speeds change (when they respawn). The scout doesn't get any additional speed unless sv_maxspeed is 400, and the plugin affects players too (id confusion?) I'll post my code:
Code:
#include <amxmodx> |
| All times are GMT -4. The time now is 16:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.