openmultiplayer / open.mp

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

Kicking player will not always inform a client that it was a kick and appears to be lost connection for a player #931

Open ddanyk opened 3 months ago

ddanyk commented 3 months ago

Describe the bug As the title says, if is player kicked during executing code in OnPlayerConnect it will kick client correctly serverside but not clientside. For a player it appears as lost connection.

To Reproduce https://www.youtube.com/watch?v=IEVkGPY04HM

forward KickTimer(playerid);
public KickTimer(playerid)
{
    Kick(playerid);
}
public OnPlayerConnect(playerid)
{
    SetTimerEx("KickTimer",100,false,"i",playerid);
}

It works correctly this way...

public OnPlayerConnect(playerid)
{
    Kick(playerid);
}

...but I am using http request to get info from ip-api called in OnPlayerConnect and after http response I can kick a client if it is banned or something. It acts same as fist code show.

30.6. edit Now I fugured out it aslo may happen any time later but it is not that usuall. https://www.youtube.com/watch?v=8EIZtxhpSAU

version omp 1.2.0.2717 https://github.com/openmultiplayer/open.mp/actions/runs/9721039075

and aslo tested on omp 1.2.0.2735 https://github.com/openmultiplayer/open.mp/actions/runs/9136915959

PazzOnee commented 2 months ago

@AmyrAhmady in latest build its not fixed, and new problem is objects priority, which when you destroy static and create dynamic object, object will be not created, https://github.com/openmultiplayer/open.mp/actions/runs/9776051870