IsNpcInRangeOfPoint?
#1

How do I check if NPC is in range of point? I tried IsPlayerInRangeOfPoint but it seems that this function only works for real players. I'm using FCNPC plugin
Reply
#2

Код:
IsNPCInRangeOfPoint(npcid, Float: range, Float: x, Float: y, Float: z)
{
	new pos[3];
	GetNPCPos(npcid, pos[0], pos[1], pos[2]); // change this function name accordingly or just use GetPlayerPos
	return (VectorSize(x, y, z, pos[0], pos[1], pos[2]) <= range);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)