Advertisement
julienanid

Mall command

Jan 20th, 2013
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.23 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2. #include "Chat.h"
  3.  
  4. class mall_commandscript : public CommandScript
  5. {
  6. public:
  7.     mall_commandscript() : CommandScript("mall_commandscript") { }
  8.  
  9.         ChatCommand* GetCommands() const
  10.     {
  11.         static ChatCommand IngameCommandTable[] =
  12.         {
  13. { "mall",           SEC_PLAYER,         false,  &HandleMallCommand,                "", NULL },
  14.         { NULL,             0,                  false, NULL,                              "", NULL }
  15.         };
  16.                  return IngameCommandTable;
  17.     }
  18.        static bool HandleMallCommand(ChatHandler * handler, const char * args)
  19.     {
  20.         Player * me = handler->GetSession()->GetPlayer();
  21.  
  22.                         if(me->InArena())
  23.                 {
  24.                         me->GetSession()->SendNotification("You can't use that command in an arena match!");
  25.                         return false;
  26.                 }
  27.  
  28.        if(!me->isAlive())
  29.      me->ResurrectPlayer(100);
  30.                  me-> TeleportTo(530, -1850.209961f, 5435.821777f, -10.961435f, 3.403913f);
  31.                  handler->PSendSysMessage("You Have Been Teleported!");
  32.                 return true;
  33.     }
  34. };
  35.  
  36. void AddSC_Ingame_commandscript()
  37. {
  38.     new mall_commandscript();
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement