Quote:
Originally Posted by dark_style
|
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
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
__________________