Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Is_Object_Visible explanation
Re: Is_Object_Visible explanation [message #469246 is a reply to message #469223] Wed, 13 June 2012 15:07 Go to previous message
Whitedragon is currently offline  Whitedragon
Messages: 832
Registered: February 2003
Location: California
Karma:
Colonel
Put this in a chat hook and it will send the enemy's team chat to any players that Commands->Set_Is_Visible has been used on.

	if (Type == TEXT_MESSAGE_TEAM) {
		int Team = Get_Player_Team(ID);
		cScTextObj *ChatEvent = 0;
		for (SLNode<SoldierGameObj> *z = GameObjManager::StarGameObjList.Head();z;z = z->Next()) {
			SoldierGameObj *Soldier = z->Data();
			if (!Soldier->Is_Visible() && Soldier->Get_Player_Type() != Team) {
				if (!ChatEvent) {
					ChatEvent = Send_Client_Text(Msg,TEXT_MESSAGE_TEAM,false,ID,-1,false,false);
				}
				ChatEvent->Set_Object_Dirty_Bits(Get_Player_ID(Soldier),NetworkObjectClass::BIT_CREATION);
			}
		}
	}




Black-Cell.net
Network Administrator (2003 - )

DragonServ, Renegade's first IRC interface bot
Creator and lead coder (2002 - )

Dragonade, Renegade's first server side modification
Lead coder (2005 - )
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: AI params questions
Next Topic: New 3rd Party to host legacy DCOM Renegade content.
Goto Forum:
  


Current Time: Mon Jul 15 07:12:51 MST 2024

Total time taken to generate the page: 0.00797 seconds