Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Title:
- * Announce Login
- * Scripted by: Faded
- * (C)Nomsoftware 'Nomsoft' 2011-2012
- */
- #include "ScriptPCH.h"
- #define CUSTOM_BLUE "|cff00479E"
- #define CUSTOM_RED "|cffFF0000"
- #define CUSTOM_LIGHTRED "|cffD63931"
- #define CUSTOM_WHITE "|cffffffff"
- class announce_login : public PlayerScript
- {
- public:
- announce_login() : PlayerScript("announce_login") { }
- void OnLogin(Player * player, Creature * creature)
- {
- char msg[500];
- if(player->GetTeam() == ALLIANCE)
- {
- sprintf(msg, "[%sATT|r]: %s%s|r has logged in! [%sA|r]", CUSTOM_LIGHTRED, CUSTOM_WHITE, player->GetName(), CUSTOM_BLUE);
- sWorld->SendWorldText(LANG_SYSTEMMESSAGE, msg);
- }else{
- sprintf(msg, "[%sATT|r]: %s%s|r has logged in! [%sH|r]", CUSTOM_LIGHTRED, CUSTOM_WHITE, player->GetName(), CUSTOM_RED);
- sWorld->SendWorldText(LANG_SYSTEMMESSAGE, msg);
- }
- }
- };
- void AddSC_announce_login()
- {
- new announce_login;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement