NPC's fail to connect first time...
#1

Hi all,

I just checked my server log for the first time in a long long while, and found that my NPC's do not connect straight away. They stagger in connection, and sometimes dont even connect at all.

It does the following alot more, but copying the whole thing onto this thread would be a pain.

Код:
[19:27:42] Incoming connection: 127.0.0.1:38246
[19:27:42] Incoming connection: 127.0.0.1:41351
[19:27:42] Incoming connection: 127.0.0.1:55622
[19:27:42] Incoming connection: 127.0.0.1:34579
[19:27:42] Incoming connection: 127.0.0.1:47112
[19:27:42] Incoming connection: 127.0.0.1:55616
[19:27:42] Incoming connection: 127.0.0.1:52448
[19:27:42] Incoming connection: 127.0.0.1:55529
[19:27:42] Incoming connection: 127.0.0.1:42685
[19:27:45] Incoming connection: 127.0.0.1:34105
[19:27:45] Incoming connection: 127.0.0.1:52132
[19:27:45] Incoming connection: 127.0.0.1:58925
[19:27:47] Incoming connection: 127.0.0.1:33570
[19:27:47] Incoming connection: 127.0.0.1:48190
[19:27:47] Incoming connection: 127.0.0.1:54255
[19:27:49] Incoming connection: 127.0.0.1:45336
[19:27:49] Incoming connection: 127.0.0.1:34060
[19:27:49] Incoming connection: 127.0.0.1:34651
[19:27:49] Incoming connection: 127.0.0.1:49456
[19:27:49] Incoming connection: 127.0.0.1:50487
[19:27:49] Incoming connection: 127.0.0.1:45577
I have posted the corresponding code into a pastebin file:

http://pawn.pastebin.com/Vz5ZQt7Q

There are 6 NPC's, but i am currently only using 3 and so 3 are commented out.

Can somebody help me out?

Oh, and if it helps, my server runs on a dedicated server with Linux, CentOS 5, and as its own user (samp)
Reply
#2

Everytime a player spawns, it's going to connect all your NPC's, which you don't want. Put the ConnectNPC and AddStaticVehicle's in OnGameModeInit/OnFilterScriptInit.
Reply
#3

do you have in server.cfg maxnpc 10?
Reply
#4

Maybe a bug report, because it shouldn't
Reply
#5

Do you have anything in OnPlayerConnect or OnPlayerRequestClass that will kick a player? If so add a function to skip the kick or bans.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)