Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Question...
Re: Question... [message #466392 is a reply to message #465856] Thu, 19 April 2012 17:44 Go to previous messageGo to previous message
Whitedragon is currently offline  Whitedragon
Messages: 832
Registered: February 2003
Location: California
Karma:
Colonel
int Get_Object_Count_In_Zone(GameObject *obj,int Team) {
	if (!obj || !Commands->Get_ID(obj)) {
		return 0;
	}
	ScriptZoneGameObj *Zone = obj->As_ScriptZoneGameObj();
	if (!Zone) {
		return 0;
	}
	int Return = 0;
	for (SLNode<SmartGameObj> *z = GameObjManager::SmartGameObjList.Head();z;z = z->Next()) {
		if ((Get_Object_Type(z->Data()) == Team || Team == 2) && Zone->Inside_Me(z->Data())) {
			Return++;
		}
	}
	return Return;
}

int Get_Player_Count_In_Zone(GameObject *obj,int Team) {
	if (!obj || !Commands->Get_ID(obj)) {
		return 0;
	}
	ScriptZoneGameObj *Zone = obj->As_ScriptZoneGameObj();
	if (!Zone) {
		return 0;
	}
	int Return = 0;
	for (SLNode<SoldierGameObj> *z = GameObjManager::StarGameObjList.Head();z;z = z->Next()) {
		if ((Get_Object_Type(z->Data()) == Team || Team == 2) && Zone->Inside_Me(z->Data())) {
			Return++;
		}
	}
	return Return;
} 


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 - )

[Updated on: Thu, 19 April 2012 17:48]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: scripts when changing character
Next Topic: C&C Hourglass Amsterdam's Red Light District Progress
Goto Forum:
  


Current Time: Mon Dec 23 05:57:46 MST 2024

Total time taken to generate the page: 0.01049 seconds