(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))):
#include "../MQ2Plugin.h"
PreSetup("MQ2Zone");
VOID GateBind(PSPAWNINFO, PCHAR);
VOID ZoneShift(PSPAWNINFO pChar, PCHAR szLine);
VOID ZoneShift(PSPAWNINFO pChar, PCHAR szLine)
{
CHAR szMsg[MAX_STRING] = {0};
DWORD ZoneToGoTo;
ZoneToGoTo = GetZoneID(szLine);
sprintf(szMsg,"Going to zone %s, id %d",szLine,ZoneToGoTo);
WriteChatColor(szMsg,USERCOLOR_DEFAULT);
GetCharInfo()->ZoneBoundId = ZoneToGoTo;
pChar->Type = SPAWN_CORPSE;
}
VOID GateBind(PSPAWNINFO pChar, PCHAR szLine)
{ WriteChatColor ("Gating...",CONCOLOR_RED);
pChar->Type = SPAWN_CORPSE;
}
PLUGIN_API VOID InitializePlugin(VOID)
{
AddCommand("/zone",ZoneShift);
AddCommand("/gate",GateBind);
}
PLUGIN_API VOID ShutdownPlugin(VOID)
{
DebugSpewAlways("Shutting down MQ2Zone");
RemoveCommand("/gate");
RemoveCommand("/zone");
}
/zone (shortname)