Last active
August 29, 2015 13:56
-
-
Save SymbolixDEV/8810204 to your computer and use it in GitHub Desktop.
LoginSCript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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