NPC's Problem - 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: NPC's Problem (
/showthread.php?tid=205990)
NPC's Problem -
copper - 02.01.2011
I did 3 NPC buses in my server but when i join they leave the server. Any one knows why ? Thanks
Re: NPC's Problem -
Abraham2nds - 02.01.2011
make sure u have
pawn Код:
if(IsPlayerNPC(playerid)) return 1;
under Ongamemodeinit.....onplayerspawn and on playerrecquestclass if u got it
Re: NPC's Problem -
copper - 02.01.2011
After some time (few seconds), they quit.
Re: NPC's Problem -
Abraham2nds - 02.01.2011
yup the code i gave u should do it
i hate this-->This forum requires that you wait 60 seconds between posts. Please try again in 25 seconds.
Re: NPC's Problem -
Abraham2nds - 02.01.2011
ok let me put it in a great way for u to understand:
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 ******.
Re: NPC's Problem -
copper - 03.01.2011
I did that but they still leave. I dont know why.
Re: NPC's Problem -
HyperZ - 03.01.2011
make sure u have 'maxnpc 2' + maxnpc's in ur server.cfg.
Re: NPC's Problem -
Toreno - 03.01.2011
Show us your script, server.cfg, something that might help us to HELP you.