Raised This Month: $ Target: $400
 0% 

Sometimes it throws sometimes not!!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HENNESSY
Member
Join Date: Sep 2013
Location: Russian Federation, Bela
Old 10-12-2014 , 07:33   Re: Sometimes it throws sometimes not!!
Reply With Quote #5

Quote:
Originally Posted by HamletEagle View Post
Again, give us the full code or a simple one that has the same problem.
Here you go

PHP Code:
public UpdateClientData_Postidsendweaponscd_handle )
{
    if ( !
is_user_alive(id) )
    return 
FMRES_IGNORED;
    
    if( 
get_user_weaponid ) != CSW_KNIFE )
        return 
FMRES_IGNORED;

    
set_cd(cd_handleCD_flNextAttackget_gametime( ) + 0.1 );
    
    return 
FMRES_HANDLED;
}

public 
fwd_CmdStart(iduc_handleseed)
{
    if(!
is_user_alive(id))
        return 
FMRES_IGNORED
        
    
if( get_user_weaponid ) != CSW_KNIFE )
        return 
FMRES_IGNORED;
    
    static 
iButton;
    
iButton get_ucuc_handleUC_Buttons );
    
    if( 
iButton IN_ATTACK )
    {
        
set_ucuc_handleUC_ButtonsiButton & ~IN_ATTACK );
        
        if( !
g_bRoundStarted )
            return 
FMRES_HANDLED;
        
        
ThrowKnifeid );
    }
    
    if( 
iButton IN_ATTACK2 )
    {
        
set_ucuc_handleUC_ButtonsiButton & ~IN_ATTACK2 );
    }
    
    return 
FMRES_HANDLED
}

public 
ThrowKnifeiIndex )
{
    new 
Float:flGametime;
    
flGametime get_gametime( );
    
    if( 
g_flDelayiIndex ] > flGametime KNIFE_DELAY )
        return;
        
    
g_flDelayiIndex ] = flGametime;
    
    new 
Float:flOrigin], Float:flVelocity], Float:flAngles], iEnt;
    
    
entity_get_vectoriIndexEV_VEC_originflOrigin );
    
entity_get_vectoriIndexEV_VEC_v_angleflAngles );
    
    
iEnt create_entity"info_target" );
    
    if( !
iEnt )
    {
        
log_amx"ERROR: Entity isn't valid(%d)!"iEnt );
        return;
    }
        
    
entity_set_stringiEntEV_SZ_classnameKNIFE_ENT );
    
entity_set_modeliEntKNIFE_MODEL );
        
    new 
Float:MinBox] = { -1.0, -7.0, -1.0 };
    new 
Float:MaxBox] = { 1.07.01.0 };
        
    
entity_set_sizeiEntMinBoxMaxBox );
    
    
flAngles] -= 90.0;
    
    
entity_set_originiEntflOrigin );
    
entity_set_vectoriEntEV_VEC_anglesflAngles );
    
    
entity_set_intiEntEV_INT_effects);
    
entity_set_intiEntEV_INT_solid);
    
entity_set_intiEntEV_INT_movetype);
    
    
entity_set_edictiEntEV_ENT_owneriIndex );
    
    
set_renderingiEntkRenderFxGlowShell02500kRenderNormal25 );
    
    
VelocityByAimiIndexKNIFE_SPEEDflVelocity );
    
entity_set_vectoriEntEV_VEC_velocityflVelocity );

HENNESSY 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 17:44.


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