openmultiplayer / open.mp

Open Multiplayer, a multiplayer mod fully backwards compatible with SA-MP
https://open.mp
Mozilla Public License 2.0
451 stars 90 forks source link

Kick Bug #704

Open nexquery opened 1 year ago

nexquery commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

The same problem happens with OnPlayerConnect.

nexquery commented 1 year ago

This problem also applies to the Ban function.

nexquery commented 10 months ago

It looks like this issue persists in v1.1.0.2612.

AmyrAhmady commented 5 months ago

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

nexquery commented 5 months ago

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