Raised This Month: $51 Target: $400
 12% 

Problem with maxspeed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
T3STIK
Junior Member
Join Date: Oct 2012
Location: Czech Republic
Old 05-24-2015 , 15:30   Problem with maxspeed
Reply With Quote #1

Hi,
I made a plugin, where players can upgrade their abilities like speed, gravity, health, armor, ...
Everything works fine except speed (maxspeed).

In server.cfg is set sv_maxspeed to 250.
It is also default speed of all players, when they connect and during the game they
can upgrade it to 300, 350 and 400 by set_user_maxspeed.

The problem is, that it works randomly.
After few tests I discovered, that it is not working only on the first map
after restart or crash of the server. After this everyone has maxspeed 250,
even if they upgrade this ability.

Can anybody help me to solve it?
I would be grateful.


Last edited by T3STIK; 05-24-2015 at 16:20. Reason: example: image
T3STIK is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 05-25-2015 , 05:55   Re: Problem with maxspeed
Reply With Quote #2

sv_maxspeed is a global cvar. If you really want to be able to make it configurable per player you would need to play with SVC_NEWMOVEVARS engine message, but I don't see a good reason for doing so.
Using set_user_maxspeed should be enough. I also remember a bug on furien servers, when furiens could not run faster because sv_maxspeed cvar was limiting it. So, if it doesn't work properly with set_user_maxspeed then you should consider increasing sv_maxspeed.
__________________

Last edited by HamletEagle; 05-25-2015 at 05:56.
HamletEagle is offline
T3STIK
Junior Member
Join Date: Oct 2012
Location: Czech Republic
Old 05-27-2015 , 14:05   Re: Problem with maxspeed
Reply With Quote #3

I thought, that I would use this way (increase sv_maxspeed). So why not, it works...
Thanks a lot.
T3STIK is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-28-2015 , 01:51   Re: Problem with maxspeed
Reply With Quote #4

Afaik there are also client variables (cl_forwardspeed?) which need to be modified in order to run faster.
__________________
Kia is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-29-2015 , 04:52   Re: Problem with maxspeed
Reply With Quote #5

Yes, client has the final words (cl_forwardspeed, cl_backspeed, cl_sidespeed), no matter what are the values of sv_maxspeed and pev->maxspeed.
__________________

Last edited by Arkshine; 05-29-2015 at 04:55.
Arkshine 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 04:52.


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