SA-MP Forums Archive
[HELP] NPCs Connects Then Leave's - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] NPCs Connects Then Leave's (/showthread.php?tid=143569)



[HELP] NPCs Connects Then Leave's - andershh - 23.04.2010

My NPC's connects to the server but they leave.

How can i fix it?

Quote:

[16:49:05] [npc:join] Grove2 has joined the server (0:127.0.0.1)
[16:49:05] [npcart] Grove2 has left the server (0:2)
[16:49:05] Incoming connection: 127.0.0.1:54210
[16:49:05] [npc:join] Grove3 has joined the server (1:127.0.0.1)
[16:49:05] [npcart] Grove3 has left the server (1:2)
[16:49:05] Incoming connection: 127.0.0.1:54208
[16:49:05] [npc:join] Grove1 has joined the server (2:127.0.0.1)
[16:49:05] [npcart] Grove1 has left the server (2:2)
[16:49:05] Incoming connection: 127.0.0.1:54211
[16:49:05] [npc:join] Grove4 has joined the server (3:127.0.0.1)
[16:49:05] [npcart] Grove4 has left the server (3:2)
[16:49:05] Incoming connection: 127.0.0.1:54212
[16:49:05] [npc:join] Grove5 has joined the server (4:127.0.0.1)
[16:49:05] [npcart] Grove5 has left the server (4:2)




Re: [HELP] NPCs Connects Then Leave's - dcmd_crash - 23.04.2010

Have you set maxnpc in server.cfg, to the amount of NPC's you have?


Re: [HELP] NPCs Connects Then Leave's - andershh - 23.04.2010

Quote:

maxnpc 25

YeaH


Re: [HELP] NPCs Connects Then Leave's - andershh - 23.04.2010

But it still not working..


Re: [HELP] NPCs Connects Then Leave's - dcmd_crash - 23.04.2010

Hmm, I had this problem too once.. I forgot how I fixed it..


Re: [HELP] NPCs Connects Then Leave's - andershh - 23.04.2010

Damn !


Re: [HELP] NPCs Connects Then Leave's - Mujib - 23.04.2010

Quote:
Originally Posted by kc
Common problems

My NPC leaves my server after it joins
Your script is forcing the NPC to login, or you have an anti-cheat / ping kicker that is interfering with your NPC. You can add...
pawn Код:
if(IsPlayerNPC(playerid)) return 1;
... as the first line of any callbacks that bots will use, e.g. OnPlayerRequestClass or OnPlayerRequestSpawn. For an efficient, simple way of excluding NPCs from loops, check out foreach by ******.

My NPC doesn't join my server at all
This is most likely caused by your server being passworded.

I can't get the npc_record filterscript to load
You either don't have the filterscript, or it is already loaded. Try continuing anyway.

My NPC just stands at the spawnpoint
Go back, and re-do the OnPlayerSpawn part of the tutorial.

My NPCs used to connect, but now I have upgraded to >= RC5 they don't.
There is a new maxnpc server.cfg variable that defaults to 0. add...
Код:
maxnpc number_goes_here
...to your server.cfg to fix this issue.



Re: [HELP] NPCs Connects Then Leave's - andershh - 23.04.2010

i already tried that...


Re: [HELP] NPCs Connects Then Leave's - Adil - 23.04.2010

Make sure you have recording name in the 'NPC MiniScript', same to the recording in the recordings folder. Make sure that the server doesn't requires a login, or else it will get kicked after spawning without entering the password, add this in the top of some callbacks which you think are holding back your NOC:
pawn Код:
if(IsPlayerNPC(playerid)) return 1;



Re: [HELP] NPCs Connects Then Leave's - andershh - 23.04.2010

Where can i find the NPC miniscript?