How to detect if a player is in range of another player?
#1

Hello. I've tried looping through all players, detecting if I'm in-range of anyone. But upon doing that, it gives EVERYONE a fish. I'm currently creating a "give" option via dialog, and want it to give the nearest-player a fish.

How do I detect if a player is near another player? Is there a function out there somewhere similar to this:

pawn Код:
IsPlayerInRangeOfPlayer(playerid, Float:distance, player2)
Thanks for any help.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)