17.09.2010, 02:21
IsPlayerNearPlayer(playerid, targetid, Float:Range)
Purpose:This is used to see if a player is near another player.
Usage:
pawn Код:
if(IsPlayerNearPlayer(playerid, targetid, 5.0)) //Checks if the player is near the target, with a range of 5.0
pawn Код:
stock IsPlayerNearPlayer(playerid, targetid, Float:Range)
{
new
Float:X,
Float:Y,
Float:Z
;
GetPlayerPos(targetid, X, Y, Z);
if(IsPlayerInRangeOfPoint(playerid, Range, X, Y, Z)) return 1;
return 0;
}