Built-in commands
#1
Browsing the source, I found a cmd called /coords

Should this be moved to a plugin?
It doesn't show up using /help
Reply
Thanks given by:
#2
All commands are in lua. If you really need to check for coords, press F3 and it pops up on the left corner.
Reply
Thanks given by:
#3
Code:
bool cServer::Command( cClientHandle & a_Client, const char* a_Cmd ) { cPluginManager* PM = cRoot::Get()->GetPluginManager(); if( PM->CallHook( cPluginManager::E_PLUGIN_CHAT, 2, a_Cmd, a_Client.GetPlayer() ) ) return true; std::string Command( a_Cmd ); if( Command.length() <= 0 ) return false; if( Command[0] != '/' ) return false; std::vector< std::string > split = StringSplit( Command, " " ); if( split.size() == 0 ) return false; if( split[0].compare("/coords") == 0 ) { char c_Str[128]; sprintf_s( c_Str, 128, "[X:%0.2f] [Y:%0.2f] [Z:%0.2f]", a_Client.GetPlayer()->GetPosX(), a_Client.GetPlayer()->GetPosY(), a_Client.GetPlayer()->GetPosZ() ); a_Client.Send( cPacket_Chat( cChatColor::Green + c_Str ) ); return true; } return false; }

This isn't lua by any means. Taken from cServer.cpp
Reply
Thanks given by:
#4
Yes, I think this should be moved to a plugin or removedBig Grin

Seems to be old debugging codeBig Grin
Reply
Thanks given by:
#5
Yes it should be removed, it was from the time that F3 didn't even exist in the game
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)