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

[Commands] How to remove Commands?

Merchant

Expert Mapper
Joined
Mar 12, 2008
Messages
769
Reaction score
20
Simpely, how do I remove commands?
Such as '!online'...


Kind regards,
Icetear!
 
Remove from Commands.cpp
{"!online", &Commands::whoIsOnline},
and than Remove from Commands.cpp too:
bool Commands::whoIsOnline(Creature* creature, const std::string &cmd, const std::string &param)
{
Player* player = creature->getPlayer();
if(player)
{
AutoList<Player>::listiterator it = Player::listPlayer.list.begin();
std::stringstream ss;
ss << "Players online:" << std::endl;
bool first = true;
if(g_config.getString(ConfigManager::SHOW_GAMEMASTERS_ONLINE) == "no")
{
while (it != Player::listPlayer.list.end())
{
if(!(*it).second->accessLevel || player->accessLevel)
{
ss << (first ? "" : ", ") << (*it).second->name << " [" << (*it).second->level << "]";
first = false;
}
++it;
}
}
else
{
while (it != Player::listPlayer.list.end())
{
ss << (first ? "" : ", ") << (*it).second->name << " [" << (*it).second->level << "]";
first = false;
++it;
}
}
ss << ".";
player->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, ss.str());
}
return true;
}
NOW Commands.h
if u are done than open commands.h
and find and delte this:
bool whoIsOnline(Creature* creature, const std::string &cmd, const std::string &param);
 
Last edited:
Back
Top