Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- #include "Chat.h"
- class mall_commandscript : public CommandScript
- {
- public:
- mall_commandscript() : CommandScript("mall_commandscript") { }
- ChatCommand* GetCommands() const
- {
- static ChatCommand IngameCommandTable[] =
- {
- { "mall", SEC_PLAYER, false, &HandleMallCommand, "", NULL },
- { NULL, 0, false, NULL, "", NULL }
- };
- return IngameCommandTable;
- }
- static bool HandleMallCommand(ChatHandler * handler, const char * args)
- {
- Player * me = handler->GetSession()->GetPlayer();
- if(me->InArena())
- {
- me->GetSession()->SendNotification("You can't use that command in an arena match!");
- return false;
- }
- if(!me->isAlive())
- me->ResurrectPlayer(100);
- me-> TeleportTo(530, -1850.209961f, 5435.821777f, -10.961435f, 3.403913f);
- handler->PSendSysMessage("You Have Been Teleported!");
- return true;
- }
- };
- void AddSC_Ingame_commandscript()
- {
- new mall_commandscript();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement