Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ScriptPCH.h"
- #include "Chat.h"
- class Freezeme_Command : public CommandScript
- {
- public:
- Freezeme_Command() : CommandScript("Freezeme_Command") {}
- ChatCommand* GetCommands() const
- {
- static ChatCommand Freezemecommandtable[] =
- {
- { "freezeme", SEC_PLAYER, false, &HandleFreezemeCommand, "", NULL },
- { NULL, 0, false, NULL, "", NULL }
- };
- return Freezemecommandtable;
- }
- static bool HandleFreezemeCommand(ChatHandler* handler, const char* args)
- {
- WorldSession* Session = handler->GetSession();
- Player* pPlayer = Session->GetPlayer();
- QueryResult Result = LoginDatabase.PQuery("SELECT 1 FROM account WHERE vip = 1 and id = %u", Session->GetAccountId());
- if(!Result)
- {
- Session->SendNotification("You aren't a V.I.P");
- return false;
- }
- if (pPlayer->HasAura(9454))
- pPlayer->RemoveAura(9454);
- else
- pPlayer->AddAura(9454,pPlayer);
- return true;
- }
- };
- void AddSC_Freezeme_Command()
- {
- new Freezeme_Command();
- }
Add Comment
Please, Sign In to add comment