NPCs join and leave
#1

hi all my NPCs are joining then leaveing how do i fix this
Reply
#2

pawn Код:
public OnPlayerConnect(playerid)
{
    if (IsPlayerNPC(playerid))
    {
    return 1;
    }
}
Reply
#3

Check why your bots are leaving (param reason):

https://sampwiki.blast.hk/wiki/OnPlayerDisconnect.

If reason is 0 check your script, and find a mistake.
Reply
#4

Check the reason of leave (from server_log.txt), if it's 2 (kick) so the post above should fix the problem.
NPCs are almost exactly like regular players. OnPlayerConnect and the rest of the public functions affects them.
Reply
#5

Read the troubleshooting tips at the bottom of the tutorial:

https://sampforum.blast.hk/showthread.php?tid=95034
Reply
#6

Quote:
Originally Posted by Amit_B
Посмотреть сообщение
Check the reason of leave (from server_log.txt), if it's 2 (kick) so the post above should fix the problem.
NPCs are almost exactly like regular players. OnPlayerConnect and the rest of the public functions affects them.
[17:12:38] [npcart] Dancer5 has left the server (25:0)
[17:12:39] [npcart] FBI_7 has left the server (33:0)
[17:12:39] [npcart] FBI_3 has left the server (35:0)
[17:12:39] [npcart] DrinkServer has left the server (38:0)
[17:12:40] [npcart] Dancer14 has left the server (29:0)
Reply
#7

Does every NPC part or just some of them?
Reply
#8

Quote:
Originally Posted by suhrab_mujeeb
Посмотреть сообщение
Does every NPC part or just some of them?
well just sum of then the ones that walk about leave and the ones that are in cars dnt leave
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)