Kick has crashed the server when restart
#1

This code results in the crash during server restart (entering "gmx" in the server console):

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    if(reason != 2) Kick(playerid);
    return 1;
}
And performed all code in public, and right after that comes the crash. The problem: why kick a player leads to crash the server?
Reply
#2

What server version?
Reply
#3

Quote:
Originally Posted by dugi
Посмотреть сообщение
What server version?
0.3z R4 server update
Reply
#4

Sorry if I'm being a rat, but why kick a player when the player already disconnected? (afaik, OnPlayerDisconnect is called when a player disconnects.)
Reply
#5

Quote:
Originally Posted by LivingLikeYouDo
Посмотреть сообщение
Sorry if I'm being a rat, but why kick a player when the player already disconnected? (afaik, OnPlayerDisconnect is called when a player disconnects.)
At some of the versions had the opportunity in some way to remain on the server even after the "disconnection". I do not know whether is possible now make it, but all the same question now otherwise)
Reply
#6

You should just use the rcon ban IP method as OnPlayerDisconnect calls after they've been disconnected, rendering Kick illogical. What probably happened is that the slot was cleared, but they weren't removed from the game.
Reply
#7

I really think you're kicking a player that is already disconnected, hence your crash...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)