How to create a npc? - 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: How to create a npc? (
/showthread.php?tid=304474)
How to create a npc? -
edouardu44 - 18.12.2011
How to create a npc? An NPC or player, where you can choose the skin. An NPC that does not move. A static NPC with coordinates.
Thx
Re: How to create a npc? -
Thresholdold - 18.12.2011
https://sampforum.blast.hk/showthread.php?tid=95034
You need to follow this guide. To setskin, just use SetPlayerSkin(playerid, skinid) under OnNPCSpawn.
EDIT: If you want a static NPC, just simply go into a server (preferably your own) and go to the spot where you want the NPC to stand. Then make sure you have the FS loaded and type /ofrecord and without moving at all, type /stoprecord. Before you create it, make sure you type /interior (If you are inside) and remember that number. Then go back to your OnNPCSpawn and add SetPlayerInterior(playerid, *NumberHere*)