I'm trying to figure out a way to detect coordinates.
Pretty much something that checks to see if a player is in a distance of xyz.
Could someone lend me a hand? Thanks in advance.
Printable View
I'm trying to figure out a way to detect coordinates.
Pretty much something that checks to see if a player is in a distance of xyz.
Could someone lend me a hand? Thanks in advance.
Look in the server at ZombieSpawn it detects if the is in range
EDIT:
Here it is:
ServerGameLogic.cpp Line ~1191:
pos is your positionQuote:
if((plr->GetPosition() - pos).LengthSq() < distSq)
plr->GetPosition() is obviously the player pos
and distSq is the max distance squared (x²)