Distanse
How can i get distanse between players? E.g. i want all players in range 250 of me to write in chat Hello. i'm close to you. How can i getall players in a certain distanse from me?
|
Re: Distanse
|
Re: Distanse
Thanks a lot. Any example of using it to find players? And do smth with them after we find them? Please
|
Re: Distanse
Find first players origins, and second one. Create a straight line betwen them and calculate the length of that line. There you go, distance.
|
Re: Distanse
Why do i have to create a straight line? I just want to find all players in lets say 250.0 radius and make some function on them e.g. wadress a message to them
|
Re: Distanse
To find the distance betwen one player. You'll have later on loop throw other ones and make a check if they are in range.
This is just my idea of how it can be done, there'r of course other ways. |
Re: Distanse
Code:
|
Re: Distanse
Can i use instead of iEntity players id, because i have to calculate distance between players.?
|
Re: Distanse
Yes, that's what you have to do (reason for my comment above it)
|
Re: Distanse
Thanks but it does not work. It writes me this : "Hello muthahacka lol!" but not people around me.
Here is my code Code:
|
| All times are GMT -4. The time now is 21:41. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.