Jump to content

Only GM allowed


Recommended Posts

  • Premium

edit:  (This is is more easy )

close ur server to do the maintenence. then run this querry in our navicat account:

 

UPDATE account.account SET `status` = 'ServerOff' WHERE `status` = 'OK';
UPDATE account.account SET `status` = 'OK' WHERE `login` = 'ID FROM GM ACOUNT'; 

Start our server.

 

after finish the maintenece:

UPDATE account.account SET `status` = 'OK' WHERE `status` = 'ServerOff';

 

reboot.

Edited by EnKor
if pc.get_sex() == true and npc.get_sex() == false then
	npc.purge()
end

 

Link to comment
Share on other sites

Also you can do it with source and event flag:
1) To activate maintenance you need set in game "/e name_for_event_flag 1"
2) To make it works, in source go in game/src -> open input_login.cpp -> search for

void CInputLogin::Entergame(LPDESC d, const char * data)

and add after

if (test_server || (ch->IsGM() == true && ch->GetGMLevel() == GM_IMPLEMENTOR))
			ch->ChatPacket(CHAT_TYPE_COMMAND, "ConsoleEnable");

this

	DWORD maintenance_mode = quest::CQuestManager::instance().GetEventFlag('name_for_event_flag');
	if(ch->GetGMLevel() == GM_PLAYER && maintenance_mode == 1)
	{
		ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Server in maintenance mode, only staff members allowed to enter!"));
		d->DelayedDisconnect(10);
	}

PS: I didn't check it on a live server, so try it somewhere on dev before use on main one.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.