SA-MP Forums Archive
How? - 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? (/showthread.php?tid=378960)



How? - Fernado - 20.09.2012

how can i connect a npc to the server through filterscript (without adding the functions in gamemode)?
EDIT: driving npc


Re: How? - Blasphemy - 20.09.2012

Unless you have a filterscript loading the NPC script, the functions are needed in the gamemode to both load/run and communicate with the NPC script.


Re: How? - clarencecuzz - 20.09.2012

If your gamemode involves registering and logging in to be able to spawn etc., then I suggest you add the following line to your login system:
pawn Код:
if(!IsPlayerNPC(playerid))
That way, NPCs will be able to bypass the login.
I've never tried before, but I'm sure you can connect NPCs by using the function ConnectNPC

https://sampwiki.blast.hk/wiki/ConnectNPC