AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   set_user_maxspeed bug? (https://forums.alliedmods.net/showthread.php?t=95000)

LaineN 06-18-2009 07:52

set_user_maxspeed bug?
 
When I set a players maxspeed to something under around 70, the player's maxspeed sets to a value that's much lower.

For example:
If I set a player's maxspeed to 50 with this code:
Code:
set_user_maxspeed(id, 50.0);

Then the player don't gets 50 maxspeed, he gets 2.5 :|

Is this a known bug or is there only me who got it?
Anyway to solve it?

One 06-18-2009 08:08

Re: set_user_maxspeed bug?
 
try with set_pev


like :

set_pev(id, pev_maxspeed, 50.0);

LaineN 06-18-2009 08:21

Re: set_user_maxspeed bug?
 
Quote:

Originally Posted by One (Post 851526)
try with set_pev


like :

set_pev(id, pev_maxspeed, 50.0);

Same as before.

Same with this too:
Code:
entity_set_float(id, EV_FL_maxspeed, 50.0);

Bugsy 06-18-2009 08:46

Re: set_user_maxspeed bug?
 
I just used both fm_set_user_maxspeed and set_user_maxspeed with a value of 50.0 and then checked the value and both did come back at 50.0. Where are you getting this 2.5 number from?

LaineN 06-18-2009 08:50

Re: set_user_maxspeed bug?
 
Quote:

Originally Posted by Bugsy (Post 851545)
I just used both fm_set_user_maxspeed and set_user_maxspeed with a value of 50.0 and then checked the value and both did come back at 50.0.

It works for you?

Quote:

Originally Posted by Bugsy (Post 851545)
Where are you getting this 2.5 number from?

I used a speedometer and I could just move with 2.5 units/sec.

Bugsy 06-18-2009 08:57

Re: set_user_maxspeed bug?
 
The speed does seem very slow but take into consideration the default maxspeed when holding knife which is 300.0 [other weapons are bit lower). Setting it at 50.0 is 1/6 of that speed so it feels like you are crawling. Is your units\sec calculation consistent at default maxspeed for knife? ie 300.0 units/sec

tpt 06-18-2009 09:11

Re: set_user_maxspeed bug?
 
Quote:

Originally Posted by Bugsy (Post 851549)
The speed does seem very slow but take into consideration the default maxspeed when holding knife which is 300.0 [other weapons are bit lower). Setting it at 50.0 is 1/6 of that speed so it feels like you are crawling. Is your units\sec calculation consistent at default maxspeed for knife? ie 300.0 units/sec

300.0? Isnt it 250.0?

LaineN 06-18-2009 09:19

Re: set_user_maxspeed bug?
 
Quote:

Originally Posted by Bugsy (Post 851549)
The speed does seem very slow but take into consideration the default maxspeed when holding knife which is 300.0 [other weapons are bit lower). Setting it at 50.0 is 1/6 of that speed so it feels like you are crawling.

Knifes maxspeed are 250.

Use a speedometer you see what speed you are moving in.

Quote:

Originally Posted by Bugsy (Post 851549)
Is your units\sec calculation consistent at default maxspeed for knife? ie 300.0 units/sec

What do you mean?

alan_el_more 06-18-2009 09:21

Re: set_user_maxspeed bug?
 
Show us more code, can the problem is not with set_user_maxspeed

LaineN 06-18-2009 09:24

Re: set_user_maxspeed bug?
 
I just made a simple plugin that set the maxspeed to 50.0 when you type /speed. It has nothing to do with thee code...


All times are GMT -4. The time now is 15:32.

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