npc just says incoming connection - 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 just says incoming connection (
/showthread.php?tid=556143)
npc just says incoming connection -
dan40o - 09.01.2015
i've tested on a blank gamemode same thing. What i am missing?
Re: npc just says incoming connection -
CalvinC - 09.01.2015
Try to check your server.cfg file, the max_npc is set to 0 by default.
Raise it to have NPC's.
Re: npc just says incoming connection -
dan40o - 09.01.2015
it's set to 1. I have 1 NPC.
Re: npc just says incoming connection -
dan40o - 10.01.2015
BUMP
Re: npc just says incoming connection -
ATGOggy - 10.01.2015
Is it working then?
Re: npc just says incoming connection -
dan40o - 10.01.2015
It doesn't spawn. I don't know why.....
Re: npc just says incoming connection -
Garavel - 10.01.2015
Try putting the following code right under "OnPlayerConnect"
Code:
if(IsPlayerNPC(playerid))
{
SpawnPlayer(playerid);
return 1;
}
Re: npc just says incoming connection -
dan40o - 10.01.2015
Still doesn't work......
Re: npc just says incoming connection -
dan40o - 11.01.2015
BUMP
Re: npc just says incoming connection -
liquor - 11.01.2015
It shouldn't spawn under OnPlayerConnect, i think. Try putting the SpawnPlayer function under OnPlayerRequestClass instead.
Also, if you have a user system requiring registration and/or passwords the NPC isn't automatically exempt from that, so you'd have to make NPC's bypass this in the script.