Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » General Discussions » General Discussion » "Invisible" Mode
Re: "Invisible" Mode [message #231310 is a reply to message #231214] Mon, 20 November 2006 09:08 Go to previous messageGo to previous message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma:
General (3 Stars)
void KAK_Spectator_Mode::Created(GameObject *obj) {
	if (Commands->Get_ID(Get_Vehicle_Return(obj)) != Commands->Get_ID(obj)) Commands->Apply_Damage(Get_Vehicle(obj),99999,"Explosive",0);
	Commands->Disable_Physical_Collisions(obj);
	Commands->Set_Model(obj,"None");
	Toggle_Fly_Mode(obj);
	Commands->Set_Is_Visible(obj,false);
	Commands->Give_Powerup(obj,"POW_Ammo_Regeneration",false);
	Commands->Start_Timer(obj,this,0.1f,1);
}

void KAK_Spectator_Mode::Damaged(GameObject *obj, GameObject *damager, float damage) {
	if (Commands->Get_Player_Type(damager) < 2) Commands->Set_Player_Type(obj,Commands->Get_Player_Type(damager));
	Commands->Set_Health(obj,Commands->Get_Max_Health(obj));
	Commands->Set_Shield_Strength(obj,Commands->Get_Max_Shield_Strength(obj));
}

void KAK_Spectator_Mode::Custom(GameObject *obj, int message, int param, GameObject *sender) {
	if (message == 2520) {
		Commands->Destroy_Object(obj);
		Destroy_Script();
	}
}

void KAK_Spectator_Mode::Timer_Expired(GameObject *obj, int number) {
	if (number == 1) {
		Commands->Select_Weapon(obj,"Weapon_MineTimed_Player");
		Commands->Start_Timer(obj,this,0.1f,1);
	}
}


ScriptRegistrant<KAK_Spectator_Mode> KAK_Spectator_Mode_Registrant("KAK_Spectator_Mode","");


class KAK_Spectator_Mode : public ScriptImpClass {
	void Damaged(GameObject *obj, GameObject *damager, float damage);
	void Custom(GameObject *obj, int message, int param, GameObject *sender);
	void Created(GameObject *obj);
	void Timer_Expired(GameObject *obj, int number);
	int OriginalTeam;
};



 
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: Should I go for a TI-80or 89?
Next Topic: And another 2 bite the dust!
Goto Forum:
  


Current Time: Thu Oct 24 06:27:48 MST 2024

Total time taken to generate the page: 0.00929 seconds