Guest User

Untitled

a guest
Nov 24th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. // Commande .pvp (test)
  2. //Chat.cpp
  3. static ChatCommand pvpCommandTable[] =
  4. {
  5. { "pvp", SEC_PLAYER, true, OldHandler<&ChatHandler::HandlepvpCommand>, "", NULL },
  6. };
  7.  
  8. //Chat.h
  9. bool HandlepvpCommand(const char * args);
  10.  
  11. //Level0.cpp
  12. bool ChatHandler::HandlepvpCommand(const char * args)
  13. {
  14. if (!*args)
  15. return false;
  16.  
  17. Player* _player = m_session->GetPlayer();
  18.  
  19. if (_player->isInCombat())
  20. {
  21. SendSysMessage(LANG_YOU_IN_COMBAT);
  22. SetSentErrorMessage(true);
  23. return false;
  24. }
  25.  
  26. _player->TeleportTo(tele->0, tele->13248.00f, tele->191.00f, tele->32.00f, tele->1.15157f);
  27. return true;
  28. }
  29.  
  30. // + modif database
Add Comment
Please, Sign In to add comment