Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

To allow only gms to use gm commands via gmtool

Newbie Spellweaver
Joined
Apr 16, 2012
Messages
28
Reaction score
4
Go to mapserver src and Menuserver.cpp
go to the commands for example changing scenario time:

void RecvChangeScenarioTime( t_packet *p, short int cn )
{ //< CSD-030306
CHARLIST* ch = CheckServerId( cn );
if( !ch ) return;
if( !ch->IsCounselor() ) return; <------ Only allows GM to use this command

if( cn == CN_FROM_OTHER_MAPSERVER_MSG )
{
if (!g_pDungeonMgr)
{
return;
}

CDungeonBasic* pTemp = g_pDungeonMgr->GetDungeon(p->u.kein.scenario_time_change.idDungeon);

if (pTemp == NULL)
{
return;
}

pTemp->SetStartUpInfo(p->u.kein.scenario_time_change.idStartUp,
p->u.kein.scenario_time_change.nApplyDay,
p->u.kein.scenario_time_change.nStartHour,
p->u.kein.scenario_time_change.nStartMinute,
p->u.kein.scenario_time_change.nEndHour,
p->u.kein.scenario_time_change.nEndMinute);
}
else
{
if( g_pDungeonMgr )
{
RecvChangeScenarioTime( p, CN_FROM_OTHER_MAPSERVER_MSG );
}
else
{
SendPacket2Map( p, MN_SCENARIO_MAP);
}
}
} //> CSD-030306
 
Back
Top