Advertisement
Kaev

PlayerScript OnPvpKill Template

Jun 9th, 2015
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. /*
  2. PlayerScript OnPVPKill Template by Kaev
  3. Made for MMONerds.com, Modcraft.io and MCore.cc
  4. */
  5.  
  6. class onPvpKillTemplate : public PlayerScript
  7. {
  8. public:
  9.     onPvpKillTemplate() : PlayerScript("onPvpKillTemplate") { }
  10.  
  11.     void OnPVPKill(Player* killer, Player* killed) override
  12.     {
  13.         if(killer->GetGUID() == killed->GetGUID()) // We don't want to get exploited by player suicide
  14.             return;
  15.  
  16.     }
  17. };
  18.  
  19. void AddSC_onPvpKillTemplate() // Add this to the ScriptLoader
  20. {
  21.     new onPvpKillTemplate();
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement