View Single Post
instinctpt1
Senior Member
Join Date: Dec 2016
Location: Chandigarh, India
Old 05-11-2018 , 14:20   Re: Knife It UP v3.0.4
Reply With Quote #17

@Natsheh i see why u said to use hamItemMaxSpeed as its accurate and fast but due to its accuracy it makes player stop if player choose other weapon while having speed

I did this :
PHP Code:
 RegisterHam(Ham_CS_Item_GetMaxSpeed"weapon_knife""handleKnifeSpeed"0); 

// Func : 
public handleKnifeSpeed() {
    new 
id read_data(1);
    if(
get_pcvar_float(csi_kkb_speed) > 250.0 && g_bHasSpeed[id])
        
set_user_maxspeed(idget_pcvar_float(csi_kkb_speed));

So to fulfill my purpose i guess curweapon is good then :/ ?
( As i want player to have speed regardless of weapon in hand until speedTime goes off )

Last edited by instinctpt1; 05-11-2018 at 14:20. Reason: 1
instinctpt1 is offline