• 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!

Frag system issue tfs 1.2

Lopaskurwa

Active Member
Joined
Oct 6, 2017
Messages
873
Solutions
2
Reaction score
49
Hey
having weird issue so after reaching x amount of kills that are set in config if they pass daily frag limit or week or month they get banned but instead it just kicks them out and removes red skull aswell so its fucked up, pretty sure its this code
Code:
    if (getPeriodKills(1) >= g_config.getNumber(ConfigManager::KILLS_DAY_BANISHMENT) || getPeriodKills(7) >= g_config.getNumber(ConfigManager::KILLS_WEEK_BANISHMENT) || getPeriodKills(30) >= g_config.getNumber(ConfigManager::KILLS_MONTH_BANISHMENT)) {
        Database* db = Database::getInstance();
        std::ostringstream ss;
        ss << "INSERT INTO `account_bans` (`account_id`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (";
        ss << getAccount() << ", ";
        ss << db->escapeString("Too many unjustified kills") << ", ";
        ss << std::time(nullptr) << ", ";
        ss << std::time(nullptr) + g_config.getNumber(ConfigManager::BAN_LENGTH) << ", ";
        ss << "1);";

        db->executeQuery(ss.str());

        g_game.addMagicEffect(getPosition(), CONST_ME_GREEN_RINGS);
        g_game.removeCreature(this);
        disconnect();
    }
}
 
Gives this error when u pass max frag limit where it suppose to ban, basically it removes redskull aswell and kicks player out which is wrong. Edis it removes redskull any time player disconnects
1692606298959.png
 
Last edited:
Back
Top