• 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] GMs can see invisible creatures! - by the Black Onix Team.

would't be better if you add

players.h

Code:
virtual bool canSeeInvisibility() const {return hasFlag(PlayerFlag_CanSenseInvisibility) || getPlayerAccess(cid) >= g_config.getNumber(ConfigManager::CAN_SEE_INVISIBILITY);}
?

replace your function bool Player::canSeeCreature(const Creature* creature) const on player.cpp with this

Code:
bool Player::canSeeCreature(const Creature* creature) const
{
	if(creature->isInvisible() && !creature->getPlayer() && !canSeeInvisibility())
		return false;
	return true;
}

and then add to configmanager.cpp this

Code:
m_confInteger[CAN_SEE_INVISIBILITY] = getGlobalNumber(L, "canseeinvisibility", 3);

and in configmanager.h this in integers

Code:
CAN_SEE_INVISIBILITY,

and finally in config.lua

Code:
cansee = 3

i think this will be better and can be used in all the servers and not just in tfs
 
Last edited:
Back
Top