birdofdeath
04-24-2009, 12:14 PM
Ok here it is, just include it in the setups and it should work...
//---------------------
// Name: Playercommands
// Origionaly by: Darkalex
// Edited by: OneFreeMan/Birdofdeath
//---------------------
#include "StdAfx.h"
#include "Setup.h"
static string rezzcmd = "#unstuck"; //Revive Player-command
bool rezzon = true; //Will be switchable later ingame via GMCommand
void PlayerCommands(Player * pPlayer, uint32 Type, uint32 Lang, const char * Message, const char * Misc)
{
//#rezz-Command - Start
if(Message == rezzcmd)
{
if (pPlayer->getDeathState() == 1) // Just died
pPlayer->RemoteRevive();
if (pPlayer->getDeathState() != 0) // Not alive
pPlayer->ResurrectPlayer();
if (pPlayer->GetTeam() == 0) // Horde, Orgrimmar
pPlayer->SafeTeleport(1, 0, 1502.71f, -4415.42f, 21.6f, 0.0f);
else // Alliance, Stormwind
pPlayer->SafeTeleport(0, 0, -9010.99f, 475.757f, 96.4711f, 0.0f);
} //#unstuck-Command end
}
void SetupReviver(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, (void *) PlayerCommands);
}
//---------------------
// Name: Playercommands
// Origionaly by: Darkalex
// Edited by: OneFreeMan/Birdofdeath
//---------------------
#include "StdAfx.h"
#include "Setup.h"
static string rezzcmd = "#unstuck"; //Revive Player-command
bool rezzon = true; //Will be switchable later ingame via GMCommand
void PlayerCommands(Player * pPlayer, uint32 Type, uint32 Lang, const char * Message, const char * Misc)
{
//#rezz-Command - Start
if(Message == rezzcmd)
{
if (pPlayer->getDeathState() == 1) // Just died
pPlayer->RemoteRevive();
if (pPlayer->getDeathState() != 0) // Not alive
pPlayer->ResurrectPlayer();
if (pPlayer->GetTeam() == 0) // Horde, Orgrimmar
pPlayer->SafeTeleport(1, 0, 1502.71f, -4415.42f, 21.6f, 0.0f);
else // Alliance, Stormwind
pPlayer->SafeTeleport(0, 0, -9010.99f, 475.757f, 96.4711f, 0.0f);
} //#unstuck-Command end
}
void SetupReviver(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_CHAT, (void *) PlayerCommands);
}