hello
i have this script from a other forum, it sould play a sound to all players:
//Play sound
bool ChatHandler::HandlePlaySoundCommand(const char* args)
{
// USAGE: .playsound #soundid
// #soundid - ID decimal number from SoundEntries.dbc (1 column)
// this file have about 5000 sounds.
// In this realisation only caller can hear this sound.
if( *args )
{
int dwSoundId = atoi((char*)args);
if( dwSoundId >= 0 )
{
WorldPacket data(SMSG_PLAY_OBJECT_SOUND,4+8);
data << uint32(dwSoundId) << m_session->GetPlayer()->GetGUID();
sWorld.SendGlobalMessage(&data,true);
sLog.outDebug("Player %s use command .playsound with #soundid=%u", m_session->GetPlayer()->GetName(), dwSoundId);
PSendSysMessage(LANG_YOU_HEAR_SOUND, dwSoundId);
return true;
}
}
SendSysMessage(LANG_BAD_VALUE);
return false;
}
but where do i have to add it? and do i have to change/add something in my DB? commands?
greetings