Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » C++ harvester
C++ harvester [message #453014] Thu, 01 September 2011 04:42 Go to previous message
SODPaddy is currently offline  SODPaddy
Messages: 233
Registered: August 2005
Location: Germany
Karma:
Recruit

Need help with:

gmscripts.cpp
void MDB_SSGM_Harvester::Custom(GameObject *obj, int message, int param, GameObject *sender) {
	if (Settings->LogHarvesterEvents) {
		if (message == 0x52520001)
		{
			if (Get_Object_Type(obj) == 1)
			{
				FDSMessage(StrFormat("The GDI Harvester is now docking and unloading."),"_HARVESTER");
				Create_2D_WAV_Sound_Team("m00evag_dsgn0047i1evag_snd.wav",1);
			}
			else
			{
				FDSMessage(StrFormat("The Nod Harvester is now docking and unloading."),"_HARVESTER");
				Create_2D_WAV_Sound_Team("m00evan_dsgn0042i1evan_snd.wav",0);
			}
		}
		else if (message == 0x52520000) 
		{
			if (Get_Object_Type(obj) == 1)
			{
				FDSMessage(StrFormat("The GDI Harvester is collecting Tiberium."),"_HARVESTER");
			}
			else
			{
				FDSMessage(StrFormat("The Nod Harvester is collecting Tiberium."),"_HARVESTER");
			}
		}
		else if (message == 0x52520002) 
		{
			if (Get_Object_Type(obj) == 1)
			{
				FDSMessage(StrFormat("The GDI Harvester is returning to the Refinery."),"_HARVESTER");
			}
			else
			{
				FDSMessage(StrFormat("The Nod Harvester is returning to the Refinery."),"_HARVESTER");
			}
		}
		else if (message == 0x52520003) 
		{
			if (Get_Object_Type(obj) == 1)
			{
				FDSMessage(StrFormat("The GDI Harvester is heading for Tiberium."),"_HARVESTER");
			}
			else
			{
				FDSMessage(StrFormat("The Nod Harvester is heading for Tiberium."),"_HARVESTER");
			}
		}
	}
}


gmscripts.h
class MDB_SSGM_Harvester : public MDB_SSGM_Vehicle {
	void Created(GameObject *obj);
	void Damaged(GameObject *obj, GameObject *damager, float damage);
	void Timer_Expired(GameObject *obj, int number);
	void Custom(GameObject *obj, int message, int param, GameObject *sender);
	bool PlayDamage;
};


but i dont work, the LogHarvesterEvents settings is true


Website: www.Area54.eu

Once 54, Always 54.
(\__/)
(O.o )
(___)
Visit us at www.Area54.eu
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: C++ complie SSGM2.0.2XWFDS
Next Topic: A notice to anyone planning to write code for scripts 4.0
Goto Forum:
  


Current Time: Sun Dec 01 12:28:59 MST 2024

Total time taken to generate the page: 0.00680 seconds