SA-MP Forums Archive
Making NPCs appear and disappear - 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: Making NPCs appear and disappear (/showthread.php?tid=463400)



Making NPCs appear and disappear - Twizted - 11.09.2013

I'm making a myth busting gamemode just for the fun and due to me being extremely bored lately. I wanted to know If it's possible to make the NPCs appear and disappear script wise, after they've completed their route (which was recorded, of course).


Re: Making NPCs appear and disappear - Tamer - 11.09.2013

I never worked with NPC's but probably this is the function:

https://sampwiki.blast.hk/wiki/NPC:StopRecordingPlayback

Stopping should remove the NPC, pausing should "pause" it, so they will appear, but will not move, so when you use Resume again, it will continue from the place it was left.

And here is a full list of the NPC - related functions:

https://sampwiki.blast.hk/wiki/NPC:Main_Page


Re: Making NPCs appear and disappear - iZN - 11.09.2013

You could destroy them and re-connect them afterwards.
OR You can change the virtual world of NPC bot so that it'll get disappear and appear them in the default world SetRNPCVirtualWorld(npcid, worldid) This native is from ARNPC