Raised This Month: $ Target: $400
 0% 

Sometimes it throws sometimes not!!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
HENNESSY
Member
Join Date: Sep 2013
Location: Russian Federation, Bela
Old 10-11-2014 , 20:15   Sometimes it throws sometimes not!!
Reply With Quote #1

I'm using the throw knife entity code from throwing knives plugin.

the problem is when i type /throw, sometimes it throw's a knife and sometimes no.

Why is that?

This is the code:

PHP Code:
public ThrowKnifeiIndex )
{
    static 
Float:flOrigin], Float:flVelocity], Float:flAngles], iEnt;
    
    
entity_get_vectoriIndexEV_VEC_originflOrigin );
    
entity_get_vectoriIndexEV_VEC_v_angleflAngles );
    
    
iEnt create_entity"info_target" );
    
    if( !
is_valid_entiEnt ) )
    {
        return;
    }
        
    
entity_set_stringiEntEV_SZ_classnameKNIFE_ENT );
    
entity_set_modeliEntKNIFE_MODEL );
        
    
entity_set_sizeiEntFloat:{ -1.0, -7.0, -1.0 }, Float:{ 1.07.01.0 } );
    
entity_set_originiEntflOrigin );
    
    
flAngles] -= 90.0;
    
entity_set_vectoriEntEV_VEC_anglesflAngles );
    
    
entity_set_intiEntEV_INT_effects32 );
    
entity_set_intiEntEV_INT_solidSOLID_TRIGGER );
    
entity_set_intiEntEV_INT_movetypeMOVETYPE_TOSS );
    
    
entity_set_edictiEntEV_ENT_owneriIndex );
    
    
set_renderingiEntkRenderFxGlowShell02500kRenderNormal25 );
    
    
VelocityByAimiIndexKNIFE_SPEEDflVelocity );
    
entity_set_vectoriEntEV_VEC_velocityflVelocity );

In the touch forward i just removed the entity with remove_entity( iEntity );

Thanks for help!
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