• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ How to not get kicked from server when brute force exit

kilombero

New Member
Joined
Apr 28, 2020
Messages
4
Reaction score
0
Hi, i'm running my own private server and I'm trying to get the character to be connected to the server when exiting (press x and exit), but it kicks off after a few seconds, I tried changing this parameter in config.lua:
Code:
kickIdlePlayerAfterMinutes = 15
but it does not work. What could it be?
 
You can comment this part in players.cpp
C++:
    if (noPongTime >= 60000 && canLogout()) {
        if (g_creatureEvents->playerLogout(this)) {
            if (client) {
                client->logout(true, true);
            } else {
                g_game.removeCreature(this, true);
            }
        }
    }
 
You can comment this part in players.cpp
C++:
    if (noPongTime >= 60000 && canLogout()) {
        if (g_creatureEvents->playerLogout(this)) {
            if (client) {
                client->logout(true, true);
            } else {
                g_game.removeCreature(this, true);
            }
        }
    }

hey, thnks for your help. the same thing appears to me:

Code:
    if (noPongTime >= 60000 && canLogout()) {
        if (g_creatureEvents->playerLogout(this)) {
            if (client) {
                client->logout(true, true);
            } else {
                g_game.removeCreature(this, true);
            }
        }
    }
}

What should change?
 
hey, thnks for your help. the same thing appears to me:

Code:
    if (noPongTime >= 60000 && canLogout()) {
        if (g_creatureEvents->playerLogout(this)) {
            if (client) {
                client->logout(true, true);
            } else {
                g_game.removeCreature(this, true);
            }
        }
    }
}

What should change?
Just add /* */
Lua:
    /*if (noPongTime >= 60000 && canLogout()) {
        if (g_creatureEvents->playerLogout(this)) {
            if (client) {
                client->logout(true, true);
            } else {
                g_game.removeCreature(this, true);
                g_game.addMagicEffect(getPosition(), CONST_ME_POFF);
            }
        }
    }*/
 
Just add /* */
Lua:
    /*if (noPongTime >= 60000 && canLogout()) {
        if (g_creatureEvents->playerLogout(this)) {
            if (client) {
                client->logout(true, true);
            } else {
                g_game.removeCreature(this, true);
                g_game.addMagicEffect(getPosition(), CONST_ME_POFF);
            }
        }
    }*/

It didn't work, the same thing keeps happening.
 
Back
Top