How to detect if someone is near a spawned object in game?
#2

maybe change this one into IsObjectInRangeOfPlayer...just put a IsPlayerInRangeOfPoint in there somewhere

Код:
stock IsObjectInRangeOfPoint(objectid, Float:range, Float:x, Float:y, Float:z)
{
new
Float:px,
Float:py,
Float:pz;
GetObjectPos(objectid, px, py, pz);
px -= x;
py -= y;
pz -= z;
return ((px * px) + (py * py) + (pz * pz)) < (range * range);
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)