Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Commande .pvp (test)
- //Chat.cpp
- static ChatCommand pvpCommandTable[] =
- {
- { "pvp", SEC_PLAYER, true, OldHandler<&ChatHandler::HandlepvpCommand>, "", NULL },
- };
- //Chat.h
- bool HandlepvpCommand(const char * args);
- //Level0.cpp
- bool ChatHandler::HandlepvpCommand(const char * args)
- {
- if (!*args)
- return false;
- Player* _player = m_session->GetPlayer();
- if (_player->isInCombat())
- {
- SendSysMessage(LANG_YOU_IN_COMBAT);
- SetSentErrorMessage(true);
- return false;
- }
- _player->TeleportTo(tele->0, tele->13248.00f, tele->191.00f, tele->32.00f, tele->1.15157f);
- return true;
- }
- // + modif database
Add Comment
Please, Sign In to add comment