Installation: Just add this to gossip scripts
GMTele
Code:
#include "Stdafx.h"
void OnEnterWorld(Player * pPlayer, WorldSession *m_session)
{
if(m_session->CanUseCommand('x') || m_session->CanUseCommand('z'))
{
LocationVector gmisland(16201.376, 16210.624, 1.135, 1.121);
pPlayer->SafeTeleport(1, 0, gmisland);
}
}
Add to Setup.h
Code:
void OnEnterWorld(Player * pPlayer);
Add to Setup.cpp
Code:
mgr->register_hook(SERVER_HOOK_EVENT_ON_ENTER_WORLD_2, &OnEnterWorld);
Right under:
Code:
extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
{
Note: You can change any of this, just an example