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..
and in the server command.cpp it's
Can i convert it to the way the remote handles a clean but have a collect items feature with it.
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;
}
Code:
#ifdef __YUR_CLEAN_MAP__
bool Commands::cleanMap(Creature* creature, const std::string &cmd, const std::string ¶m)
{
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