Advertisement
skillz79

Untitled

May 11th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. /*Title:
  2. * Announce Login
  3. * Scripted by: Faded
  4. * (C)Nomsoftware 'Nomsoft' 2011-2012
  5. */
  6.  
  7. #include "ScriptPCH.h"
  8. #define CUSTOM_BLUE "|cff00479E"
  9. #define CUSTOM_RED "|cffFF0000"
  10. #define CUSTOM_LIGHTRED "|cffD63931"
  11. #define CUSTOM_WHITE "|cffffffff"
  12.  
  13. class announce_login : public PlayerScript
  14. {
  15. public:
  16. announce_login() : PlayerScript("announce_login") { }
  17.  
  18. void OnLogin(Player * player, Creature * creature)
  19. {
  20. char msg[500];
  21. if(player->GetTeam() == ALLIANCE)
  22. {
  23. sprintf(msg, "[%sATT|r]: %s%s|r has logged in! [%sA|r]", CUSTOM_LIGHTRED, CUSTOM_WHITE, player->GetName(), CUSTOM_BLUE);
  24. sWorld->SendWorldText(LANG_SYSTEMMESSAGE, msg);
  25. }else{
  26. sprintf(msg, "[%sATT|r]: %s%s|r has logged in! [%sH|r]", CUSTOM_LIGHTRED, CUSTOM_WHITE, player->GetName(), CUSTOM_RED);
  27. sWorld->SendWorldText(LANG_SYSTEMMESSAGE, msg);
  28. }
  29. }
  30. };
  31.  
  32. void AddSC_announce_login()
  33. {
  34. new announce_login;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement