Cocain
29-03-10, 02:57 PM
#include "stdafx.h"
#include "setup.h"
void OnGuildJoin(Player * pPlayer, Guild * pGuild)
{
if(pPlayer->GetItemInterface()->GetItemCount(5976, false)>= 1)
{
pPlayer->BroadcastMessage("You already have a tabard.");
} else {
Item * pItem = objmgr.CreateItem(5976, pPlayer);
pPlayer->GetItemInterface()->AddItemToFreeSlot(pItem);
pPlayer->BroadcastMessage("You're an official guild member now!");
}
}
void SetupOnGuildJoin(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_GUILD_JOIN, OnGuildJoin);
}
Have fun. ;)
#include "setup.h"
void OnGuildJoin(Player * pPlayer, Guild * pGuild)
{
if(pPlayer->GetItemInterface()->GetItemCount(5976, false)>= 1)
{
pPlayer->BroadcastMessage("You already have a tabard.");
} else {
Item * pItem = objmgr.CreateItem(5976, pPlayer);
pPlayer->GetItemInterface()->AddItemToFreeSlot(pItem);
pPlayer->BroadcastMessage("You're an official guild member now!");
}
}
void SetupOnGuildJoin(ScriptMgr * mgr)
{
mgr->register_hook(SERVER_HOOK_EVENT_ON_GUILD_JOIN, OnGuildJoin);
}
Have fun. ;)