open.mp icon indicating copy to clipboard operation
open.mp copied to clipboard

Kick Bug

Open nexquery opened this issue 2 years ago • 7 comments

If you use the Kick function in the OnPlayerFinishedDownloading callback, the player cannot connect to the server and tries to reconnect.

This issue also happens in RC2 version.

Version I am using: open.mp server (1.0.1.2552) from commit 12a695240795d3478e86dc664a9e2aae4f8ba041

Video: https://www.youtube.com/watch?v=OSZAWkZTPM4

Code:

public OnPlayerFinishedDownloading(playerid, virtualworld)
{
	Kick(playerid);
	return 1;
}

nexquery avatar Aug 17 '23 16:08 nexquery

I tried it on a clean mode and it kicked me off the server. It seems to be a problem with plugins or hooks. I will inform you again when I detect the problem.

nexquery avatar Aug 17 '23 16:08 nexquery

The problem is in the Kick function. I tried this version with a clean server file without plugins. When the models are downloaded you are properly kicked off the server. When you connect to the server again, you are not kicked from the server and you try to connect to the server again.

You can test this problem with the server file below. test_mode.zip

nexquery avatar Aug 17 '23 20:08 nexquery

The same problem happens with OnPlayerConnect.

nexquery avatar Aug 17 '23 20:08 nexquery

This problem also applies to the Ban function.

nexquery avatar Aug 21 '23 15:08 nexquery

It looks like this issue persists in v1.1.0.2612.

nexquery avatar Nov 12 '23 10:11 nexquery

Can you test with latest nightly and see if this still happens?

AmyrAhmady avatar Apr 09 '24 01:04 AmyrAhmady

The problem persists in the latest nightly build. https://github.com/openmultiplayer/open.mp/actions/runs/8556095715

nexquery avatar Apr 09 '24 19:04 nexquery