Advertisement
icefreezer

Untitled

Jul 28th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #include "Chat.h"
  2. #include "Player.h"
  3. #include "ScriptMgr.h"
  4.  
  5. class FirstLogin : public PlayerScript
  6. {
  7. public:
  8. FirstLogin() : PlayerScript("FirstLogin") { }
  9.  
  10. void OnLogin(Player* p_Player, bool p_FirstLogin) override
  11. {
  12. if (p_FirstLogin)
  13. {
  14. ChatHandler(p_Player->GetSession()).PSendSysMessage("Hello %s, welcome to my server!", p_Player->GetName().c_str());
  15. ///... other code
  16. }
  17. else
  18. {
  19. ChatHandler(p_Player->GetSession()).PSendSysMessage("Hello %s, welcome back", p_Player->GetName().c_str());
  20. ///... other code
  21. }
  22. }
  23. };
  24.  
  25. void AddSC_FirstLogin()
  26. {
  27. new FirstLogin;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement