SA-MP Forums Archive
NPC Join then Disconnect - 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 Join then Disconnect (/showthread.php?tid=443024)



NPC Join then Disconnect - jeffery30162 - 10.06.2013

Ive Added An npc system and When I start my server the npc joins then Leaves(part)


please help me


Re: NPC Join then Disconnect - Threshold - 10.06.2013

Make sure you are allowing the NPC through your registration system etc.

Easy examples would be:
pawn Код:
public OnPlayerConnect(playerid)
{
    if(IsPlayerNPC(playerid)) return 1;
}

public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) return 1;
}
EDIT: @Hoborific And that too... xD


Re: NPC Join then Disconnect - Hoborific - 10.06.2013

also check in server.cfg you haven't defined MAXNPCS as 0.