SA-MP Forums Archive
NPC Help [REP +1] - 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 Help [REP +1] (/showthread.php?tid=302390)



NPC Help [REP +1] - Thresholdold - 08.12.2011

Hey,

I have been trying to add 2 NPCs to my server, they are just walking ones that casually walk around... I have done all the scripts like in kc's tutorial, but when I start my server, the NPCs don't join... I checked the logs and the NPCs never even connected. Can someone please help me with this?


Re: NPC Help [REP +1] - Thresholdold - 08.12.2011

Um... help please? I really need this done, I've been up all night trying to do it... it is now 6:03am...


Respuesta: NPC Help [REP +1] - OPremium - 08.12.2011

Did you change/add "maxnpc" in your server.cfg file?

Quote:

maxnpc 2




Re: NPC Help [REP +1] - Thresholdold - 08.12.2011

Yes...


Re: NPC Help [REP +1] - grand.Theft.Otto - 08.12.2011

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 Code:

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...
Code:

maxnpc number_goes_here

...to your server.cfg to fix this issue.
Double check those.


Re: NPC Help [REP +1] - Thresholdold - 09.12.2011

I have double checked this multiple times and I have had no errors... if I posted my script, could someone take a look at it?


Re: NPC Help [REP +1] - grand.Theft.Otto - 09.12.2011

Do you have samp-npc v0.3d ?


Re: NPC Help [REP +1] - Thresholdold - 09.12.2011

Yes I do :S


Re: NPC Help [REP +1] - wildcookie007 - 09.12.2011

If the npc joins and leaves, check grand theft's post, if the NPC never joins - there is something wrong with your code.


Re: NPC Help [REP +1] - §с†¶e®РµРe - 09.12.2011

Have u loaded the fs and check tghere is the .rec in ur npcmodes folder not scriptfiles