Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Chat.h"
- #include "Player.h"
- #include "ScriptMgr.h"
- class FirstLogin : public PlayerScript
- {
- public:
- FirstLogin() : PlayerScript("FirstLogin") { }
- void OnLogin(Player* p_Player, bool p_FirstLogin) override
- {
- if (p_FirstLogin)
- {
- ChatHandler(p_Player->GetSession()).PSendSysMessage("Hello %s, welcome to my server!", p_Player->GetName().c_str());
- ///... other code
- }
- else
- {
- ChatHandler(p_Player->GetSession()).PSendSysMessage("Hello %s, welcome back", p_Player->GetName().c_str());
- ///... other code
- }
- }
- };
- void AddSC_FirstLogin()
- {
- new FirstLogin;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement