Skip to content

Instantly share code, notes, and snippets.

@SymbolixDEV
Last active August 29, 2015 13:56
Show Gist options
  • Save SymbolixDEV/8810204 to your computer and use it in GitHub Desktop.
Save SymbolixDEV/8810204 to your computer and use it in GitHub Desktop.
LoginSCript
//script made by SymbolixDEV
//Edited by : Rochet2
#include "ScriptPCH.h"
class login_script : public PlayerScript
{
public:
login_script() : PlayerScript("login_script") { }
void OnLogin(Player* player)
{
std::string msg;
if (player->GetSession()->GetSecurity() != SEC_PLAYER)
msg = "[GM]:";
else
msg = "[PLAYER]:";
msg += player->GetName()+" has logged in!";
sWorld->SendGlobalText(msg.c_str(), NULL);
player->RemoveAllSpellCooldown(); //reset cooldowns on login!
}
};
void AddSC_login_script()
{
new login_script();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment