halo2pac wrote on Sun, 08 April 2012 21:20 |
I'm confused, if they are part of the engine... why are you showing them here? Just so you can make people aware of them or is it because your doing something special with the code that is beyond the default?
|
This displays a string from strings.tdb and plays the associated sound. It's a good way to send certain messages to players who aren't running tt.dll. Of course the string needs to be in the strings database but there's quite a bit of stuff in there.
void Send_Announcement_Player(int ID,int StringID) {
SCAnnouncement *RadioEvent = (SCAnnouncement*)operator new(sizeof(SCAnnouncement));
RadioEvent->Constructor();
RadioEvent->AnnouncementID = StringID;
RadioEvent->ID = -1;
RadioEvent->IconID = 0;
RadioEvent->AnnouncementType = 0;
RadioEvent->PlayerType = 0;
RadioEvent->Set_Object_Dirty_Bits(ID,NetworkObjectClass::BIT_CREATION);
Send_Object_Update(RadioEvent,ID);
RadioEvent->Set_Delete_Pending();
delete RadioEvent;
}
Send_Announcement_Player(ID,1496);