Raised This Month: $ Target: $400
 0% 

Weapon's max speed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-24-2012 , 12:40   Re: Weapon's max speed
Reply With Quote #3

Quote:
Originally Posted by dark_style View Post
https://forums.alliedmods.net/showthread.php?t=94331

Sorry if I missunderstood what you are trying to do.
You did. But its ok, i forgive you.

But it did give me insparation to look back and i think i found this....

#define m_flWeaponSpeed 58 // used for guns to restore after shield
Not sure if ti will work or not....I'll test and report back.


Quote:
Originally Posted by NiHiLaNTh View Post
I think you should use hamsandwich for this

Code:
...
RegisterHam( Ham_CS_Item_GetMaxSpeed, "weapon_xm1014",   "fw_XM1014GetMaxSpeed", .Post = 0 );
...

public fw_XM1014GetMaxSpeed( pWeapon )
{
     SetHamReturnFloat( 115.0 );
     return HAM_SUPERCEDE;
}
OH! If my above findings do not work i'll start dabbeling in that. Many thanks to you both.


UPDATE: it seems that all of these are just giving 0.00000 back.
This is my current code (using the ham function)
Code:
// slow victim's speed
		new Float:pdataSpeed
		
		ExecuteHam(Ham_CS_Item_GetMaxSpeed, attackerID, pdataSpeed)
		
		new Float:speed = floatclamp(get_user_maxspeed(victimID) - 55.0, 1.0, 175.0)
		client_print(victimID, print_chat, "Speed pData = %f Speed = %f Original speed = %f", pdataSpeed, speed, get_user_maxspeed(victimID) )
		set_user_maxspeed(victimID, speed)
Then i have a task to reset it using pdataSpeed -which will be called however necessary in that task.

I've also tried
Code:
new Float:pdataSpeed = get_pdata(victimID, m_flWeaponSpeed, linux)
Also returns 0.0000
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 08-24-2012 at 13:16.
Liverwiz is offline
 



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 05:45.


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