NPC not connect to Server [Linux - Debian 8]
#1

Hi everyone!

I wanted NPCs be connected to the my hosted server, but 1-2 never connected.
I did a test server (Windows), they can connect without any problems.

number of NPCs: 6

server.cfg:

Код:
echo Executing Server Config...
lanmode 0
rcon_password -
maxplayers 100
port 7777
hostname SA-MP 0.3.7 Server
gamemode0 my_gamemode
filterscripts
plugins crashdetect.so MapAndreas.so streamer.so sscanf.so mysql.so gvar.so Whirlpool.so
announce 1
query 1
weburl sa-mp.com
maxnpc 10
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
logtimeformat [%Y.%m.%d %H:%M:%S]
chatlogging 0
password
minconnectiontime 1000
ackslimit 5000
rcon 0
chatlogging 1
server_log.txt
Код:
[2016.01.25 22:38:54] [connection] 127.0.0.1:49167 requests connection cookie.
[2016.01.25 22:38:54] [connection] 127.0.0.1:43516 requests connection cookie.
[2016.01.25 22:38:54] [connection] 127.0.0.1:59498 requests connection cookie.
[2016.01.25 22:38:54] [connection] 127.0.0.1:58970 requests connection cookie.
[2016.01.25 22:38:55] [connection] 127.0.0.1:39572 requests connection cookie.
[2016.01.25 22:38:55] [connection] 127.0.0.1:36090 requests connection cookie.
[2016.01.25 22:38:55] Warning: Minimum time between new connections (1000) exceeded for 127.0.0.1:59498. Ignoring the request.
[2016.01.25 22:38:56] [connection] incoming connection: 127.0.0.1:49167 id: 0
[2016.01.25 22:38:56] [npc:join] Gezabacsi has joined the server (0:127.0.0.1)
[2016.01.25 22:38:56] NPC_Spawn(0)
[2016.01.25 22:38:56] NPC_Spawn(0)
[2016.01.25 22:38:56] Warning: Minimum time between new connections (1000) exceeded for 127.0.0.1:43516. Ignoring the request.
[2016.01.25 22:38:56] [connection] incoming connection: 127.0.0.1:59498 id: 1
[2016.01.25 22:38:57] [npc:join] Jozsikaa has joined the server (1:127.0.0.1)
[2016.01.25 22:38:57] NPC_Spawn(1)
[2016.01.25 22:38:57] [connection] incoming connection: 127.0.0.1:43516 id: 2
[2016.01.25 22:38:57] NPC_Spawn(1)
[2016.01.25 22:38:58] Warning: Minimum time between new connections (1000) exceeded for 127.0.0.1:58970. Ignoring the request.
[2016.01.25 22:38:58] [npc:join] KalapUr has joined the server (2:127.0.0.1)
[2016.01.25 22:38:58] NPC_Spawn(2)
[2016.01.25 22:38:59] NPC_Spawn(2)
[2016.01.25 22:38:59] [connection] incoming connection: 127.0.0.1:58970 id: 3
[2016.01.25 22:38:59] Warning: Minimum time between new connections (1000) exceeded for 127.0.0.1:39572. Ignoring the request.
[2016.01.25 22:38:59] [npc:join] KulaBa has joined the server (3:127.0.0.1)
[2016.01.25 22:38:59] NPC_Spawn(3)
[2016.01.25 22:39:00] [connection] incoming connection: 127.0.0.1:39572 id: 4
[2016.01.25 22:39:00] NPC_Spawn(3)
[2016.01.25 22:39:00] Warning: Minimum time between new connections (1000) exceeded for 127.0.0.1:36090. Ignoring the request.
[2016.01.25 22:39:00] [npc:join] MikRobi has joined the server (4:127.0.0.1)
[2016.01.25 22:39:00] NPC_Spawn(4)
[2016.01.25 22:39:00] NPC_Spawn(4)
NPC Connect (OnGameModeInit)
Код:
    ConnectNPC("Gezabacsi","lvbusnpc");
    MyNPCVehicle[0] = AddStaticVehicle(431, 0.0, 0.0, 5.0, 0.0, 3, 3);
    ConnectNPC("KalapUr","lsbusnpc");
    MyNPCVehicle[1] = AddStaticVehicle(431, 0.0, 0.0, 5.0, 0.0, 3, 3);
    ConnectNPC("Jozsikaa","sfbusnpc");
    MyNPCVehicle[2] = AddStaticVehicle(431, 0.0, 0.0, 5.0, 0.0, 3, 3);
    
    ConnectNPC("KulaBa","at400_ls");
    MyNPCVehicle[3] = AddStaticVehicle(577, 0.0, 0.0, 5.0, 0.0, 3, 3);
    ConnectNPC("MikRobi","at400_lv");
    MyNPCVehicle[4] = AddStaticVehicle(577, 0.0, 0.0, 5.0, 0.0, 3, 3);
    ConnectNPC("SkyWalker","at400_sf");
    MyNPCVehicle[5] = AddStaticVehicle(577, 0.0, 0.0, 5.0, 0.0, 3, 3);
Random 1-2 not connected, but on the test server successfully connected.

Log: (Windows)
Код:
[23:48:05] [connection] 127.0.0.1:54092 requests connection cookie.
[23:48:05] [connection] 127.0.0.1:54093 requests connection cookie.
[23:48:06] [connection] 127.0.0.1:54094 requests connection cookie.
[23:48:06] [connection] 127.0.0.1:54095 requests connection cookie.
[23:48:06] [connection] 127.0.0.1:54096 requests connection cookie.
[23:48:06] - Цsszes kocsi: 1793
[23:48:06] >> DestroyAnyVehicle: ID: 1793, Sofőr: 65535, VW: 0
[23:48:06] 
=======================================================
[23:48:06] .:: Everybody's Stunt Server By CasHiis (2009 - 2015)
[23:48:06] .:: GameMode Loaded!
[23:48:06] =======================================================

[23:48:06] Number of vehicle models: 154
[23:48:06] [connection] 127.0.0.1:54097 requests connection cookie.
[23:48:06] Incoming connection: 127.0.0.1:54092 id: 0
[23:48:06] Incoming connection: 127.0.0.1:54093 id: 1
[23:48:07] Incoming connection: 127.0.0.1:54094 id: 2
[23:48:07] Incoming connection: 127.0.0.1:54095 id: 3
[23:48:07] Incoming connection: 127.0.0.1:54096 id: 4
[23:48:07] [npc:join] Gezabacsi has joined the server (0:127.0.0.1)
[23:48:07] Incoming connection: 127.0.0.1:54097 id: 5
[23:48:07] [Szerver]: IP 127.0.0.1:Q blokkolva!
[23:48:07] [npc:join] KalapUr has joined the server (1:127.0.0.1)
[23:48:07] [npc:join] KulaBa has joined the server (3:127.0.0.1)
[23:48:07] [npc:join] Jozsikaa has joined the server (2:127.0.0.1)
[23:48:07] NPC_Spawn
[23:48:07] [npc:join] MikRobi has joined the server (4:127.0.0.1)
[23:48:07] NPC_Spawn
[23:48:07] [npc:join] SkyWalker has joined the server (5:127.0.0.1)
[23:48:07] NPC_Spawn
[23:48:07] NPC_Spawn
[23:48:07] NPC_Spawn
[23:48:07] NPC_Spawn
Reply
#2

And did you correctly place them all in the vehicles?
Reply
#3

NPC Spawn:
Код:
printf("NPC_Spawn(%d)", playerid);
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname));

if(!strcmp(npcname, "Gezabacsi", true)) PutPlayerInVehicle(playerid, MyNPCVehicle[0], 0);
if(!strcmp(npcname, "KalapUr", true)) PutPlayerInVehicle(playerid, MyNPCVehicle[1], 0);
if(!strcmp(npcname, "Jozsikaa", true)) PutPlayerInVehicle(playerid, MyNPCVehicle[2], 0);
if(!strcmp(npcname, "KulaBa", true)) PutPlayerInVehicle(playerid, MyNPCVehicle[3], 0);
if(!strcmp(npcname, "MikRobi", true)) PutPlayerInVehicle(playerid, MyNPCVehicle[4], 0);
if(!strcmp(npcname, "SkyWalker", true)) PutPlayerInVehicle(playerid, MyNPCVehicle[5], 0);
But as I wrote, always different NPC can not connect.
So the problem in the connection.
Reply
#4

NPCs are like this you really need to make an aggressive connection module to connect them as they will also randomly disconnect over time and need to be reconnected.
Reply
#5

1.st Rule is to understand what server_log is saying to you.


[2016.01.25 22:39:00] Warning: Minimum time between new connections (1000) exceeded for 127.0.0.1:36090. Ignoring the request.


either remove new connection limitation or make a timer which connects a new NPC each 1500ms.
Reply
#6

Thank you, but if the setting has changed it, you will not be vulnerable to the server?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)