Raised This Month: $ Target: $400
 0% 

Enemy distance in M


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
wickedd
Veteran Member
Join Date: Nov 2009
Old 05-23-2016 , 23:18   Re: Enemy distance in M
Reply With Quote #2

Quote:
Originally Posted by EFFx View Post
I looked more wdo I thought were definitive codes for X distance, and I want to sample the distance from the closer, and I did not find it.
I'm not sure what you're trying to say but here's one way to get the distance. Of course it's not the complete code because I'm not sure what you want.

PHP Code:
public whatever()
{
    
    new 
Float:kOrigin], Float:vOrigin];
     
    
pevyour_indexpev_originkOrigin )
    
pevenemy_indexpev_originvOrigin )
    
    new 
Float:iDist get_distance_fkOriginvOrigin )   
    new 
Float:iMeters iDist 0.0254  // This will convert it to meters.
    
    //Add your hud here

__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 05-23-2016 at 23:23.
wickedd 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 18:42.


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