03.09.2016, 08:31
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
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); }