Raised This Month: $ Target: $400
 0% 

[HELP-ME] At the back function


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
lovenina12
Junior Member
Join Date: Jun 2012
Location: Brasil
Old 12-12-2014 , 18:25   [HELP-ME] At the back function
Reply With Quote #1

Hi guys,

I need a help with this function:

PHP Code:
stock bool:at_back(iAttackeriVictim)
{
    new 
bool:backstab=false
    
new Floatvec2LOS[2];
    new 
FloatvecForward[3];
    new 
FloatvecForward2D[2];
    
    
velocity_by_aimiAttacker1vecForward );
    
    
xs_vec_make2dvecForwardvec2LOS );
    
xs_vec_normalizevec2LOSvec2LOS );
    
    
peviVictimpev_anglesvecForward );
    
engfuncEngFunc_MakeVectorsvecForward );
    
global_getglb_v_forwardvecForward );
        
    
xs_vec_make2dvecForwardvecForward2D );
    if( 
xs_vec_dotvec2LOSvecForward2D ) > 0.1 )
    {
        
backstab true
    
}
    return 
backstab

I want to use this function without a target (iVictim), and transform the target to a player that is 100.0 distance and in the vision range of the iAttacker!

Sry bad english.

If you don't understood reply!

Last edited by lovenina12; 12-12-2014 at 18:26. Reason: Important detail!
lovenina12 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 15:27.


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