Raised This Month: $ Target: $400
 0% 

distance between players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 08-09-2022 , 00:12   distance between players
Reply With Quote #1

Hello, I wanted to know if there is a way to obtain the distance between players, I am doing it this way, but since it is done repeatedly, it does not seem very light to me to call the engine twice each time it is executed, is there another way?

PHP Code:
   static Float:OriginPlayer1[3], Float:OriginPlayer2[3], Float:Distance;

   
entity_get_vectorPlayer1 EV_VEC_originOriginPlayer1 );
   
entity_get_vectorPlayer2EV_VEC_originOriginPlayer2 ); 

   
Distance get_distance_fOriginPlayer1OriginPlayer2 ); 
Solved!( i Think this is better )

PHP Code:
native Float:entity_range(idaidb); 

Last edited by MrPickles; 08-09-2022 at 00:34.
MrPickles 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 11:05.


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