Function - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Function (
/showthread.php?tid=534977)
Function -
MasonSFW - 01.09.2014
How i can make or give me IsPlayerNearNpc
Or give me sample i need stock IsPlayerNearNpc(playeri, npcid)
Like that ...
Re: Function -
Stinged - 01.09.2014
Do you use any npc plugin?
Re: Function -
MasonSFW - 01.09.2014
Yes i using FCNPC plugin
Re: Function -
Stinged - 01.09.2014
pawn Код:
stock IsPlayerNearNPC(playerid, npcid)
{
new Float:x, Float:y, Float:z;
FCNPC_GetPosition(npcid, x, y, z);
return IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z); // Change 5.0 to the range you want.
}
Should work, not tested.
Re: Function -
MasonSFW - 01.09.2014
Thank i will test rep+