CSGO: Calculate a distance from one player/entity to another

All other Source.Python topics and issues.
User avatar
khaimovmr
Member
Posts: 52
Joined: Fri Aug 25, 2017 3:15 am
Contact:

CSGO: Calculate a distance from one player/entity to another

Postby khaimovmr » Mon Mar 25, 2019 3:43 am

Hy guys!
Does someone knows - is there a way in the source-python of calculating the distance from one player/entity to another?
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: CSGO: Calculate a distance from one player/entity to another

Postby L'In20Cible » Mon Mar 25, 2019 3:56 am

khaimovmr wrote:Hy guys!
Does someone knows - is there a way in the source-python of calculating the distance from one player/entity to another?

Syntax: Select all

distance = player.origin.get_distance(entity.origin)
User avatar
khaimovmr
Member
Posts: 52
Joined: Fri Aug 25, 2017 3:15 am
Contact:

Re: CSGO: Calculate a distance from one player/entity to another

Postby khaimovmr » Mon Mar 25, 2019 9:15 pm

L'In20Cible wrote:
khaimovmr wrote:Hy guys!
Does someone knows - is there a way in the source-python of calculating the distance from one player/entity to another?

Syntax: Select all

distance = player.origin.get_distance(entity.origin)

Man, thanks a lot!

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 19 guests