SA-MP Forums Archive
Bug: OnPlayerConnect - Wrong Player ID in Callback - 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)
+--- Thread: Bug: OnPlayerConnect - Wrong Player ID in Callback (/showthread.php?tid=571818)



Bug: OnPlayerConnect - Wrong Player ID in Callback - Mr_Brox - 22.04.2015

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.


Re: Bug: OnPlayerConnect - Wrong Player ID in Callback - [KHK]Khalid - 22.04.2015

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


Re: Bug: OnPlayerConnect - Wrong Player ID in Callback - Mr_Brox - 23.04.2015

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.


Re: Bug: OnPlayerConnect - Wrong Player ID in Callback - AberKane - 23.04.2015

Please test with a bare gamemode.


Re: Bug: OnPlayerConnect - Wrong Player ID in Callback - [KHK]Khalid - 23.04.2015

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.


Re: Bug: OnPlayerConnect - Wrong Player ID in Callback - PowerPC603 - 23.04.2015

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.


Re: Bug: OnPlayerConnect - Wrong Player ID in Callback - Rockyyy - 23.04.2015

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


Re: Bug: OnPlayerConnect - Wrong Player ID in Callback - Mr_Brox - 27.04.2015

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.


Re: Bug: OnPlayerConnect - Wrong Player ID in Callback - Jimmy0wns - 27.04.2015

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




Re: Bug: OnPlayerConnect - Wrong Player ID in Callback - Mr_Brox - 27.04.2015

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.