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

Question about Clean Map commands

Gth

Forum Owner
Joined
Jul 15, 2007
Messages
69
Reaction score
2
Ok If i use the in game /clean it freezes the server. But if i use the Remote control to clean =it just makes small lagg.

My question is how can I have ther ingame command use the same format as the remote control does?

it's a Evo server.

in Command.cpp on the remote all i can find is this for clean..
Code:
commandCleanMap()
{
	if(g_connected != true){
		addConsoleMessage("You are not connected to any server.");
		return -1;
	}

	if(!sendCommand(CMD_CLEAN_MAP, NULL)){
		addConsoleMessage("Error! Could not clean map.");
		return -1;
	}

	addConsoleMessage("Successfully cleaned map.");

	return 1;
}
and in the server command.cpp it's
Code:
#ifdef __YUR_CLEAN_MAP__
bool Commands::cleanMap(Creature* creature, const std::string &cmd, const std::string &param)
{
	std::ostringstream info;
	long count = g_game.map->clean();

	std::cout << ":: server clean.. ";
	info << "Clean completed. Collected " << count << (count==1? " item." : " items.") << std::ends;
	std::cout << "[done]" << std::endl;

	if(Player* player = creature->getPlayer()){
		player->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, info.str().c_str());
	}
	else{
		g_game.anonymousBroadcastMessage(info.str().c_str());
	}
	
	return true;
}
#endif
Can i convert it to the way the remote handles a clean but have a collect items feature with it.
 
Back
Top