Advertisement
naicer

World Chat

Mar 22nd, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include "ScriptPCH.h"
  2.  
  3. class cmd_chat : public CommandScript
  4. {
  5.     public:
  6.         cmd_chat() :  CommandScript("cmd_chat") { }
  7.    
  8.         ChatCommand * GetCommands() const
  9.         {
  10.             static ChatCommand chatCommandTable[] =
  11.             {
  12.                 { "chat",       SEC_PLAYER,         false&HandleChatCommand,         " ", NULL },
  13.                 { NULL,         0,                  false, NULL,                        " ", NULL }
  14.             };
  15.             return chatCommandTable;
  16.         }
  17.  
  18.         static bool HandleChatCommand(ChatHandler * handler, char const * args)
  19.         {
  20.             Player * player = handler->GetSession()->GetPlayer();
  21.             player->GetSession()->SendAreaTriggerMessage("Chat");
  22.             return true;
  23.         }
  24. };
  25.  
  26. void AddSC_cmd_chat()
  27. {
  28.     new cmd_chat;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement