Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Common.h"
- #include "ScriptMgr.h"
- #include "Player.h"
- #include "Chat.h"
- #include "World.h"
- #include "Language.h"
- class Announce_NewPlayer : public PlayerScript
- {
- public:
- Announce_NewPlayer() : PlayerScript("Announce_NewPlayer") {}
- void OnLogin(Player * player, bool firstLogin) override
- {
- if (firstLogin)
- {
- std::string msg;
- msg += "|cff54b5ffWelcome New player:|r ";
- msg += ChatHandler(player->GetSession()).GetNameLink();
- msg += "|cff54b5ff!|r";
- sWorld->SendServerMessage(SERVER_MSG_STRING, msg.c_str(), 0);
- player->CastSpell(player, 55420);
- }
- }
- };
- void AddSC_Announce_NewPlayer() //this is a delaration
- {
- new Announce_NewPlayer(); //this is a call
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement