SA-MP Forums Archive
NPC problem - 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: NPC problem (/showthread.php?tid=476432)



NPC problem - Saw® - 18.11.2013

Hi , I have a big problem when using RNPC include: (2weeks still didn't find the problem...)

-I just noticed we can't create RNPC & set its pos in the same time

pawn Код:
public ZombieBot(playerid) //This is the callback of the timer ZombieBot which called each 5 sec
{
new npc = CreateRNPC(str); // I create the NPC
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z); // Get the player's pos
SetRNPCPos(npc,x,y,z); // Teleport the NPC to the player's pos


return 1;
}
The problem is the pos of the npc isn't set... like if the CreateRNPC create the NPC & don't spawn it....

Thanks


Re: NPC problem - RayDcosta - 18.11.2013

i really dont think a lot of people here use that include.
consider asking the creator of the include.
and ur problem is explained in such a manner that it is very difficult to understand you.
maybe u should consider rephrasing the question?


Re: NPC problem - Saw® - 18.11.2013

Quote:
Originally Posted by RayDcosta
Посмотреть сообщение
i really dont think a lot of people here use that include.
consider asking the creator of the include.
and ur problem is explained in such a manner that it is very difficult to understand you.
maybe u should consider rephrasing the question?
When I test the code , the NPcs aren't set in my position , like if SetRNPCPos do nothing , I added some codes to test where they are the result is : x=0.0000 /y=0.0000 /z=0.0000 ...

The question is how to set the NPcs pos to the player...because the code don't set their pos


Re: NPC problem - TonyII - 18.11.2013

You should use SetPlayerPos(npcid,X,Y,Z); instead SetRNPCPos