Something like this could work.
Code:
#include "StdAfx.h"
#include "Setup.h"
#ifdef WIN32
#pragma warning(disable:4305) // warning C4305: 'argument' : truncation from 'double' to 'float'
#endif
static string start = "#start";
void EventChat(Player * pPlayer, uint32 Type, uint32 Lang, const char * Message, const char * Misc)
{
if (Message == start)
{
pPlayer->EventTeleport(map, x, y, z); // Change this
}
}
void SetupHometeleport(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, &EventChat);
}