Bug: OnPlayerConnect - Wrong Player ID in Callback
#1

Since 0.3.7, OnPlayerConnect will not be called properly. I'm the first player without any bots on my 0.3.7 RC4 server and OnPlayerConnect says that I have ID 8 but that is actually not true. I have ID 0.
Код:
[15:26:20] Number of vehicle models: 0
[15:26:41] Incoming connection: 0.0.0.0:00000 id: 0
[15:26:41] [join] Mr_Brox has joined the server (0:0.0.0.0)
[15:26:41] OnPlayerConnect: 8
The last line is the debug line.
Код:
printf("OnPlayerConnect: %d", playerid);
Note: I just removed my IP and my client port.
Reply
#2

You sure no bots? There may be a script connecting NPCs to your server, check the filterscripts loaded!
Reply
#3

There are no plugins and no NPC records and I don't use filterscripts. As you can already see:
[15:26:41] Incoming connection: 0.0.0.0:00000 id: 0

I had ID 0 during the connection process and after that, I received ID 8.
Reply
#4

Please test with a bare gamemode.
Reply
#5

If you're very sure about it, then you may want to post this in 0.3.7 RC Scripting since it seems to be quite related.
Reply
#6

Even more strange is that your IP and port are both 0 as well.
You seem to be connecting to your server with IP 0.0.0.0 on port 0, which isn't possible.

When you run your server on the same machine as you play the game, it should be 127.0.0.1 on any port besides 0.
Reply
#7

I guess that is not his ip and he just removed it while posting so none can know it
Reply
#8

Quote:
Originally Posted by Rockyyy
Посмотреть сообщение
I guess that is not his ip and he just removed it while posting so none can know it
That is what I did. The bug is just about the wrong ID.
Reply
#9

It's an issue on your side, I've tried to reproduce it with a clean gamemode and didn't have any issues.

Reply
#10

It seems so yea. I don't know where the problem is because I tested it again with a blank script and the same plugins but I get ID 0 and not 8 again. And I never programmed NPC's into my gamemode. I'll try to figure it out but we can close it here.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)