Raised This Month: $ Target: $400
 0% 

Code doenst work


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-16-2013 , 18:08   Re: Code doenst work
Reply With Quote #7

Something like this ?

PHP Code:
ZombieAttack( const iZombie )
{
    new 
Float:flFractionFloat:vStart], Float:vEnd], Float:vForward], iTr create_tr2( );
    new 
Float:vEndPos], pHit;
    
    
entity_get_vectoriZombieEV_VEC_originvStart );
    
    
entity_get_vectoriZombieEV_VEC_anglesvForward );
    
engfuncEngFunc_MakeVectorsvForward );
    
// get_tr2( iTr, TR_flFraction, flFraction ); // there is no trace yet
    
    
vStart] += 28.0;
    
vEnd]    = vStart] + vForward] * 32.0;
    
vEnd]    = vStart] + vForward] * 32.0;
    
vEnd]    = vStart];
    
    
// engfunc( EngFunc_TraceLine, vStart, vEnd, DONT_IGNORE_MONSTERS, iZombie, iTr );
    // get_tr2( iTr, TR_flFraction, flFraction );
    
pHit trace_line(iZombien vStartvEndvEndPos);
    if( !
pHit )
    {
        
engfuncEngFunc_TraceHullvStartvEndDONT_IGNORE_MONSTERSHULL_HEADiZombieiTr );
        
get_tr2iTrTR_flFractionflFraction );
        if( 
flFraction 1.0 )
        {
            
pHit get_tr2iTrTR_pHit );
            
get_tr2iTrTR_vecEndPosvEndPos );
        }
        else
        {
            
pHit FM_NULLENT;
        }
    }

    if( !
IsPlayer(pHit) )
    {
        
client_print0print_chat"[ Zombie: %i ] Missed. %s"iZombiepHit == FM_NULLENT "FindHullIntersection!" "" );  
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 06:21.


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