Raised This Month: $ Target: $400
 0% 

increased speed decreasing when picking weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CarbonDioxide
Member
Join Date: Apr 2012
Old 06-13-2012 , 12:06   increased speed decreasing when picking weapons
Reply With Quote #1

Hi all.
I have this with which sets a players maxspeed with success:
PHP Code:
set_user_maxspeed(id450.0
My problem is that when I pick a weapon up the player's speed resets back to 250.
I have tried making a code to prevent that from happening, but I don't know how to trigger that so it executes whne the player picks a weapon up.

The code:
PHP Code:
public asp_bug_fix(id)
{
    if(
SpeedEnabled[id])
    {
        
set_user_maxspeed(id450.0)
    }

Does anyone know how to trigger it with hamsandwich ?? Thank you in advance

Last edited by CarbonDioxide; 06-13-2012 at 12:07.
CarbonDioxide is offline
Alekkkk
Member
Join Date: Mar 2012
Location: Bulgaria
Old 06-13-2012 , 12:10   Re: increased speed decreasing when picking weapons
Reply With Quote #2

Do it in event current weapon..
__________________
Alekkkk is offline
Send a message via Skype™ to Alekkkk
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-13-2012 , 12:11   Re: increased speed decreasing when picking weapons
Reply With Quote #3

It's better to use Ham_Item_PreFrame.
__________________

Last edited by <VeCo>; 06-13-2012 at 12:11.
<VeCo> is offline
CarbonDioxide
Member
Join Date: Apr 2012
Old 06-13-2012 , 12:21   Re: increased speed decreasing when picking weapons
Reply With Quote #4

Ham_Item_PreFrame worked ! Ty alot
CarbonDioxide is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 06-13-2012 , 12:24   Re: increased speed decreasing when picking weapons
Reply With Quote #5

a client's maxspeed changes for every weapon. Because every weapon has a different weight, and thus the engine wants to reflect that in the entity's motion. Do as stated above and set it at every CurWeapon, or Ham_Item_PreFrame. Whichever's clever.
This was stated in the set_user_maxspeed's documentation on the wiki, if you read it.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz 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 06:17.


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